commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhino" <rhi...@sympatico.ca>
Subject Re: FileUpload 1.0 with Tomcat 4.1.24
Date Thu, 31 Jul 2003 15:50:31 GMT
Shaun,

The best documentation on the placement of files in Tomcat is at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html. I
found that it helped me to read that and made it clearer why certain things
were where they were.

First of all, if I were you, I wouldn't mess with the commons-logging or
other jars unless you've already messed with them and need to put things
back in their proper places. In my case, I made the mistake of assuming that
the commons-fileupload-1.0.jar should replace the older version and deleted
it. That was a big problem because Tomcat 4.1.24 apparently depends on the
older jar being there and does not accept the newer jar as a reasonable
substitute, contrary to my expectations.

This is the setup I have in my XP version of Tomcat; it works but I'm not
sure why because it doesn't *look* right to me, especially the fact that
I've got two versions of the FileUpload jar in the same directory. I think
it has a lot to do with having Eclipse 2.1.1 and Sysdeo V2.1 on my XP
system: they don't handle file placement the same as a Tomcat install
without Eclipse/Sysdeo. However, it works so I'm reluctant to mess with it
for fear of breaking my servlet again:

common\lib:
commons-collection.jar
commons-dbcp.jar
commons-fileupload-1.0.jar
commons-fileupload-1.0-beta-1.jar (!!)
commons-logging-api.jar
commons-pool.jar

server\lib:
commons-beanutils.jar
commons-digester.jar
commons-logging.jar
commons-modeler.jar

shared\lib:
commons-fileupload-1.0.jar

This is the setup I have on the Linux server. This makes a lot more sense to
me; I'm planning to make the XP setup the same the next time I feel like
messing with the configuration on the XP machine.

commons/lib:
commons-collections.jar
commons-dbcp.jar
commons-logging-api.jar
commons-pool.jar
[No copies of either version of the fileupload jar!!]

server/lib:
commons-beanutils.jar
commons-digester.jar
commons-fileupload.jar [I believe this is a very old version of the jar,
dating back to before the beta.]
commons-logging.jar
commons-modeler.jar

shared/lib:
completely empty


webapps/[myServlet]/WAR-INF/lib/:
commons-fileupload-1.0.jar

I hope this helps, even if I can't explain all of it to my satisfaction ;-)

Rhino


----- Original Message ----- 
From: "Shaun Kenny" <shaun.kenny@acadiau.ca>
To: "'Jakarta Commons Users List'" <commons-user@jakarta.apache.org>
Sent: Thursday, July 31, 2003 10:34 AM
Subject: RE: FileUpload 1.0 with Tomcat 4.1.24


> It sounds like this might be the problem; see my reply to Schalk's message
> about the location of the various .jar files in my setup.  I'm running
> Tomcat on Windows XP.
>
> Thanks!
>
> ~
> Shaun kenny
>
> > -----Original Message-----
> > From: Rhino [mailto:rhino1@sympatico.ca]
> > Sent: July 31, 2003 11:14 AM
> > To: Jakarta Commons Users List
> > Subject: Re: FileUpload 1.0 with Tomcat 4.1.24
> >
> >
> > You may be encountering a slightly different version of the
> > problem I had very recently: a version clash with FileUpload jars.
> >
> > Tomcat 4.1.24 comes with a beta version of the FileUpload
> > jar, not the 1.0 version that you may be using. I added the
> > 1.0 (June 24) version to my setup without properly handling
> > the older version of the jar and got ClassNotFoundExceptions
> > that caused me plenty of grief and confusion.
> >
> > What OS are you running? I have Tomcat 4.1.24 running
> > correctly on both Windows XP and Linux (Mandrake 9.1). I can
> > tell you what my setup is for either and you can adjust your
> > files accordingly; that should resolve the problem.
> >
> > Rhino
> >
> > ----- Original Message ----- 
> > From: "Shaun Kenny" <shaun.kenny@acadiau.ca>
> > To: "'Jakarta Commons Users List'" <commons-user@jakarta.apache.org>
> > Sent: Thursday, July 31, 2003 9:52 AM
> > Subject: FileUpload 1.0 with Tomcat 4.1.24
> >
> >
> > > Hi
> > >
> > > I've been trying to setup a web application using the Commons
> > > FileUpload
> > 1.0
> > > with Tomcat 4.1.24;  the servlet using FileUpload will
> > compile (using
> > > NetBeans 3.5) but when Tomcat processes it, a
> > ClassNotFoundException
> > > is thrown saying javax.servlet.ServletInputStream can't be found.
> > > This exception is traced to the following line: DiskFileUpload
> > > fileupload = new DiskFileUpload(); However, in the servlet, I *can*
> > > create an instance of ServletInputStream like this:
> > > ServletInputStream srvin = ServletRequest.getInputStream();
> > > This line of code compiles without problems and is
> > executed, no problem,
> > in
> > > the servlet by Tomcat.  So it seems that only the FileUpload stuff
> > > can't find the ServletInputStream class.  I've tried putting the
> > > FileUpload .jar in the WEB-INF/lib directory of the webapp,
> > as well as
> > > my
> > Tomcat/common/lib
> > > and jdk/jre/lib/ext (which Tomcat uses) directories.
> > >
> > > However, when I uninstalled Tomcat 4.1.24 and installed
> > Tomcat 4.1.18
> > > everything worked fine  without changes.
> > >
> > > Any ideas?
> > >
> > > ~
> > > Shaun Kenny
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > commons-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


Mime
View raw message