You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by E B <he...@yahoo.co.uk> on 2001/10/24 10:09:59 UTC

servlet upload

In my webapp under tomcat, I am using oreilly's
cos.jar for uploading files. I observe that 
repeated uploading of same file fails. ie., when
I upload a file for second time(different content,
same file name), in my servlet I am getting the
old file only. It is probably due to caching,
 does anybody know how do disable this caching ?

the files are jar files. does jvm cache them ?
or tomcat ? I see some jar cache files in the temp.
The class used to access the uploaded file is
com.oreilly.servlet.MultipartRequest


____________________________________________________________
Nokia Game is on again. 
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.

Re: servlet upload

Posted by E B <he...@yahoo.co.uk>.
 --- Bo Xu <bo...@cybershop.ca> wrote: > E B wrote:
> 
> > In my webapp under tomcat, I am using oreilly's
> > cos.jar for uploading files. I observe that
> > repeated uploading of same file fails. ie., when
> > I upload a file for second time(different content,
> > same file name), in my servlet I am getting the
> > old file only. It is probably due to caching,
> >  does anybody know how do disable this caching ?
> >
> > the files are jar files. does jvm cache them ?
> > or tomcat ? I see some jar cache files in the
> temp.
> > The class used to access the uploaded file is
> > com.oreilly.servlet.MultipartRequest
> > [...]
> 
> I use TC-4.0 + cos.jar(cos-23Jan2001.zip from
> www.servlets.com) to test
> it,
> I upload zTest.jar twice(same name, different
> content),  in
> Servlet-side, I get
> the new zTest.jar in the 2nd time.
> 


For me, the second upload works only if I 
restart tomcat. does tomcat got to do anything
with this ?


____________________________________________________________
Nokia Game is on again. 
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.

Re: servlet upload

Posted by Bo Xu <bo...@cybershop.ca>.
E B wrote:

> In my webapp under tomcat, I am using oreilly's
> cos.jar for uploading files. I observe that
> repeated uploading of same file fails. ie., when
> I upload a file for second time(different content,
> same file name), in my servlet I am getting the
> old file only. It is probably due to caching,
>  does anybody know how do disable this caching ?
>
> the files are jar files. does jvm cache them ?
> or tomcat ? I see some jar cache files in the temp.
> The class used to access the uploaded file is
> com.oreilly.servlet.MultipartRequest
> [...]

I use TC-4.0 + cos.jar(cos-23Jan2001.zip from www.servlets.com) to test
it,
I upload zTest.jar twice(same name, different content),  in
Servlet-side, I get
the new zTest.jar in the 2nd time.


Bo
Oct.24, 2001




Re: servlet upload

Posted by Pier Fumagalli <pi...@betaversion.org>.
E B at hello1790@yahoo.co.uk wrote:

> There is only one webapp.
> btw, I have some files like jar_cache22482.tmp
> Who is caching these. Is it jvm, or tomcat,
> or cos.jar ? Any idea? More over, I get these
> tmp files only with tomcat 4.

I don't know who creates them... But I noticed them too.

    Pier


Re: servlet upload

Posted by E B <he...@yahoo.co.uk>.
 --- Pier Fumagalli <pi...@betaversion.org> wrote: > E
B at hello1790@yahoo.co.uk wrote:
> 
> > In my webapp under tomcat, I am using oreilly's
> > cos.jar for uploading files. I observe that
> > repeated uploading of same file fails. ie., when
> > I upload a file for second time(different content,
> > same file name), in my servlet I am getting the
> > old file only. It is probably due to caching,
> > does anybody know how do disable this caching ?
> > 
> > the files are jar files. does jvm cache them ?
> > or tomcat ? I see some jar cache files in the
> temp.
> > The class used to access the uploaded file is
> > com.oreilly.servlet.MultipartRequest
> 
> Nope, but AFAICS, those servlets use a file system
> path, not a path relative
> to the web-application temporary path to store the
> uploaded files... Did you
> try changing the upload directory parameter to be
> different for the two
> web-applications?
> 

There is only one webapp. 
btw, I have some files like jar_cache22482.tmp
Who is caching these. Is it jvm, or tomcat, 
or cos.jar ? Any idea? More over, I get these
tmp files only with tomcat 4.




____________________________________________________________
Nokia Game is on again. 
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.

Re: servlet upload

Posted by Pier Fumagalli <pi...@betaversion.org>.
E B at hello1790@yahoo.co.uk wrote:

> In my webapp under tomcat, I am using oreilly's
> cos.jar for uploading files. I observe that
> repeated uploading of same file fails. ie., when
> I upload a file for second time(different content,
> same file name), in my servlet I am getting the
> old file only. It is probably due to caching,
> does anybody know how do disable this caching ?
> 
> the files are jar files. does jvm cache them ?
> or tomcat ? I see some jar cache files in the temp.
> The class used to access the uploaded file is
> com.oreilly.servlet.MultipartRequest

Nope, but AFAICS, those servlets use a file system path, not a path relative
to the web-application temporary path to store the uploaded files... Did you
try changing the upload directory parameter to be different for the two
web-applications?

    Pier