In my servlet
an exeception thrown as
org.apache.jasper.JasperException: java.lang.IllegalStateException: getOutputStream() has already been called for this response
help me to solve this problem
thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This will happen if a call is made to
ServletResponse.getWriter()when anOutputStreamhas already been created for the response. Only one ofgetWriter()orgetOutputStream()can be used to write a response body, not both.Take a look at the stack trace associated with the exception to see if this is the case. Then, if you are trying to write character data use (only)
getWriter()or for a binary response usegetOutputStream().