possible bug for mod_jk configure for cygwin

2008-05-20 Thread Taro App
Hi list,

I tried compiling mod_jk on cygwin and error occurred. It looks like a
bug in configure, which correctly recognizes os as cygwin, but forgets
to add -DCYGWIN for gcc, thus resulting in incorrect inclusion of
sys/socketvar.h. Setting CFLAGS=-DCYGWIN solves the problem. Can
someone take a look at it and maybe register this in a bug database?
(I am pretty new here, so...)

mod_jk: 1.2.26
apache: 2.2.8
cygwin 1.5.25
os: Windows XP SP2

-

./buildconf.sh
./configure --with-apache=/home/user/apache2tmp/httpd-2.2.8
make

.

 gcc -I/apache2tmp/httpd-2.2.8/include
-I/apache2tmp/httpd-2.2.8/srclib/apr/include
-I/apache2tmp/httpd-2.2.8/os/unix
-I/apache2tmp/httpd-2.2.8/srclib/apr-util/include -g -O2 -g -O2 -I
/include -I /include/Windows_NT -c jk_ajp12_worker.c  -DDLL_EXPORT
-DPIC -o .libs/jk_ajp12_worker.o
In file included from jk_logger.h:27,
 from jk_ajp12_worker.h:27,
 from jk_ajp12_worker.c:26:
jk_global.h:141:27: sys/socketvar.h: No such file or directory
make[1]: *** [jk_ajp12_worker.lo] Error 1
make[1]: Leaving directory
`/tomcatconnectortmp/tomcat-connectors-1.2.26-src/native/common'
make: *** [all-recursive] Error 1

-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: possible bug for mod_jk configure for cygwin

2008-05-20 Thread Rainer Jung

Taro App wrote:

Hi list,

I tried compiling mod_jk on cygwin and error occurred. It looks like a
bug in configure, which correctly recognizes os as cygwin, but forgets
to add -DCYGWIN for gcc, thus resulting in incorrect inclusion of
sys/socketvar.h. Setting CFLAGS=-DCYGWIN solves the problem. Can
someone take a look at it and maybe register this in a bug database?
(I am pretty new here, so...)

mod_jk: 1.2.26
apache: 2.2.8
cygwin 1.5.25
os: Windows XP SP2


Could you please try the following patch instead of any changes you did:

Index: common/jk_global.h
===
--- common/jk_global.h  (old)
+++ common/jk_global.h  (new)
@@ -137,7 +137,7 @@
 #include netinet/tcp.h
 #include arpa/inet.h
 #include sys/un.h
-#if !defined(_OSD_POSIX)  !defined(AS400)  !defined(CYGWIN)  
!defined(HPUX11)
+#if !defined(_OSD_POSIX)  !defined(AS400)  !defined(__CYGWIN__)  
!defined(HPUX11)

 #include sys/socketvar.h
 #endif
 #if !defined(HPUX11)  !defined(AS400)


There is a line wrap in there. The patch should simply replace CYGWIN 
by __CYGWIN__ in file common/jk_global.h.




-

./buildconf.sh
./configure --with-apache=/home/user/apache2tmp/httpd-2.2.8
make

.

 gcc -I/apache2tmp/httpd-2.2.8/include
-I/apache2tmp/httpd-2.2.8/srclib/apr/include
-I/apache2tmp/httpd-2.2.8/os/unix
-I/apache2tmp/httpd-2.2.8/srclib/apr-util/include -g -O2 -g -O2 -I
/include -I /include/Windows_NT -c jk_ajp12_worker.c  -DDLL_EXPORT
-DPIC -o .libs/jk_ajp12_worker.o
In file included from jk_logger.h:27,
 from jk_ajp12_worker.h:27,
 from jk_ajp12_worker.c:26:
jk_global.h:141:27: sys/socketvar.h: No such file or directory
make[1]: *** [jk_ajp12_worker.lo] Error 1
make[1]: Leaving directory
`/tomcatconnectortmp/tomcat-connectors-1.2.26-src/native/common'
make: *** [all-recursive] Error 1


Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Manager Application (Tomcat 5.5.26)

2008-05-20 Thread Nuno Manuel Martins
Hi,

Thanks for the reply, I looked in the logs and restarted tomcat but found 
nothing relevant in them. One thing I notice is that the first time I try to 
access the manager webapp I get this error instead:

HTTP Status 500
javax.servlet.ServletException: Wrapper cannot find servlet class 
org.apache.catalina.manager.HTMLManagerServlet or a class it depends on

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595)

root cause

java.lang.ClassNotFoundException: org.apache.catalina.manager.HTMLManagerServlet
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
java.lang.ClassLoader.loadClass(ClassLoader.java:251)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595)

note The full stack trace of the root cause is available in the Apache 
Tomcat/5.5.26 logs.

If I do a refresh I get the error I sent in the first e-mail. Does the webapp 
needs any jar that does not come by default or something?

Regards,
Nuno

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: segunda-feira, 19 de Maio de 2008 19:41
To: Tomcat Users List
Subject: Re: Manager Application (Tomcat 5.5.26)

The manager webapp provided by tomcat doesn't need installation -- it's
a part of tomcat already in the download distribution.  It's location
has changed slightly over time -- normally found in the webapps
directory, tomcat 5.5.x put it in server/webapps by default.  Regarding
the error below, there must have been a previous error in the logs from
when you started tomcat.  Could you look at that and post if necessary?

--David

Nuno Manuel Martins wrote:

Hello,

I'm trying to install the manager application on Tomcat 5.5.26 (well, actually 
it comes installed by default, I am just trying to make it work) and after I 
authenticate with a user created in conf/tomcat-users.xml I get the following 
message

HTTP Status 404 - Servlet HTMLManager is not available

type Status report
message Servlet HTMLManager is not available
description The requested resource (Servlet HTMLManager is not available) is 
not available.

