Roel, On 12/9/15 8:03 AM, Roel Storms wrote: > The real requirement is being able to process the body of a request in a > Valve without restricting the servlet to call request.getInputStream, > getReader and getStream. I have tried by wrapping the request but some > behavior can't be masked. It is also much more simple to implement by just > extending the Request class and using this in Connector.createRequest(). > > So the actual requirement is a Valve wanting to process the body but still > allowing the target application to call whatever processing method they > chose. When the Valve would chose to process the body by calling > Request.getInputStream(). The servlet wouldn't be able to call getReader or > getParam anymore. I would like my Valve to be transparent in that sense.
What you want to do can be done with a Valve as long as you don't mind a bit of typing. See this thread where I built pretty much exactly what you're requesting: http://tomcat.markmail.org/thread/fumpfuspt7a3nesz I implemented mine as a Filter, not as a Valve. There's no need to go writing your own Request implementation. -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org