Hi guys,

I`m new to web-developing. Curruntly I`m battling with JSP and Databases.
I `m using Eclipse as developing environment and I started receiving following error, which doesn`t tell me anythnig:

HTTP Status 500 -
type Exception report

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.IllegalStateException: getOutputStream() has already been called for this response
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:413)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.lang.IllegalStateException: getOutputStream() has already been called for this response
org.apache.catalina.connector.Response.getWriter(Response.java:610)

(and so on)


So I guess the problem comes from the server I`m using (Tomcat 6.0). Previously it ran without a problem, and suddenly started giving this error. I`ve restarted it and nothing changes.


Any suggestions ?

Oh, I forgot to tell you, that the information in the input fields is successfully saved in the database in spite of this error.

We need to see your JSP or servlet code to be able to pin point anything. Also you have edited out the part of the exception stack trace which would have pointed to the exact line on which the servlet for your JSP encountered the error.

My blind guess is you have called response.getOutputStream() somewhere inside your JSP.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.