Re: disable caching of static files in tomcat 5.5
Ive got the same problem - did anyone figure out what is happening and why tomcat is caching files behind symlinks? Epithemeus wrote: Thanks Mark. I went through the documentation but the problem persists. I am using Tomcat 6.0 and have tried including cachingAllowed=false in $CATALINA_HOME/conf/context.xml. This does not seem to work. There is no other context.xml file currently defined in directory structure anywhere. Any ideas on why this still isn't working? Thanks. Mark Thomas-18 wrote: Epithemeus wrote: Hi Joerg, I am facing the same issue with Tomcat 6.0 and caching of files. I'd really appreciate it if anyone could explain how caching could be disabled. Read the docs. I'd start with this: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/disable-caching-of-static-files-in-tomcat-5.5-tp19509596p28634513.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: disable caching of static files in tomcat 5.5
On 21/05/2010 15:22, haveaguess wrote: Ive got the same problem - did anyone figure out what is happening and why tomcat is caching files behind symlinks? This thread is 9 months old. You might consider starting a new thread, be specific about your versions platform. p Epithemeus wrote: Thanks Mark. I went through the documentation but the problem persists. I am using Tomcat 6.0 and have tried including cachingAllowed=false in $CATALINA_HOME/conf/context.xml. This does not seem to work. There is no other context.xml file currently defined in directory structure anywhere. Any ideas on why this still isn't working? Thanks. Mark Thomas-18 wrote: Epithemeus wrote: Hi Joerg, I am facing the same issue with Tomcat 6.0 and caching of files. I'd really appreciate it if anyone could explain how caching could be disabled. Read the docs. I'd start with this: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: disable caching of static files in tomcat 5.5
Thanks Mark. I went through the documentation but the problem persists. I am using Tomcat 6.0 and have tried including cachingAllowed=false in $CATALINA_HOME/conf/context.xml. This does not seem to work. There is no other context.xml file currently defined in directory structure anywhere. Any ideas on why this still isn't working? Thanks. Mark Thomas-18 wrote: Epithemeus wrote: Hi Joerg, I am facing the same issue with Tomcat 6.0 and caching of files. I'd really appreciate it if anyone could explain how caching could be disabled. Read the docs. I'd start with this: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/disable-caching-of-static-files-in-tomcat-5.5-tp19509596p24867271.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: disable caching of static files in tomcat 5.5
Epithemeus wrote: Thanks Mark. I went through the documentation but the problem persists. I am using Tomcat 6.0 and have tried including cachingAllowed=false in $CATALINA_HOME/conf/context.xml. This does not seem to work. There is no other context.xml file currently defined in directory structure anywhere. Any ideas on why this still isn't working? None. It works for me. Are you sure it is Tomcat doing the caching? Mark Thanks. Mark Thomas-18 wrote: Epithemeus wrote: Hi Joerg, I am facing the same issue with Tomcat 6.0 and caching of files. I'd really appreciate it if anyone could explain how caching could be disabled. Read the docs. I'd start with this: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: disable caching of static files in tomcat 5.5
Hi Joerg, I am facing the same issue with Tomcat 6.0 and caching of files. I'd really appreciate it if anyone could explain how caching could be disabled. Many thanks! Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joerg, Joerg Endrullis wrote: $ ln -s x.jpg a.jpg; $ wget http://localhost:8180/a.jpg?time=0; $ rm a.jpg; $ ln -s y.jpg a.jpg; $ wget http://localhost:8180/a.jpg?time=1 My brain hurts. How about: $ wget -O t0.jpg http://localhost:8180/a.jpg?time=0 $ wget -O t1.jpg http://localhost:8180/a.jpg?time=1 ...and then compare the two. You will see that both downloaded images a.jpg.1 and a.jpg.2 are equal to x.jpg, Er, where did a.jpg.1 and a.jpg.2 come from? I think you are confusing yourself with the symlinks, wget, etc. even if Tomcat does have a problem. Simplifying your process will surely help. Is a.jpg changing on the server at some point? You say this is a static resource, but you never specified that you were changing the remote file at all. When/how does that happen? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjRey0ACgkQ9CaO5/Lv0PAUvgCgi7ziGeHwW9LMGocay39egavO a4gAoLX5EmwTEcKbZnwK+bXOUl4nzEB+ =mdAN -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/disable-caching-of-static-files-in-tomcat-5.5-tp19509596p24848333.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: disable caching of static files in tomcat 5.5
Epithemeus wrote: Hi Joerg, I am facing the same issue with Tomcat 6.0 and caching of files. I'd really appreciate it if anyone could explain how caching could be disabled. Read the docs. I'd start with this: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: disable caching of static files in tomcat 5.5
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joerg, Joerg Endrullis wrote: $ ln -s x.jpg a.jpg; $ wget http://localhost:8180/a.jpg?time=0; $ rm a.jpg; $ ln -s y.jpg a.jpg; $ wget http://localhost:8180/a.jpg?time=1 My brain hurts. How about: $ wget -O t0.jpg http://localhost:8180/a.jpg?time=0 $ wget -O t1.jpg http://localhost:8180/a.jpg?time=1 ...and then compare the two. You will see that both downloaded images a.jpg.1 and a.jpg.2 are equal to x.jpg, Er, where did a.jpg.1 and a.jpg.2 come from? I think you are confusing yourself with the symlinks, wget, etc. even if Tomcat does have a problem. Simplifying your process will surely help. Is a.jpg changing on the server at some point? You say this is a static resource, but you never specified that you were changing the remote file at all. When/how does that happen? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjRey0ACgkQ9CaO5/Lv0PAUvgCgi7ziGeHwW9LMGocay39egavO a4gAoLX5EmwTEcKbZnwK+bXOUl4nzEB+ =mdAN -END PGP SIGNATURE- - 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: disable caching of static files in tomcat 5.5
- Original Message - From: Joerg Endrullis [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tuesday, September 16, 2008 1:13 PM Subject: disable caching of static files in tomcat 5.5 Hi, I have a dynamically generated image a.jpg and I want Tomcat to always deliver the current version. Unfortunately Tomcat seems to have some kind of caching of static files? Where can one disable caching of static files in Tomcat? Why do I think Tomcat has caching of static files... You can reproduce the problem as follows: - create two different images x.jpg and y.jpg - then create a symbolic link from a.jpg to x.jpg, download a.jpg, change the symbolic link to y.jpg, download a.jpg again: $ ln -s x.jpg a.jpg; $ wget http://localhost:8180/a.jpg?time=0; $ rm a.jpg; $ ln -s y.jpg a.jpg; $ wget http://localhost:8180/a.jpg?time=1 You will see that both downloaded images a.jpg.1 and a.jpg.2 are equal to x.jpg, which leads to the conclusion that Tomcat uses some kind of caching. (in order to reproduce the problem, the commands have to be executed fast after each other, if you wait 5 seconds before the last wget, then Tomcat returns the correct image) Btw. it does not help to attach an artificial time-stamp to the URL: $ ln -s x.jpg a.jpg; $ wget http://localhost:8180/a.jpg?time=0; $ rm a.jpg; $ ln -s y.jpg a.jpg; $ wget http://localhost:8180/a.jpg?time=1 will produce identical images a.jpg?time=0 and a.jpg?time=1. Any help would be appreciated. Thanks, Joerg Joerg, not sure here... but this is what I think is happening... The images are been delivered to the page using ETAGS... basically they look at the file on disk size and modified time... If that changes they send it, if it does change it, nothing is sent to the browser... It seems to imply that symboloc links are not changing these links... but I dont think linux is that stupid... So I think its just the browser hanging on so try this... in the main JSP servlet/html page do this... response.setHeader(Cache-Control, no-cache); response.setHeader(Expires, Sun, 15 Jan 1998 17:00:00 GMT); response.setHeader(Pragma, no-cache); response.setDateHeader(Max-Age, 0); In html this is all meta tags... just look em up... Now you saying to the browser do not cache this page... and I'm hopng thats the images as well, and that ETAGS are not an issue with links... ie if it doesnt work... linux is showing tomcat the same modified time (doubtful) or tomcat can detect the change of the file, and does not update the etag stuff... more likely... hopefully telling the whole page not to cache gets around it... You have to do it all those ways because MS did their own thing... as usual ;) Have fun... --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]