tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: HOWTO disable Tomcat from caching dynamic picture
Date Sun, 01 Oct 2006 13:46:35 GMT
left out setDateHeader 

response.setDateHeader("Expires", 1);
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");

Not much to recommend until we see the code which does the conversion (assuming JPG to PNG)

Anyone else ?
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "david.delbecq" <david.delbecq@oma.be>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Sunday, October 01, 2006 5:47 AM
Subject: Re: HOWTO disable Tomcat from caching dynamic picture


> Tomcat does not cache output of a servlet. By definition the output of a
> servlet is dynamic and as such has no reason to be cached. The image is
> probably cached somewhere else...
> John Mok a écrit :
>> 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: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>
Mime
View raw message