What is the getInputStream() of ServletRequest for?

The getInputStream() can be used to retrieve the body of http post request as raw binary data by using a ServletInputStream. It works only for http post request. Either this method or getReader() may be called to read the body of post request, not both.

The getParameter() gets the value of a request parameter as a String, or null if the parameter does not exist. If you use getParameter first, you will not get inputstream by calling getInputStream or a buffer reader by getReader().

Printer-friendly version Printer-friendly version | Send this 
article to a friend Mail this to a friend

Previous Next vertical dots separating previous/next from contents/index/pdf Contents

  |   |