I googled around but all I could find was recomentations to re-install the 
application but this mostly relates to RPM installs or 3rd party software but 
I am using the source distribution from the official site... however I did try 
to unpack the source again and overwrite the manager application (still have 
the problem though).

My server.xml has the following about this:

  GlobalNamingResources
  Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources
[...]
Realm className=org.apache.catalina.realm.UserDatabaseRealm 
 resourceName=UserDatabase/
Context path=/manager 
 docBase=/usr/local/tomcat-5.5.26/webapps/manager reloadable=true 
 crossContext=true/

Think these are the relevant parts.

If you 

RE: Manager Application (Tomcat 5.5.26)

2008-05-20 Thread Nuno Manuel Martins
Just to say I tried copying the 2 jar files in WEB-INF/lib to 
$TOMCAT_HOME/common/lib and now get a different error:

May 20, 2008 9:46:55 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet HTMLManager
java.lang.NoClassDefFoundError: org/apache/catalina/ContainerServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at 
org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)


-Original Message-
From: Nuno Manuel Martins
Sent: terça-feira, 20 de Maio de 2008 9:34
To: Tomcat Users List
Subject: RE: Manager Application (Tomcat 5.5.26)

Hi,

Thanks for the reply, I looked in the logs and restarted tomcat but found 
nothing relevant in them. One thing I notice is that the first time I try to 
access the manager webapp I get this error instead:

HTTP Status 500
javax.servlet.ServletException: Wrapper cannot find servlet class 
org.apache.catalina.manager.HTMLManagerServlet or a class it depends on

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595)

root cause

java.lang.ClassNotFoundException: org.apache.catalina.manager.HTMLManagerServlet
java.net.URLClassLoader$1.run(URLClassLoader.java:200)

Re: JMX MBean

2008-05-20 Thread Liang Xiao Zhu

Can anyone help me?

Liang Xiao Zhu escribió:

Hi Bill,

I did what you said and still doesnt work!!! I show my code and how 
I've implemented the whole things.


I added in the java/org/apache/catalina/deploy/mbeans-descriptors.xml 
the follow code:


...
 mbean name=Kaugures
   className=org.apache.catalina.mbeans.AuguresMBean
 description=Augures environment
  domain=Catalina
   group=Resources
type=org.apache.catalina.deploy.Augures

   attribute name=className
  description=Fully qualified class name of the managed 
object

  type=java.lang.String
  writeable=false/

   operation   name=HelloWorld
 description=Prueba de AUGURUS
  impact=ACTION
  returnType=java.lang.String
   /operation
...

And the file (java/org/apache/catalina/deploy/Augurus.java) to 
implement the bean is here:


package org.apache.catalina.deploy;

import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.catalina.mbeans.MBeanUtils;

import org.apache.catalina.mbeans.AugurusMBean;

public class Augurus implements AugurusMBean {

   private Registry registry = MBeanUtils.createRegistry();

   public Augurus() {

 ObjectName name = null;
 try {
   name = new ObjectName(Application:Name=Server,Type=Server);
   registry.getRegistry(null, null).registerComponent(this, name, 
null);

 } catch (Exception e) {
   e.printStackTrace();
 }

   }


   // interface method implementations
   public String HelloWorld(){
   return Hola;
   }
 }

And finally, the interface 
(java/org/apache/catalina/mbeans/AugurusMBean.java):


package org.apache.catalina.mbeans;

public interface AugurusMBean{

   public String HelloWorld();

}

Could you tell what wrong is? Because I didn't find nothing about my 
Bean.


Thanks in advance!!!


Bill Barker escribió:
To use the mbeans-descriptor.xml method, somewhere in your code you 
need to do something like:
Registry.getRegistry(null, 
null).registerComponent(this, oname, null );


Where 'oname' is the ObjectName that you want to register your 
component under.  Since you are using TC6, the correct import is:

import org.apache.tomcat.util.modeler.Registry;



Liang Xiao Zhu [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 

Hi Bill,

Yes, I am implementing a custom class that doesnt extend from any 
Tomcat class. But I dont know how to self-register, I tried change 
the mbeans-descriptor.xml and others things and looks like that 
nothing works!!!


Thanks



Bill Barker escribió:
   
Chuck's post works for implementing custom Tomcat components (e.g. 
a custom Realm extending RealmBase).  If you are implementing a 
custom class that doesn't extend any Tomcat class, then your class 
will have to self-register itself.  Since you say you are using 
TC6, the default configuration should give you access to the 
Registry class to allow you to do it using the 
mbeans-descriptor.xml method that the (forked) commons-modeler uses.


ubekhet [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]


 

Hi Caldarale,

Yes, I use the current version of Tomcat. Thanks for your link, 
but I want to know how to implement MBean, because according the 
web you gave, I have to add my MBean to the mbeans-descriptor.xml 
and also the folder where is contained.


For example, if I want to implement the HelloWorld in 
java/org/apache/catalina/mbeans, first of all I have to add to 
mbeans-descriptor.xml in java/org/apache/catalina and then also in 
java/org/apache/catalina/mbeans.


On the other hand, I've implemented HelloWorld.java in 
java/org/apache/catalina/deploy and HelloWorldMBean as interface 
in java/org/apache/catalina/mbeans. This implementation is the 
correct way? Other way in the same java/org/apache/catalina/deploy 
directory contain another mbeans-descriptor.xml file


Can you say me, if I am right?

Thanks a lots!!!

Caldarale, Charles R wrote:

   

-Original Message-
From: Liang Xiao Zhu [mailto:[EMAIL PROTECTED] 
Subject: JMX MBean


I am searching how to implement a MBean for a class that I 
implemented, which add some new funcionality to Tomcat.




Don't suppose you'd care to tell us what version of Tomcat you're 
using?


If it's the current level, have you followed these instructions?

http://tomcat.apache.org/tomcat-6.0-doc/mbeans-descriptor-howto.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
PROPRIETARY

MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the 
e-mail

and its attachments from all computers.

- 


To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: 

Re: Manager Application (Tomcat 5.5.26)

2008-05-20 Thread David Smith
If I were you, I'd download a fresh copy of tomcat 5.5 (or just unzip 
the downloaded version from before) and recopy server/webapps/manager 
from the archive to your installed tomcat.  Then remove the 2 jars you 
copied from WEB-INF/lib (I assume server/webapps/manager/WEB-INF/lib) to 
common/lib.  If you've put the manager webapp in the webapps directory 
(not to be confused with server/webapps), remove that copy as well.  
Lastly check conf/Catalina/localhost to be sure it's the original that 
points it's docbase to server/webapps/manager.


All the above should return tomcat 5.5's manager webapp to the way it 
was in the tomcat downloaded archive.  Restart and see what you get.


--David

Nuno Manuel Martins wrote:

Just to say I tried copying the 2 jar files in WEB-INF/lib to 
$TOMCAT_HOME/common/lib and now get a different error:

May 20, 2008 9:46:55 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet HTMLManager
java.lang.NoClassDefFoundError: org/apache/catalina/ContainerServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at 
org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)


-Original Message-
From: Nuno Manuel Martins
Sent: terça-feira, 20 de Maio de 2008 9:34
To: Tomcat Users List
Subject: RE: Manager Application (Tomcat 5.5.26)

Hi,

Thanks for the reply, I looked in the logs and restarted tomcat but found 
nothing relevant in them. One thing I notice is that the first time I try to 
access the manager webapp I get this error instead:

HTTP Status 500
javax.servlet.ServletException: Wrapper cannot find servlet class 
org.apache.catalina.manager.HTMLManagerServlet or a class it depends on

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)


Re: HTML hyperlink problem in Apache Tomcat 5.5

2008-05-20 Thread Mark Thomas

thunderhead wrote:

I understand your observation. But how am I (or anyone for that matter) to
work around this? If I have a progam that is going to access content that is
stored remotely, or content from a repository, is it not impractical to
expect the content to be available from tomcat? How do developers work
around a situation to link or access content that is remote from the server
in which their web application is deployed?


They write a servlet that retrieves the content from the repository and 
passes it through to the client.


Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HTML hyperlink problem in Apache Tomcat 5.5

2008-05-20 Thread thunderhead

I understand your observation. But how am I (or anyone for that matter) to
work around this? If I have a progam that is going to access content that is
stored remotely, or content from a repository, is it not impractical to
expect the content to be available from tomcat? How do developers work
around a situation to link or access content that is remote from the server
in which their web application is deployed?

Is there any way to let the content pass through using a configuration
file?

Thanks, and I appreciate your help.



