tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhino" <>
Subject Re: Weird Problems installing servlets in Tomcat
Date Tue, 22 Jul 2003 16:59:26 GMT

----- Original Message ----- 
From: "John Turner" <>
To: "Tomcat Users List" <>
Sent: Tuesday, July 22, 2003 10:22 AM
Subject: Re: Weird Problems installing servlets in Tomcat

> Rhino wrote:
> >
> > I'm still relatively new to Tomcat and Linux so I may be asking stupid
> > questions; if so, I don't mean to be. I'm just trying to understand
> > going wrong. It's very possible that I've made some kind of newbie
> > I'm just trying to understand what it is and how to fix it.
> Move the JAR file to where it should be, like $CATALINA_HOME/lib or
> $CATALINA_HOME/common/lib as described in the ClassLoader HOWTO.

I have had no luck getting Tomcat to load War files yet; I've been trying
various things for hours but no joy yet....

First of all, I made a big mistake when I told you earlier that
commons-fileupload-1.0.jar was in /var/tomcat4/server/lib, AKA
$CATALINA_HOME/server/lib. I just plain looked at the wrong darned line of
the screen. In fact, commons-fileupload-1.0.jar was in
$CATALINA_HOME/common/lib (and still is). I think that's where I want it,
right? Tomcat uses FileUpload itself doesn't it? Otherwise I would put it in
the /shared path, right?

I've been reading the HOWTO that you cited and I'm getting a bit confused;
it seems to contradict both itself and you! According to the Quick Start
section, JAR files containing resource which are to be shared across all web
applications are to be placed in $CATALINA_HOME/shared/lib. Later, in the
detailed description of the class loaders, it says that JAR resources which
need to be shared across all web applications (except Tomcat itself) should
be put in $CATALINA_HOME/lib, not shared/lib. I suspect that the Quick Start
is wrong because it I don't even have a $CATALINA_HOME/shared/lib on the
server. That assumption would also agree with your remarks which say to use
$CATALINA_HOME/lib. The only problem is that I don't have a
$CATALINA_HOME/lib either! (We are using Tomcat 4.1.24 on Linux Mandrake 9.1
and running Tomcat as a service.) Anyway, this is probably all a bit off
point anyway; I should have commons-fileupload-1.0.jar in /common/lib,

There's one other thing that I didn't post earlier which I'm starting to
suspect is fairly critical. When I first copied commons-fileupload-1.0.jar
into the $CATALINA_HOME/commons/lib, I noticed that there was already a jar
in that directory with the name commons-upload.jar. I assumed that was an
old version of the jar and deleted it.

The reason I think this might have been a major mistake was that nothing
worked right from that point on. I have been unable to install a single WAR
file, even one whose servlets did no FileUploads, since the point where I
copied commons-fileupload-1.0 jar into /commons/lib and deleted the
commons-fileupload.jar. Could that really be the cause of my problems? If
yes, what do I do about it? Do I need to find a copy of
commons-fileupload.jar and put it into /commons/lib? If yes, what do I do
about commons-fileupload-1.0.jar? Should it be in /common/lib as well? But
won't that cause conflicts?

I hope this note isn't too incoherent; I'm fairly confused right now and may
not be making quite as much sense as I would like....


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message