tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristján Bjarni Guðmundsson <>
Subject How can I clear response headers?
Date Tue, 14 Jan 2003 15:55:51 GMT
I have created a servlet that serves both html and images, I set the 
ContentType and everything is okay.
However I have noticed whenever I use BASIC authentication on this servlet 
Tomcat automatically adds these
to the response header:

Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT

I understand that this should be used when you are serving html so that 
its not cached, however
I would like to remove these headers when I am serving images since they 
should be cached.
But alas there is no clearHeader() only setHeader() in 
How can I do this?

 - Kristján

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message