David Smith-2 wrote:
 
 You may be running into a cross-scripting issue with your browser.  The 
 security in browsers doesn't normally allow online content any access to 
 local files.  Make sure all the content you are trying to access from 
 the page offered by tomcat is available from tomcat.
 
 --David
 
 thunderhead wrote:
 Hi again,

 This is an addendum to my earlier post, which highlights the linking
 problem
 mentioned earlier and introduces another one (sigh).

 The directory structure of my web application is the following:

 GSDC5P1 (root)
 ---
 docs | images | lib | mindmaps
 index.html
 ---
 docs  GSDC_PolicyManual.mht

 The index.html file is in the root and from this file, I want to link to
 the
 GSDC_PolicyManual.mht present under the directory docs.

 In my index.html file, I tried linking to this file in six different ways
 (NOTE: In some of these links, I tried linking to a specific sub-section
 of
 the MIME HTML [.mht] document by using the anchors present, because that
 is
 my ultimate aim in creating these links). 

 In particular, I tried using a relative path, absolute path and the full
 web
 container path (localhost and my workstation IP address, considering I'm
 running Tomcat in my own workstation) to link to the file.

 The HTML code for the links is below:
 docs/GSDC_PolicyManual.mht  Test 1  
 C:\Program Files\Apache Software Foundation\Tomcat
 5.5\webapps\GSDC5P1\docs\GSDC_PolicyManual.mht  Test 2  
 docs/GSDC_PolicyManual.mht#_Toc175474678  Test 3  
 C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.5\webapps\GSDC5P1\docs\GSDC_PolicyManual.mht#_Toc175474678
  
 Test 4  
 http://localhost:8080/GSDC5P1/docs/GSDC_PolicyManual.mht#_Toc175474678 
 Test
 5  
 http://10.194.118.58:8080/GSDC5P1/docs/GSDC_PolicyManual.mht#_Toc175474678 
 Test 6  

 The results are that the relative paths and http:// paths work. But when
 the
 .mht file opens up, it throws the following error:

 MIME-Version: 1.0 Content-Type: multipart/related;
 boundary==_NextPart_01C8B51A.46DAF130 This document is a Single
 File
 Web Page, also known as a Web Archive file. If you are seeing this
 message,
 your browser or editor doesn't support Web Archive files. Please download
 a
 browser that supports Web Archive, such as Microsoft Internet Explorer.
 --=_NextPart_01C8B51A.46DAF130 Content-Location:
 file:///C:/E048E08C/GSDC_PolicyManual.htm Content-Transfer-Encoding:
 quoted-printable Content-Type: text/html; charset=us-ascii 

 I cannot make much sense of this because when I double click on the .mht
 file and open it in Internet Explorer (my workstation has version 6
 installed), the document shows up fine.

 Again, the absolute links to this document don't work at all. No errors,
 no
 messages of the kind above.

 I'm really keen to get to the bottom of this and somehow make the .mht
 file
 work, while keeping in mind that it may be on a remote server (so I must
 be
 able to link to it outside of my webapps folder).

 Hope that throws much more light on the situation.





 thunderhead wrote:
   
 I understand what you're getting at. I am running a local instance of
 Tomcat, which means that both the client and the server are in my
 workstation. So shouldn't the local linkages work then?

 Now, bringing the files into the webapps folder is a convenient
 solution.
 But the issue is that this web application is ultimately going to be
 deployed on a production/test server, and the application has to refer
 to
 the direct path of files lying on a remote server elsewhere.

 Again, http:// paths work, but local paths don't even if they refer to
 my
 own workstation (the one in which I am running Tomcat).

 One thing I must point out is that I don't have a configuration file in
 my
 web application's folder (currently it does not use any JSP, and the
 only
 Java involved is in an applet (.jar) which is embedded into a HTML
 document). Should I make a configuration file? If so, what must I put
 into
 it such that these links work?

 Thanks for looking into this.




 Caldarale, Charles R wrote:
 
 From: thunderhead [mailto:[EMAIL PROTECTED] 
 Subject: HTML hyperlink problem in Apache Tomcat 5.5

 I tried linking some local files on my workstation for 
 testing purposes.
 
 You can't do that.  Each link is evaluated in the environment of the
 *client* (browser, in your case).  Unless the files are located on the
 client system, 

Re: HTML hyperlink problem in Apache Tomcat 5.5

2008-05-20 Thread David Smith
You may be running into a cross-scripting issue with your browser.  The 
security in browsers doesn't normally allow online content any access to 
local files.  Make sure all the content you are trying to access from 
the page offered by tomcat is available from tomcat.


--David

thunderhead wrote:

Hi again,

This is an addendum to my earlier post, which highlights the linking problem
mentioned earlier and introduces another one (sigh).

The directory structure of my web application is the following:

GSDC5P1 (root)
---
docs | images | lib | mindmaps
index.html
---
docs  GSDC_PolicyManual.mht

The index.html file is in the root and from this file, I want to link to the
GSDC_PolicyManual.mht present under the directory docs.

In my index.html file, I tried linking to this file in six different ways
(NOTE: In some of these links, I tried linking to a specific sub-section of
the MIME HTML [.mht] document by using the anchors present, because that is
my ultimate aim in creating these links). 


In particular, I tried using a relative path, absolute path and the full web
container path (localhost and my workstation IP address, considering I'm
running Tomcat in my own workstation) to link to the file.

The HTML code for the links is below:
docs/GSDC_PolicyManual.mht  Test 1  
C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\GSDC5P1\docs\GSDC_PolicyManual.mht  Test 2  
docs/GSDC_PolicyManual.mht#_Toc175474678  Test 3  
C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.5\webapps\GSDC5P1\docs\GSDC_PolicyManual.mht#_Toc175474678 
Test 4  
http://localhost:8080/GSDC5P1/docs/GSDC_PolicyManual.mht#_Toc175474678  Test
5  
http://10.194.118.58:8080/GSDC5P1/docs/GSDC_PolicyManual.mht#_Toc175474678 
Test 6  


The results are that the relative paths and http:// paths work. But when the
.mht file opens up, it throws the following error:

MIME-Version: 1.0 Content-Type: multipart/related;
boundary==_NextPart_01C8B51A.46DAF130 This document is a Single File
Web Page, also known as a Web Archive file. If you are seeing this message,
your browser or editor doesn't support Web Archive files. Please download a
browser that supports Web Archive, such as Microsoft Internet Explorer.
--=_NextPart_01C8B51A.46DAF130 Content-Location:
file:///C:/E048E08C/GSDC_PolicyManual.htm Content-Transfer-Encoding:
quoted-printable Content-Type: text/html; charset=us-ascii 


I cannot make much sense of this because when I double click on the .mht
file and open it in Internet Explorer (my workstation has version 6
installed), the document shows up fine.

Again, the absolute links to this document don't work at all. No errors, no
messages of the kind above.

I'm really keen to get to the bottom of this and somehow make the .mht file
work, while keeping in mind that it may be on a remote server (so I must be
able to link to it outside of my webapps folder).

Hope that throws much more light on the situation.





thunderhead wrote:
  

I understand what you're getting at. I am running a local instance of
Tomcat, which means that both the client and the server are in my
workstation. So shouldn't the local linkages work then?

Now, bringing the files into the webapps folder is a convenient solution.
But the issue is that this web application is ultimately going to be
deployed on a production/test server, and the application has to refer to
the direct path of files lying on a remote server elsewhere.

Again, http:// paths work, but local paths don't even if they refer to my
own workstation (the one in which I am running Tomcat).

One thing I must point out is that I don't have a configuration file in my
web application's folder (currently it does not use any JSP, and the only
Java involved is in an applet (.jar) which is embedded into a HTML
document). Should I make a configuration file? If so, what must I put into
it such that these links work?

Thanks for looking into this.




Caldarale, Charles R wrote:

