If, using "getInputStream()" to get an "Inputstream" to retrieve data that be sent with "POST" format, then...
(1) How to get each item value ? Refer to following example please:
<FORM METHOD="POST" ACTION="test">
<INPUT TYPE=TEXT NAME="TXT1">
<INPUT TYPE=TEXT NAME="TXT2">
....
</FORM>
All thoses items("TXT1","TXT2"...) and their values are read from "input stream", but, how to get their value ? Read and check everyone ?
(2) What does mean "read binary data from the input stream. " ? It can also be done with "getParameter()" , right ?
Main Topics
Browse All Topics





by: k.jonesPosted on 2000-11-05 at 17:41:40ID: 5112822
ITman,
The getInputStream() method provides additional capability. One may want to do more that get values of HTML FORM data. It can be used,
1) To pass a chained servlet the response body from the previous servlet.
2) To pass an HTTP servlet the content associated with a POST request.
3) To pass a non-HTTP servlet the raw data sent by the client.
E.g., One could use getInputStream() to retrieve the input stream as a ServletInputStream object to read binary data from the input stream.
Cheers,
Ken Jones