-
1. Re: Problem with Jboss(Tomcat) caching from my file system
raist_majere Sep 11, 2007 2:30 PM (in response to boris_br)This is working for me:
//HTTP 1.0: response.setHeader("Expires","0"); response.setHeader("Pragma","no-cache"); //HTTP 1.1: response.setHeader("Cache-Control","must-revalidate");
But what I think is a problem with your webapp... How does your application change this page? It's an HTML, so either it's a "shadowed" JSP (you have some mapping converting it to a JSP) or you are uploading an HTML file directly into your webapp deployed directory. Please tell us more if still having this problem -
2. Re: Problem with Jboss(Tomcat) caching from my file system
boris_br Sep 12, 2007 3:38 AM (in response to boris_br)Thank you for your reply.
Our application hold the different document in html or pdf form in database. So after user request I only copy/replace the existing file in the deploy\..\docs\ directory and want to show to the user everytime only the actuall file - is is very importent.
I think you response.set header is almost the same as mine. Do you have another decisions? Thank you.
By -
3. Re: Problem with Jboss(Tomcat) caching from my file system
raist_majere Sep 12, 2007 8:55 AM (in response to boris_br)How do you show to the user the available files? What are the URLs like to get these files? Maybe your problem is with this second thing. If you give URLs directly to the files, they may be cached by the browser.
-
4. Re: Problem with Jboss(Tomcat) caching from my file system
boris_br Sep 12, 2007 9:17 AM (in response to boris_br)Hi,
my URL looks like that:
*********************
/applicationname/docs1/1001.html?dsessionId=4B4F042B3CCD78F6DC4A5381FBA09D2E&now=10171444&Uuid=da6e6f4d-d78b-43a1-a031-65312a63b69e
**********************
You can see that I send unique UUID with every request.
I think it is not a caching from browser because I activated the http-Logging and in heer is the part of the output from localhost_access_log.2007-09-10.log:
*********************
127.0.0.1 - - [10/Sep/2007:17:03:15 +0200] "GET /applicationname/docs1/1001.html?dsessionId=4B4F042B3CCD78F6DC4A5381FBA09D2E&now=10171444&Uuid=da6e6f4d-d78b-43a1-a031-65312a63b69e HTTP/1.1" 200 1862
*********************
I heard that the return code = 200 mean no caching from browser. -
5. Re: Problem with Jboss(Tomcat) caching from my file system
raist_majere Sep 12, 2007 2:16 PM (in response to boris_br)return code 200 means OK in HTTP protocol. Is a server result code, nothing to do with client.
Better copy the "conflicting" code here (using code tags) and tell us if you're using the default deployment, basic, full or a modified one...