setting headers to servlet-response

Stephan Reichelt <[email protected]>
Newsgroups gmane.comp.java.strutscx.user
Organization FhG IVI
Message-ID <[email protected]>
Hello,

we search for some way in our application to avoid caching of pages 
received by the browser.

Therefore I wanted to set the Expires header to the current time:

response.addDateHeader("expires", cal.getTimeInMillis());

Neither with changing the name ("expires" vs. "Expires") nor using the 
setDateHeader method we had success. The header reches the client (e.g. 
Mozilla shows the header, but does not recognize it as "the real 
Expires-header". When using a telnet client and doing some

GET /our/path/start.do HTTP/1.1
Host: localhost

the received header is:
Expires: Thu, 01 Jan 1970 00:00:00 GMT

the epoch ... :((

I did not found any point where I could start searching for the problem. 
The output of logger.debug(cal.getTimeInMillis()) gives the correct 
time, as anticipated... :(

does anyone has an idea how to figure out the problem???


MfG,
   Stephan R.
-- 
   [email protected]
   Fax: +49 89 1488 200006    counter: 299931
   GPG-ID: 0xFA7A3C16  encrypted mail welcome
                     carpe diem, never regret



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.