tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike W-M" <m...@ward-murphy.co.uk>
Subject Re: bug in Tomcat 4 or .... what?
Date Tue, 17 Dec 2002 14:21:55 GMT
>From the Servlet Spec (2.3)'s section on the getParameter() method:
<<
If the parameter data was sent in the request body, such as occurs with an
HTTP POST request, then reading the body directly via getInputStream() or
getReader() can interefere with the execution of this method.
>>
I believe there's other stuff in there too about not expecting everything to
work as normal if you go low-level messing around with the request.

Mike.

----- Original Message -----
From: "Ivan Venuti" <i.venuti@caribel.pisa.it>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, December 17, 2002 12:31 PM
Subject: bug in Tomcat 4 or .... what?


Hi,

I have a servlet that opens a DataInputStrem on the request (see below)

public void doPost(HttpServletRequest request, HttpServletResponse response)
   throws ServletException    {

 try{
   // Open the I/O streams
    DataInputStream in = new DataInputStream(request.getInputStream() );

After this pice of code I cant' access any more to the request parameters.
Infact this code:

request.getParameter("anyParameter")

retrieves ALWAYS null.
The strange thing is that this servlet was Ok for tomcat 3, but can't work
any more with Tomcat4.

Anyone can explain why opening a DataInputStream alters the
HttpServletRequest?

Thanks

-- Ivan Venuti --



--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message