tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: filters - need to ADD a header to incoming request
Date Sat, 11 Jan 2003 13:31:18 GMT
If you need to set the Header on response you can have your servlet/JSP 
do that.

Otherwise, your filter can call response.setHeader(...).

-Tim

David Orriss Jr wrote:
> Another Q..
> 
> Wouldn't I *also* have to extend getHeaderNames so that the new request header
> would *know* about
> the name *as well as* the value to be returned?
> 
> Thanks again Tim.
> 
> On Friday, January 10, 2003 6:34 PM,
> Tim Funk <funkman@joedog.org> wrote:
> 
> 
>>Create a class which extends HttpServletRequestWrapper and extend
>>getHeader and getHeaders
>>
>>In your filter, you would create your subclassed
>>HttpServletRequestWrapper and then call:
>>doFilter(yourWrappedHttpServletRequestWrapper , response)
>>
>>HttpServletRequestWrapper is part of the Servlet 2.3 API. See the
>>javadocs on how to use it.
>>
> 
> 
> 
> --
> David Orriss Jr.
> dave@davenet.net
> http://www.davenet.net
> Want ICQ/AIM/MSN ID's? Just Ask...
> Linux - Chicken Soup for the Unix Soul
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message