Or in some cases if there is an error.
If an exception in thrown in the User object e.g. Tomcat tries to redirect
the request to the errorpage, but if some part of the request is already
sent to the browser that request fails.
You can try to catch the exception yourself in the JSP
or try with a larger buffer for the page.
Geert Van Damme
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of horwat
> Sent: vrijdag 11 mei 2001 22:44
> To: [EMAIL PROTECTED]
> Subject: Re: response already commited
>
>
> You can get an IllegalStateException when you attempt to grab the output
> stream after something else has written to it.
>
> For example if you use jsp:include, the outer jsp has already called
> getWriter() on the response object, the inner jsp will get an
> IllegalStateException if it calls getOutputStream() on the same response
> object.
>
> Justy
>
> ----- Original Message -----
>
> > Hello,
> >
> > I' try to create an Object in a JSP :
> >
> > <%
> > User tUser = new User();
> > .....
> > %>
> >
> > When i run this JSP on Tomcat i receive this error message :
> >
> > Error: 500
> > Location: /odata1/Registration.jsp
> > Internal Servlet Error:
> > java.lang.IllegalStateException: Response has already been committed
> > java.lang.Throwable(java.lang.String)
> > java.lang.Exception(java.lang.String)
> > java.lang.RuntimeException(java.lang.String)
> > java.lang.IllegalStateException(java.lang.String)
> > void
> > org.apache.tomcat.core.HttpServletResponseFacade.sendError(int,
> > java.lang.String)
> > void
> >
> org.apache.jasper.runtime.JspServlet.unknownException(javax.servle
> t.http.Htt
> pServletResponse,
> >
> > java.lang.Throwable)
> > void
> >
> org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.Ht
> tpServletR
> equest,
> >
> > javax.servlet.http.HttpServletResponse)
> > void
> > javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> > javax.servlet.ServletResponse)
> > void
> >
> org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tom
> cat.core.R
> equest,
> >
> > org.apache.tomcat.core.Response)
> > void
> >
> org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.co
> re.Request
> ,
> >
> > org.apache.tomcat.core.Response)
> > void
> >
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnec
> tion(org.a
> pache.tomcat.service.TcpConnection,
> >
> > java.lang.Object [])
> > void org.apache.tomcat.service.TcpConnectionThread.run()
> > void java.lang.Thread.run()
> >
> >
> > any explication ?
> >
> > Patrick PIERRA
> >
> >
> ==================================================================
> =========
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
> ==================================================================
> =========
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets