PAROLINI Antonio
2010-03-04 15:58:00 UTC
Hello,
We are using a custom valve that scan the request parameters (POST AND GET) . If it find a parameter called "secuId" with a valide value , it set the session principals ( a kind of SSO).When this work most of the times, we have somes cases where calling the HttpServletRequest .getParameter() method within a valve has an impact to the called servlet.
Those cases are a "java.io.IOException: Connection reset by peer: Amount read didn't match content-length " for the WebObject servlet, and a EOFException in the invoker servlet in Jboss).
After some digging, I've found that calling HttpServletRequest .getParameter() does impact the request inputstream. See Craig R. McClanahan reply in this thread: http://markmail.org/message/xstjwbgz5r2ko2oe#query:+page:1+mid:xstjwbgz5r2ko2oe+state:results
So if I cannot use HttpServletRequest .getParameter() in my valve, what other option do i have ?
I've see that there is a request.getCoyoteRequest().getParameter() methode in the low level Tomcat API. Is this an option ?
Thanks in advance for your help,
Antonio
We are using a custom valve that scan the request parameters (POST AND GET) . If it find a parameter called "secuId" with a valide value , it set the session principals ( a kind of SSO).When this work most of the times, we have somes cases where calling the HttpServletRequest .getParameter() method within a valve has an impact to the called servlet.
Those cases are a "java.io.IOException: Connection reset by peer: Amount read didn't match content-length " for the WebObject servlet, and a EOFException in the invoker servlet in Jboss).
After some digging, I've found that calling HttpServletRequest .getParameter() does impact the request inputstream. See Craig R. McClanahan reply in this thread: http://markmail.org/message/xstjwbgz5r2ko2oe#query:+page:1+mid:xstjwbgz5r2ko2oe+state:results
So if I cannot use HttpServletRequest .getParameter() in my valve, what other option do i have ?
I've see that there is a request.getCoyoteRequest().getParameter() methode in the low level Tomcat API. Is this an option ?
Thanks in advance for your help,
Antonio