You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Jason Shaffer <ja...@theprairie.com> on 2000/07/21 21:46:44 UTC

Question regarding error: Response has already been committed

I receive the following error when I attempt to load Apply.jsp of the xsl
example that comes with the jakarta-taglibs nightly build. The jsp page
loads fine until it comes to the first taglib tag, and then the error
occurs. Any suggestions? Thanks.

~Jason

Error: 500
Location: /examples/jsp/Apply.jsp
Internal Servlet Error:

java.lang.IllegalStateException: Response has already been committed
	at
org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletRespon
seFacade.java:157)
	at
org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
	at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
	at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
	at java.lang.Thread.run(Unknown Source)


Re: Question regarding error: Response has already been committed

Posted by Justyna Horwat <Ju...@eng.sun.com>.
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.

Justyna
< horwat@eng.sun.com >

----- Original Message -----
From: "Jason Shaffer" <ja...@theprairie.com>
To: <ta...@jakarta.apache.org>
Sent: Friday, July 21, 2000 12:46 PM
Subject: Question regarding error: Response has already been committed


> I receive the following error when I attempt to load Apply.jsp of the xsl
> example that comes with the jakarta-taglibs nightly build. The jsp page
> loads fine until it comes to the first taglib tag, and then the error
> occurs. Any suggestions? Thanks.
>
> ~Jason
>
> Error: 500
> Location: /examples/jsp/Apply.jsp
> Internal Servlet Error:
>
> java.lang.IllegalStateException: Response has already been committed
> at
>
org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletRespon
> seFacade.java:157)
> at
> org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
> at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:160)
> at
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
> )
> at java.lang.Thread.run(Unknown Source)
>
>