DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=40860>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40860 Summary: Tomcat loses request parameters Product: Tomcat 5 Version: 5.5.9 Platform: PC OS/Version: Windows XP Status: NEW Severity: critical Priority: P2 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Hi, Im having a problem with parameters loses in tomcat. Its an intermittent problem. That occurs when I do some ajaxs request and then I do one or more form submissions. I put the tomcat in debug mode and I observed the class CoyoteAdapter the method service(). There exists a request variable (CoyoteRequest type) that has a protected variable requestParametersParsed that is a flag to parse or not parse the parameters of a post or get. In the end of the method exists a finally clause that force the request variable to do a recycle. The recycle forces the requestParametersParsed variable to change to false. Then in the next utilization of the class the parameters will be parsed again. The problem that Ive found is in some situations (as described at the start) the requestParametersParsed variable is true and the parameters are not parsed. The consequence of this is that in my servlet when I ask request.getParameter( ) and it returns null but in my query string or in my post data has the parameter. The prove of that is when I ask request.getQueryString() and it returns a not empty string with my parameter. Ex: request.getQueryString() = servlet?param=x request.getParameter(param) = null See a pierce of the method service of CoyoteAdapter: public void service(Request req, Response res) throws Exception { try { // Parse and set Catalina and configuration specific // request parameters if ( postParseRequest(req, request, res, response) ) { // Calling the container connector.getContainer().invoke(request, response); } } finally { // Recycle the wrapper request and response request.recycle(); response.recycle(); } } At line if postParseRequest( the request. requestParametersParsed must be false but in some situations it is true! I cant find the cause of the problem but I found the problem. To resolve my problem I put a request.recycle(); before the line to force the requestParametersParsed variable to false. I dont want to have a tomcat modified by me. Its not good. See the post http://mail-archives.apache.org/mod_mbox/tomcat-dev/200601.mbox/[EMAIL PROTECTED] He is having the same problem. Thanks Thiago -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]