You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "uzeb@voila.fr" <uz...@voila.fr> on 2001/06/14 16:31:44 UTC

my stupid servlet does'nt work :(

I use a Apache-tomcat configuration and I made a stupid servlet that print 100 helloworlds on my browser.
when I call it with 
http://localhost:8080/examples/servlet/HelloWorld (via tomcat)
I really have 100 helloword (trust me it's a bit long to count them :) )
But 
when I call it with 
http://localhost/examples/servlet/HelloWorld (via apache)
I only have around 40 and this HTML page is not finished.
I don't have any </HTML> at the end.

is there a timeout between Apache or Tomcat !???!
any other ideas???

__________________________________________________
Voila vous propose une boite aux lettres gratuite sur Voila Mail:
http://mail.voila.fr




RE: Order of libraries in CLASSPATH question?

Posted by George McKInney <ge...@tantalus.com>.
> -----Original Message-----
> From: Brett G. Palmer [mailto:pbganjanette@qwest.net]
>
> We are having random problems with some of our application
> libraries when we
> deploy them in their separate contexts.  The question I have
> is what is the
> default behavior for Tomcat to load class libraries into its
> CLASSPATH.  Do
> libraries from the $TOMCAT_HOME/lib directory get added to
> the CLASSPATH
> before libraries for a particular web application (e.g.
> webapps/someapp/WEB-INF/lib/*) or viceversa.
>
I believe that the order is:
"system classes" including installed extensions.
.zips/.jars in $TOMCAT_HOME/lib
WEB-INF/classes
WEB-INF/lib/*.jar

> I have also seen problems where my web application can't find
> a particular
> library when it is added to the "webapps/someapp/WEB-INF/lib"
>  but it can
> find it when it is added to the $TOMCAT_HOME/lib directory.
> This particular
> problem occurred when I tried to use Oracle's jdbc drivers (i.e.
> classes12.zip).  I would get class not found errors when the
> classes12.zip
> file was located in the WEB-INF/lib directory, but the errors
> went away when
> I used the $TOMCAT_HOME/lib directory.
>
if they were still named *.zip, the classloader ignores them. We just have
Ant rename them to *.jar before deploying to webapps/<ourapp>/WEB-INF/lib,
and they work fine.

> What is the recommended place for putting class libraries in
> the classpath
> for Tomcat?  Any suggestions would be greatly appreciated.

If there is any chance that the Tomcat installation will be hosting more
than one webapp, I strongly suggest that you put the libraries for each
webapp in its own WEB-INF/lib. Clashing jars do not make pretty sounds.

>
> Thanks in advance,
>
>
> Brett
>
>


George McKinney, Developer
Tantalus Communications Inc.
500-1122 Mainland Street
Vancouver, BC, Canada V6B 5L1
george@tantalus.com

Direct  604.726.6753
Main    604.609.0700
Fax     604.609.0705

"The Oracle Experts"
www.tantalus.com



Order of libraries in CLASSPATH question?

Posted by "Brett G. Palmer" <pb...@qwest.net>.
We are having random problems with some of our application libraries when we
deploy them in their separate contexts.  The question I have is what is the
default behavior for Tomcat to load class libraries into its CLASSPATH.  Do
libraries from the $TOMCAT_HOME/lib directory get added to the CLASSPATH
before libraries for a particular web application (e.g.
webapps/someapp/WEB-INF/lib/*) or viceversa.

I have also seen problems where my web application can't find a particular
library when it is added to the "webapps/someapp/WEB-INF/lib"  but it can
find it when it is added to the $TOMCAT_HOME/lib directory.  This particular
problem occurred when I tried to use Oracle's jdbc drivers (i.e.
classes12.zip).  I would get class not found errors when the classes12.zip
file was located in the WEB-INF/lib directory, but the errors went away when
I used the $TOMCAT_HOME/lib directory.

What is the recommended place for putting class libraries in the classpath
for Tomcat?  Any suggestions would be greatly appreciated.

Thanks in advance,


Brett