tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike W-M" <>
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.


----- Original Message -----
From: "Ivan Venuti" <>
To: "Tomcat Users List" <>
Sent: Tuesday, December 17, 2002 12:31 PM
Subject: bug in Tomcat 4 or .... what?


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

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

   // 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:


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


-- Ivan Venuti --

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message