Hi
If all else fails, try to add a timestamp variable to the link. By
dynamically adding a unique timestamp like
http://foo.com/document.jsp?time=[timestamp] the page will not be
cached.


Regards
Roland Rabben




> -----Original Message-----
> From: Paul Hamer [mailto:[EMAIL PROTECTED]
> Sent: 1. oktober 2006 16:16
> To: 'Tomcat Users List'
> Subject: RE: HOWTO disable Tomcat from caching dynamic picture
> 
> Hey John,
> 
> Tomcat does not do any caching. Try adding these HTTP headers:
> 
> response.addHeader("Pragma","no-cache"); // HTTP/1.0
> response.addHeader("Cache-control","no-cache, no-store"); // HTTP/1.1
> 
> That's the official way. However, due to an IE4-IE6 bug, you might
want to
> replace the second one by:
> 
> response.setHeader("Cache-control","max-age=0"); // HTTP/1.1
> 
> More info see:
> http://forum.java.sun.com/thread.jspa?threadID=233446&start=0
> 
> Worked fine for me!
> 
> Regards,
> Paul Hamer
> 
> management & development
> [EMAIL PROTECTED]
> 
> toHAVE websolutions
> www.tohave.nl
> [EMAIL PROTECTED]
> 
> > -----Original Message-----
> > From: John Mok [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, 01 October 2006 02:46
> > To: users@tomcat.apache.org
> > Subject: HOWTO disable Tomcat from caching dynamic picture
> >
> > Hi,
> >
> > I am using Tomcat 5.5.17 with Sun JDK 5.0 Update 7 on CentOS
> > 4.3. I have
> > a servlet, namely BMPImageViewer, which retrieves a BMP image from
> > database with conversion into PNG format via JAI. The servlet is
> > referenced in XSL-FO for PDF generation.
> >
> > My problem was that the image did not change even the image
> > in database
> > updated. I checked that the servlet BMPImageViewer worked
> > correctly and
> > loaded the correct image every time. The servlet outputs the
> > image with
> > header set to "no-cache" :-
> >
> > response.setHeader("Pragma", "no-cache");
> > response.setHeader("Expires", -1);
> >
> > How to force Tomcat not to cache the dynamic image? and load
> > a new one
> > every time? I hope someone could help me out and advise how
> > to configure
> > Tomcat not to cache dynamic image.
> >
> > Thanks a lot.
> >
> > John Mok
> >
> >
---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to