tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Øvsttun (AS/ETO) <>
Subject RE: Removal of headers in HttpServletResponse object
Date Fri, 21 Jul 2006 06:41:12 GMT
Hi Martin,

Thanks for the feedback but I am afraid that the example did not really solve my problem.

As far as I can understand your example only includes adding a header not removing.
It also relies on the standard HttpServletResponse methods which does not include a removeHeader

Geir :-)

-----Original Message-----
From: Martin Gainty [] 
Sent: 20. juli 2006 19:25
To: Geir Øvsttun (AS/ETO)
Subject: Re: Removal of headers in HttpServletResponse object


I found a complete Tomcat Valve example here at
where the invoke() method would modify the outgoing response to omit the Header ..

Sverige Altid-
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: "Geir Øvsttun (AS/ETO)" <>
To: <>
Sent: Thursday, July 20, 2006 6:09 AM
Subject: Removal of headers in HttpServletResponse object

Hi ,

For fast prototyping and test purposes I am trying to simulate the responses of various devices
(web cameras with embedded web servers) by using Tomcat.
The problem I have is that Tomcat (5.5.17) seems to add by default the following headers to
the HTTP/1.1 200 OK response:

Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 82
Date: Thu, 20 Jul 2006 09:53:33 GMT

These headers are not included by the various embedded devices I am trying to simulate.

As the HttpServletResponse class does not have a removeHeader method (only add... And set...)
I am stuck.

I have tried to look into the use of Filters but to my understanding the Filter also relies
on the methods of 
HttpServletResponse for manipulation of the response object.

Can Tomcat in any way be configured to not include the headers ?
Are there any other way to remove the headers ?

Geir :-)  

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message