The Last-Modified header is helping your server a lot, so don't just remove it. 
It allows the client to cache the contents reliably, and only update the cache 
when the server reports that the contents have changed.

For dynamically generated content, such as servlet data,  Tomcat will not 
append the Last-Modified by itself, because it does not know whether the data 
can be cached.

For 'static' content such as files (javascript, images, static html), Tomcat 
will use the files' modified date/time stamp as a reference.

I usually do the opposite as what you are requesting and go through lenghts to 
create a good last-modified for my dynamic data, so that the client can cache 
the contents and I can relieve the stress on the database backend.

So in short, no, don't mess with it.

M

> -----Original Message-----
> From: Abid Hussain [mailto:abid.huss...@dilax.com] 
> Sent: donderdag 17 december 2009 18:08
> To: users
> Subject: AW: Re: AW: RE: RE: Ignore http header if-modified-since
> 
> I used the startup parameters
> -Duser.language=en
> -Duser.region=US
> This caused Tomcat to deliver the Last-Modified in the correct format.
> 
> That solved the problem, no 404 anymore, thanks. 
> 
> So it seems to be a bug in tomcat...?
> 
> Again my other question: How can I instruct tomcat not to put 
> the Last-Modified Header into the response at all? Do I have 
> to use a filter or can it be done by configuration? Or is is 
> somehow not recommended fiddle with the headers? 
> 
> Best regards,
> 
> Abid
> 
> -----Ursprüngliche Nachricht-----
> Von: André Warnier [mailto:a...@ice-sa.com]
> Gesendet: Donnerstag, 17. Dezember 2009 15:59
> An: Tomcat Users List
> Betreff: Re: AW: RE: RE: Ignore http header if-modified-since
> 
> Abid Hussain wrote:
> > Hi,
> > 
> > this is interesting. As you see in my example (i put it 
> again below), 
> > tomcat itself delivers the Last-Modified (Do, 17 Dez 2009 11:11:29
> > GMT) in a different locale (german) as the Date Header (Thu, 17 Dec
> > 2009
> > 11:24:53 GMT).
> 
> That sounds to me like a bug.
> Maybe the easiest fix is to set an eglish-language locale 
> when you start Tomcat.
> If this is under Linux, try the following :
> - open a console window on the server and enter locale -a 
> this will give you a list of installed locales.
> Maybe do
> locale -a | grep en_
> to limit the list.
> Then, pick one of the list that contains utf8 and en, like maybe
> en_us.utf8
> Then, in the tomcat bin directory, find the script setenv.sh, 
> or create it if it does not exist, and add a line :
> export LANG=en_us.utf8
> 
> The restart Tomcat and try again.
> Do the headers now look different ?

This message and attachment(s) are intended solely for use by the addressee and 
may contain information that is privileged, confidential or otherwise exempt 
from disclosure under applicable law.

If you are not the intended recipient or agent thereof responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.

If you have received this communication in error, please notify the sender 
immediately by telephone and with a 'reply' message.

Thank you for your co-operation.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to