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 02:34:39 GMT
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.

-Tim

David Orriss Jr wrote:
> HELP!
> 
> Now that I have that out of the way....
> 
> I have a filter that needs to add to the incoming request a header (let's say
> it's called XUserName) if
> it's not already in the request header.  I can't for the LIFE of me figure out
> how to do it.
> 
> Can someone throw me a bone here?!?!?  Thanks!
> 
> --
> 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>


Mime
View raw message