tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31523] - Request parameters are not always passed to HttpServlet.service
Date Mon, 04 Oct 2004 11:24:50 GMT
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=31523>.
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=31523

Request parameters are not always passed to HttpServlet.service





------- Additional Comments From emond@emaxx.nl  2004-10-04 11:24 -------
As I said before, I read all request parameters at the entry of the service 
method. This is before any cocoon code is run. The incomming HttpServletRequest 
is a new object (atleast, I assume, these objects are not recycled). This means 
non of the Cocoon parts has been able to toutch the object before I dump the 
parameters. Even when some part of Cocoon turns out not to be thread safe, this 
still shouldn't affect the request object. 
 
Is my assumption correct that the following piece of code should dump all 
request parameters (and trigger the lazy parameter evaluation when needed)? 
 
public void service(HttpServletRequest req, HttpServletResponse res) 
    throws ServletException, IOException { 
  java.util.Enumeration enu = req.getParameterNames(); 
  System.out.println("cocoon entry:"); 
  enu = req.getParameterNames(); 
  while (enu.hasMoreElements()) { 
    String name = (String) enu.nextElement(); 
    System.out.println(name+": "+req.getParameter(name)); 
  } 
  ... Lots of cocoon related stuff 
}

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


Mime
View raw message