From: thunderhead [mailto:[EMAIL PROTECTED] 
Subject: HTML hyperlink problem in Apache Tomcat 5.5


I tried linking some local files on my workstation for 
testing purposes.


You can't do that.  Each link is evaluated in the environment of the
*client* (browser, in your case).  Unless the files are located on the
client system, they won't be found.  Put the files inside the webapp and
access them via the proper webapp-relative references.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



  



--
David Smith
Network Operations 

Tomcat 6 and Servlet filter problem

2008-05-20 Thread ManojS

Hello,

I was trying to integrate a web application in Tomcat 6. That application
uses a servlet filter to append few parameters to all the requests of its
resources. The web.xml file with filter configuration is as follows.



 ?xml version=1.0 encoding=UTF-8 ?
 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
  filter
   filter-nameParamFilter/filter-name
   filter-classcom.somecompany.ParamFilter/filter-class
  /filter
 
  filter-mapping
   filter-nameParamFilter/filter-name
   url-pattern/Jsp/*/url-pattern
  /filter-mapping
 
 /web-app
 

My problem is, while I am requesting any resources inside the Jsp folder,
the servlet filter's doFilter method is not executing. But in the log it is
showing that the servlet filter's init method is executed correctly.

Can anyone help me to figureout the problem ? Or suggest any solution ?
Thanks a lot in advance.

Manoj.

-- 
View this message in context: 
http://www.nabble.com/Tomcat-6-and-Servlet-filter-problem-tp17337357p17337357.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HTML hyperlink problem in Apache Tomcat 5.5

2008-05-20 Thread thunderhead

Thanks a lot. That clarifies it.

I need to write a servlet which can handle such requests and code the
retrieval of the artefact from there.

It complicates the programming, but I understand the logic behind it. I will
get back to these forums if I need help implementing the same.

Regards.


Mark Thomas-18 wrote:
 
 thunderhead wrote:
 I understand your observation. But how am I (or anyone for that matter)
 to
 work around this? If I have a progam that is going to access content that
 is
 stored remotely, or content from a repository, is it not impractical to
 expect the content to be available from tomcat? How do developers work
 around a situation to link or access content that is remote from the
 server
 in which their web application is deployed?
 
 They write a servlet that retrieves the content from the repository and 
 passes it through to the client.
 
 Mark
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/HTML-hyperlink-problem-in-Apache-Tomcat-5.5-tp17332016p17336931.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to change http://107.105.13.1/webapp/ into http://www.mydomain.com/webapp/

2008-05-20 Thread David Smith
You may not have to go through all that trouble.  Check with the name 
registration service you got your domain name from -- they may have DNS 
service.


--David

ryan webb wrote:

Mr. David,

Thank you very much for your kind reply. I've got a feeling that this is not
Tomcat related.
I think I will try to setup a DNS server. For this.

God bless.

On Mon, May 19, 2008 at 5:46 PM, David Smith [EMAIL PROTECTED] wrote:

  

Not a tomcat question ... you need to get your system registered with a DNS
service and it will respond to the www.mydomain.com name regardless of
service (tomcat, apache, iis, ssh, sftp, etc., ...).

--David

ryan webb wrote:



Hello,

How to change http://107.105.13.1/webapplication/ into
http://www.mydomain.com/webapplication/
in tomcat? If not Tomcat related please let me know...(give me tips or
anything)

Thank you =)



  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  



--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Manager Application (Tomcat 5.5.26)

2008-05-20 Thread Caldarale, Charles R
 From: David Smith [mailto:[EMAIL PROTECTED] 
 Subject: Re: Manager Application (Tomcat 5.5.26)
 
 If I were you, I'd download a fresh copy of tomcat 5.5 (or just unzip 
 the downloaded version from before) and recopy server/webapps/manager 
 from the archive to your installed tomcat.

I'd suggest going farther and just throwing away the existing Tomcat
installation, since it's obviously been corrupted in ways unknown.
Start over with a fresh download and a fresh installation, update
conf/tomcat-users.xml, and verify that the manager app works.  Once
that's done, carefully make any config changes for the webapps you want
to deploy, taking notes so you can back out anything that doesn't work.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat6 JNDI context share

2008-05-20 Thread Zdeněk Vráblík
Hi all,

I need share JNDI context among web applications.

There is in Tomcat documentation that JNDI context changes are visible
only in application which made these changes.


My use case:

I have one application to manage metadata including database
datasources. This application creates datasource and bind this
datasource
to the initialContext (env context is read only). It generates
configuration into context.xml too.

Than I have another application which would like use this new
datasource. Right now I have to restart all Tomcat
to get configuration from /conf/context.xml or reload this second
application to see the new database datasource.

Is there any way how to write changes to all available contexts
without restarting Tomcat or reloading application?


Thanks.

Regards,
Zdenek

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JMX MBean

2008-05-20 Thread Johnny Kewl


Liang, I'm sorry its one area that has never reved my engine...
and also, did you read this article...
http://oss.wxnet.org/mbeans.html

It looks pretty good to me, and the guy actually says, with tomcat you 
either have to init the bean in a servlet and load-at-start.
Because if you dont... the servlet will not be running... and the bean wont 
have woken up.

AND then he says, a listener is a better bet... which sound good to me.

I would just try get it all going using that guys code, as a test.

And then something that bothers me...
Why are you using Tomcat's package names for your software?
Good way to break Tomcat... I think.

Use your own package names

com.Liangs.software etc...

Its almost like you half kinda sorta thinking you want to override a TC 
class, but you not.

Your code I think is even confusing the experts...

And its not a popular topic... so you very much on your own, unless some guy 
in the group happens to have done it, and feels like sharing.

Copy what that other guy did... then just modify it... I think

Good luck... some area's get a little lonely ;)

- Original Message - 
From: Liang Xiao Zhu [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, May 20, 2008 10:59 AM
Subject: Re: JMX MBean



Can anyone help me?
I did what you said and still doesnt work!!! I show my code and how I've 
implemented the whole things.


I added in the java/org/apache/catalina/deploy/mbeans-descriptors.xml the 
follow code:


...
 mbean name=Kaugures
   className=org.apache.catalina.mbeans.AuguresMBean
 description=Augures environment
  domain=Catalina
   group=Resources
type=org.apache.catalina.deploy.Augures

   attribute name=className
  description=Fully qualified class name of the managed 
object

  type=java.lang.String
  writeable=false/

   operation   name=HelloWorld
 description=Prueba de AUGURUS
  impact=ACTION
  returnType=java.lang.String
   /operation
...

And the file (java/org/apache/catalina/deploy/Augurus.java) to implement 
the bean is here:


package org.apache.catalina.deploy;

import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.catalina.mbeans.MBeanUtils;

import org.apache.catalina.mbeans.AugurusMBean;

public class Augurus implements AugurusMBean {


.. etc

---
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
--- 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SSL encryption with Tomcat

2008-05-20 Thread Indudhar Devanath

Hi,

We have a production application which handles around 200 to 500 unique 
sessions at any given time of the day, and its growing.  Thats the only 
application running on Tomcat 6.0.  All the transactions take place 
through SSL encryption.  Tomcat runs as stand alone, as a single 
instance and is configured to handle SSL encryption.  Would it be better 
if we made tomcat work with Apache HTTP Server?  Would it be better if 
SSL encryption is handled by tomcat or if it is handled by Apache HTTP 
Server?


I would really appreciate your opinions on this.

thanks,
Indu

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SSL encryption with Tomcat

2008-05-20 Thread Mark Thomas

Indudhar Devanath wrote:

Hi,

We have a production application which handles around 200 to 500 unique 
sessions at any given time of the day, and its growing.  Thats the only 
application running on Tomcat 6.0.  All the transactions take place 
through SSL encryption.  Tomcat runs as stand alone, as a single 
instance and is configured to handle SSL encryption.  Would it be better 
if we made tomcat work with Apache HTTP Server?  Would it be better if 
SSL encryption is handled by tomcat or if it is handled by Apache HTTP 
Server?


I would really appreciate your opinions on this.


If it ain't broke - don't fix it.

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SSL encryption with Tomcat

2008-05-20 Thread Brian Martin
Your setup sounds fine. However having apache handle things on a separate 
machine 
might be a nice option if you ever wanted to use it to load balance more than 
1 tomcat server in a clustered environment.  Which could be what you want given
you're user base is growing.

Brian



On Tue, May 20, 2008 at 09:33:21AM -0400, Indudhar Devanath wrote:
 Hi,
 
 We have a production application which handles around 200 to 500 unique 
 sessions at any given time of the day, and its growing.  Thats the only 
 application running on Tomcat 6.0.  All the transactions take place 
 through SSL encryption.  Tomcat runs as stand alone, as a single 
 instance and is configured to handle SSL encryption.  Would it be better 
 if we made tomcat work with Apache HTTP Server?  Would it be better if 
 SSL encryption is handled by tomcat or if it is handled by Apache HTTP 
 Server?
 
 I would really appreciate your opinions on this.
 
 thanks,
 Indu
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 6 + Apache 2.2.3 Integration Problems

2008-05-20 Thread Madan KN

Hi,
Am trying to integrate Apache 2.2.3 and Tomcat 6 using mod_jk.

I have installed the following and working independently fine.
--
1. Apache 2.2.3
2. Tomcat 6.

Integrated the mod_jk connector  Standard Instructions.(Tomcat Website
Instructions)
---

My Configurations.
1. Added the below line in /etc/httpd/conf/httpd.conf
Include /opt/tomcat6/conf/auto/mod_jk.conf

2. My /opt/tomcat6/conf/auto/mod_jk.conf
IfModule !mod_jk.c
  LoadModule jk_module /etc/httpd/modules/mod_jk.so
/IfModule

JkWorkersFile /opt/tomcat6/conf/jk/workers.properties
JkLogFile /opt/tomcat6/logs/mod_jk.log

JkLogLevel emerg

VirtualHost localhost
ServerName localhost

JkMount /manager ajp13
JkMount /manager/* ajp13

JkMount /docs ajp13
JkMount /docs/* ajp13

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /host-manager ajp13
JkMount /host-manager/* ajp13

JkMount /contact ajp13
JkMount /contact/* ajp13
/VirtualHost

3. /etc/opt/tomcat6/conf/jk/workers.properties
workers.tomcat_home=/opt/tomcat6/
 
workers.java_home=/usr/java/jdk1.6.0_05
 
ps=/
 
worker.list=worker1
 
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
 
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=worker1
 
worker.inprocess.type=jni
 
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
 
worker.inprocess.cmd_line=start
 
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)
i386$(ps)classic$(ps)libjvm.so
 
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr





But am not able to trouble shoot where am going wrong. Can anyone please
guide me how to trouble shoot or where is the issue. 


Thanks,
Madan KN


-- 
View this message in context: 
http://www.nabble.com/Tomcat-6-%2B-Apache-2.2.3-Integration-Problems-tp17343403p17343403.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Setting up JDBCRealm for form authentication

2008-05-20 Thread Carol Cheung

Hi,

I am very new to the aforementioned subject. As hinted in subject, I am 
trying to set up a web application using form authentication.


I have set up server.xml according to the steps specified at
http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html
for JDBCRealm

For the application, I have followed the instructions at
http://www.onjava.com/pub/a/onjava/2001/08/06/webform.html

The problem I am experiencing is that when I try to access the page I 
have specified in web.xml as secure, I get to that page - I am not 
redirected to the login page that I specified in web.xml.


I've had someone else look at web.xml and they say that's not where the 
problem lies. So I'm wondering if the problem is with server.xml.


Can anyone give a newbie some pointers as to where to look to diagnose 
and fix this problem?


Thank you in advance for your help.

CC

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



excluding one webapp from SSL

2008-05-20 Thread akoo

Hello,
 I have tomcat configured to use SSL and none ssl request is redirected to
have ssl.  Is there way I can exclude one of the webapps in tomcat from
having to be requested using ssl?
 
-- 
View this message in context: 
http://www.nabble.com/excluding-one-webapp-from-SSL-tp17347370p17347370.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple webapps folders

2008-05-20 Thread Cristian Bullokles
Hi,
   I have installed and working Tomcat 6.0.16, but i like to
configure multiple (webapps) appBase folders.
   I like to do that only to deploy servlet in different folders
not only in the default webapps folder.
   Can I do that?

thanks in advance
cristian

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setting up JDBCRealm for form authentication

2008-05-20 Thread Mark Thomas

Carol Cheung wrote:

Hi,

I am very new to the aforementioned subject. As hinted in subject, I am 
trying to set up a web application using form authentication.


I have set up server.xml according to the steps specified at
http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html
for JDBCRealm

For the application, I have followed the instructions at
http://www.onjava.com/pub/a/onjava/2001/08/06/webform.html

The problem I am experiencing is that when I try to access the page I 
have specified in web.xml as secure, I get to that page - I am not 
redirected to the login page that I specified in web.xml.


I've had someone else look at web.xml and they say that's not where the 
problem lies. So I'm wondering if the problem is with server.xml.


Can anyone give a newbie some pointers as to where to look to diagnose 
and fix this problem?


Thank you in advance for your help.


You'll need to post the relevant sections of your web.xml, your server.xml 
and the URL of the protected resource. If you don't see the login form an 
error in web.xml is most likely.


Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: excluding one webapp from SSL

2008-05-20 Thread Mark Thomas

akoo wrote:

Hello,
 I have tomcat configured to use SSL and none ssl request is redirected to
have ssl.  Is there way I can exclude one of the webapps in tomcat from
having to be requested using ssl?


How are you specifying SSL is required? If you are using 
transport-guarantee in web.xml then it is simple - just don't specify it 
for that web app.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple webapps folders

2008-05-20 Thread Mark Thomas

Cristian Bullokles wrote:

Hi,
   I have installed and working Tomcat 6.0.16, but i like to
configure multiple (webapps) appBase folders.
   I like to do that only to deploy servlet in different folders
not only in the default webapps folder.
   Can I do that?


No. But you can use context files to deploy wars or directories outside of 
the host's appBase.


Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple webapps folders

2008-05-20 Thread Mark Thomas

Cristian Bullokles wrote:

Could I use context to deploy multiple instances of axis2?
I need different names to each axis2 instance?

I like to do something like that:
/home/user1/public_servlets/axis2
/home/user2/public_servlets/axis2
/home/user3/public_servlets/axis2

Then in my context file i'll have

Context path=/user1/axis2
docBase=/home/user1/public_servlets/axis2 
/Context


Context path=/user2/axis2
docBase=/home/user2/public_servlets/axis2 
/Context


Should be fine.

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Java Memory Options in Tomcat Startup

2008-05-20 Thread Caldarale, Charles R
 From: Susan G. Conger [mailto:[EMAIL PROTECTED] 
 Subject: Java Memory Options in Tomcat Startup
 
 In the startup_tomcat400.sh there is the following line:

Just the above is somewhat scary, since the standard Tomcat
distributions do not include such a startup file.  Is there any reason
you can't use a real Tomcat?

 can someone shed some light on the -ms64m.

It's the old (deprecated) way of specifying the minimum JVM heap size,
shared by all threads; the more modern usual way would be -Xms64m.  For
server applications such as Tomcat, it's usually better to use the same
value for both minimum (-Xms) and maximum (-Xmx) heap size, to avoid
memory thrashing as the heap expands and contracts.  Whether or not
that's true for the JVM you have installed on what appears to be an
AS/400, I don't know.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Disabling Asserts on Tomcat 5.0.x

2008-05-20 Thread Caldarale, Charles R
 From: Andrew Stine [mailto:[EMAIL PROTECTED] 
 Subject: Disabling Asserts on Tomcat 5.0.x
 
 I'm having an issue running Tomcat 5.0.x on an IBM JVM.

Tomcat 5.0 is deprecated; please try with a supported version.  Also,
since it works with the Sun JVM, you should probably pursue this with
the IBM JVM folks, since they appear to have broken it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat startup problem

2008-05-20 Thread TheKurgan

I get this exception too and you can't just compile a JSP page in Netbeans. 
It doesn't seem to cause any user impact, but I keep seeing the exception in
the logs alot.
-- 
View this message in context: 
http://www.nabble.com/Tomcat-startup-problem-tp17228551p17351398.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: excluding one webapp from SSL

2008-05-20 Thread Johnny Kewl


- Original Message - 
From: akoo [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Tuesday, May 20, 2008 8:29 PM
Subject: excluding one webapp from SSL




Hello,
I have tomcat configured to use SSL and none ssl request is redirected to
have ssl.  Is there way I can exclude one of the webapps in tomcat from
having to be requested using ssl?


If the pages are password protected you can use
security-constraint
   user-data-constraint
   transport-guaranteeCONFIDENTIAL/transport-guarantee
   /user-data-constraint
/security-constraint

redirectPort=443
in the standard port 80 connector makes them all use SLL

And it becomes fun if you using SSL on non protected pages.

Then (I think) you have to drop the above techniques in favor of checking 
for SSL with


request.isSecure()

and redirecting to the HTTPs link yourself..

and not doing that if you dont want that.

Probably the easiest is to protect the pages that need SSL and use 
security-constraint


although I have always done the test myself in code because that means the 
admin guy cant screw up.


Maybe there are some other ways... those are the ones I'm aware of

---
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
---














-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 and Servlet filter problem

2008-05-20 Thread Bill Barker

ManojS [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

 Hello,

 I was trying to integrate a web application in Tomcat 6. That application
 uses a servlet filter to append few parameters to all the requests of its
 resources. The web.xml file with filter configuration is as follows.



 ?xml version=1.0 encoding=UTF-8 ?
 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
  filter
   filter-nameParamFilter/filter-name
   filter-classcom.somecompany.ParamFilter/filter-class
  /filter

  filter-mapping
   filter-nameParamFilter/filter-name
   url-pattern/Jsp/*/url-pattern
  /filter-mapping
 
 /web-app


 My problem is, while I am requesting any resources inside the Jsp 
 folder,
 the servlet filter's doFilter method is not executing. But in the log it 
 is
 showing that the servlet filter's init method is executed correctly.


How do you know that the doFilter method isn't executing?  The first thing I 
would try is to create a dummy JSP page in the Jsp folder that looks 
something like:
html
head/head
body
pre
% (new Exception()).printStackTrace(out); %
/pre
/body
/html

If your Filter shows up in the stack trace, then it is being called, and the 
problem is in the Filter.


 Can anyone help me to figureout the problem ? Or suggest any solution ?
 Thanks a lot in advance.


In general, adding parameters in a Filter is a lot of work with Tomcat, 
since Tomcat will parse the parameters only once at a place that is in 
general hard to predict.  Usually you have to override all of the parameter 
related methods in your HttpServletRequestWrapper to make certain that they 
show up in the target servlet.
 Manoj.

 -- 
 View this message in context: 
 http://www.nabble.com/Tomcat-6-and-Servlet-filter-problem-tp17337357p17337357.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to change http://107.105.13.1/webapp/ into http://www.mydomain.com/webapp/

2008-05-20 Thread ryan webb
*Mr. David,*

Thank you for your kind reply.
I think I may have solved my problem. I have downloaded an open source
program
called Dual Server. It is DHCP + DNS server software. In configurations I
just resolved
IP to Name. Now I am able to ping www.mydomain.com from a remote computer.

God bless.

On Tue, May 20, 2008 at 5:57 PM, David Smith [EMAIL PROTECTED] wrote:

 You may not have to go through all that trouble.  Check with the name
 registration service you got your domain name from -- they may have DNS
 service.

 --David


 ryan webb wrote:

 Mr. David,

 Thank you very much for your kind reply. I've got a feeling that this is
 not
 Tomcat related.
 I think I will try to setup a DNS server. For this.

 God bless.

 On Mon, May 19, 2008 at 5:46 PM, David Smith [EMAIL PROTECTED] wrote:



 Not a tomcat question ... you need to get your system registered with a
 DNS
 service and it will respond to the www.mydomain.com name regardless of
 service (tomcat, apache, iis, ssh, sftp, etc., ...).

 --David

 ryan webb wrote:



 Hello,

 How to change http://107.105.13.1/webapplication/ into
 http://www.mydomain.com/webapplication/
 in tomcat? If not Tomcat related please let me know...(give me tips or
 anything)

 Thank you =)





 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]










 --
 David Smith
 Network Operations Supervisor
 Department of Entomology
 Cornell University
 2132 Comstock Hall
 Ithaca, NY 14853
 Phone: (607) 255-9571
 Fax: (607) 255-0940



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
warmest regards,
Ryan Webb - Philippines

email: [EMAIL PROTECTED]


How to make my web application the ROOT application

2008-05-20 Thread ryan webb
Hello,

I am using Tomcat 6.0.14.
I renamed the original ROOT folder to adminstuff and I made my web app as
the ROOT.

I checked by typing the *http://localhost/* and I saw my web application. =)
Now when I try to access *http://localhost/adminstuff/* It displays the
Tomcat Console, however when I click Status OR Tomcat Manager.
Tomcat displays, HTTP status 404 the requested resource is not available.

I need to make my web app function as ROOT while maintaining the access to
the Tomcat console so I can still administer the site.

Any help is greatly appreciated. (web sites, etc)
-- 
warmest regards,
Ryan Webb - Philippines

email: [EMAIL PROTECTED]


Re: Tomcat 6 and Servlet filter problem

2008-05-20 Thread ManojS

Bill,

Thank you for the reply. I created a sample web app with one JSP and a
filter, in the same way you did with dummy JSP. It is working. So, what you
said will be correct, the problem is in the filter.

How I know that the doFilter method is not executing is, while analyzing the
filter class provided by a third-party vendor, I could see some log4j info
messages are putting from the doFilter method, which is not printing in my
tomcat log.

Manoj.


Bill Barker-2 wrote:
 
 
 How do you know that the doFilter method isn't executing?  The first thing
 I 
 would try is to create a dummy JSP page in the Jsp folder that looks 
 something like:
 .
 If your Filter shows up in the stack trace, then it is being called, and
 the 
 problem is in the Filter.
 
 In general, adding parameters in a Filter is a lot of work with Tomcat, 
 since Tomcat will parse the parameters only once at a place that is in 
 general hard to predict.  Usually you have to override all of the
 parameter 
 related methods in your HttpServletRequestWrapper to make certain that
 they 
 show up in the target servlet.
 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-6-and-Servlet-filter-problem-tp17337357p17356252.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JNDI Connection Pooling

