How to insert a custom http header in a servlet filter?
843841Aug 9 2005 — edited Aug 11 2005I need to insert a custom header (not an attribute) into the http request as it is processed by my servlet filter.
I've read in a few locations that you can achieve this by wrapping the request object in a class implementing HttpServletRequestWrapper and the calling:
chain.doFilter(new MyRequestWrapper((HttpServletRequest) request), response);
I have yet to find any information regarding how to insert the custom header request using the wrapper. If anyone has any idea how to achieve this it would be greatly appreciated.
H