request.setHeader in servlet filter
Hi there,
I am working on servlet filter to filter HttpServletRequest before sending it to the original servlet.
The original servlet expects some content posted in the body of HttpServletRequest object.
In my servlet filter, I need to modify this content (already done) and then doFilter to the origin.
And here is the problem:
The original servlet uses HTTP header's content-length value to read the entire content posted. But if I modify this content in my filter, it will never get correct content of the request.
Unfortunately the original servlet is black boxed and there is no way to modify it.
Is there any way to modify HTTP headers of HttpServletRequest in servlet filter?
Thank you for any suggestions,
mato_v

