https://issues.apache.org/bugzilla/show_bug.cgi?id=45014

--- Comment #17 from mr.oliver.hernan...@gmail.com ---
I tend to agree more with Christopher, mainly because of this section of the
javadoc for the Valve interface that is misleading:

"Consume bytes from the input stream associated with the Request, unless it is
completely generating the response, **OR WRAPPING THE REQUEST** before passing
it on."

When I read that, I had high hopes of implementing a custom valve easily.  Then
it was surprising that I could only find one example, Christopher's, of how to
wrap the request when a valve needs to consume data from the input stream, and
that Tomcat did not provide any wrapper class.  So I refactored an example
servlet filter from
http://architects.dzone.com/articles/debugging-soap-logging, and got it to work
as a valve.  The tricky part was figuring out that the HttpServletRequest is
"doubly" wrapped inside the org.apache.catalina.connector.Request class.

If the convenience of a built-in wrapper class will not be added, hopefully the
attached project will suffice for any others needing to do the same thing we
did.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to