So I set the headers commented as 1 and 2. The first one - Refresh - works prefectly. The second one - Expires, doesn't get set, the req.getHeader (3) returns null. I also tried setting it up with the setHeader method, using a String with a date format copied from the RFC - 'Thu, 01 Dec 1994 16:00:00 GMT'. Again, no result. And there is one more thing - charset set with setContentType works perfectly. Although when I want to change the 'accept-charset' using the setHeader, nothing happens. I am working on Tomcat 5.0.16. Well, I'd be grateful for pointing out what is the problem. Why some headers (Refresh) get set, while the other (ex. Expires, Accept-Charset) don't. rgds. miro.
It looks a lot as if you are setting headers in the response, and somehow expecting those headers to appear in the request. They are quite different things. Request headers are information sent from the browser for use by the server. Response headers are information sent from the server for use by the browser. Why would you expect them to be the same?