What is the impact of calling request.getParameter() after request.getInputStream() or request.getReader() in a servlet?

  • It will result in a compilation error.
  • It will retrieve the parameter value successfully.
  • It will return null.
  • It will throw a runtime exception.
Calling request.getParameter() after request.getInputStream() or request.getReader() will return null because the input stream or reader can be consumed only once, and they might have already been read.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *