>>> "Andy Mayer" <[EMAIL PROTECTED]> 20-Jul-00 12:25:47 PM >>>

>Thanks for your speedy and informative reply. I will read
>up on the  information you mention.

Read the HTTP RFC2616 - it explains everything and is very readable.


>So what is the purpose of HttpServletRequest.getInputStream()
>and what type of data it should return?

It depends on the request.

A request CAN have a request body. A request body specifies more data
to the server.

For example a POST request has a request body which contains the FORM
parameters.

A PUT request contains the file to be saved to the server.

After the container has read the header the inputstream is aligned at
the beginning of the request body so when you get it you can read the
body in whatever way you want.


In fact with a POST request the container will automatically read the
request body from the inputstream for you when you call:
 HttpServletRequest.getParameter()

The process is invisible to the user.

But sometimes you want to read a POST body yourself. Onecommon reason
is that the request is a multipart request. This happens when your
form includes a file upload button.


Nic

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to