2008-05-20 Thread Hanmay Udgiri
Hi
I am currently using connection pooling in tomcat.
The code is as below
I have a context.xml.default placed in Tomcat install
directory/conf/[enginename]/[hostname]/ file which has below code.
Context
Resource
  name=jdbc/mylogger
 auth=Container
 factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
 type=javax.sql.DataSource
 removeAbandoned=true
 maxActive=20
 maxIdle=10
 maxWait=-1
 removeAbandonedTimeout=60 /
/Context

Where as in Java code i am setting the values of Userd,pwd driverclass and
URL.
*My question here is Is there any effect,If I am not specifying the these
values in context.xml.default???*

Context initContext = new InitialContext();
Context envContext = (Context) initContext.lookup(java:comp/env);
DataSource ds = (DataSource) envContext.lookup(jdbc/mylogger);
((org.apache.tomcat.dbcp.dbcp.BasicDataSource) ds).setUsername(sUserID);
((org.apache.tomcat.dbcp.dbcp.BasicDataSource) ds).setPassword(sPassword);
((org.apache.tomcat.dbcp.dbcp.BasicDataSource)
ds).setDriverClassName(jdbcDriverClass);
((org.apache.tomcat.dbcp.dbcp.BasicDataSource)
ds).setUrl(jdbcDriverConnectURL + dbServiceName);
dbConnection = ds.getConnection();


-- 
Thanks and Regards
Hanmayya Udgiri