It sounds like you have a servlet which is doing response.getWriter() (or
response.getOutputStream()), then including or forwarding to another servlet
which does it again and that isn't allowed - you can only get the
outputStream once per response.
>From: Amar Das <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Error! Please help
>Date: Wed, 17 Jan 2001 12:32:06 -0500
>
>My jsp page queries the database and formats the results returned. I am
>using Tomcat Version 3.1 and IE 5 on a Win2K platform. I get 1st couple
>of rows back in the formatted page and then receive the following error at
>the bottom of the same page.
>
>Error: 500
>Location: /dod/jsp/jcsdict/AdvancedFirstResults.jsp
>Internal Servlet Error:
>java.lang.IllegalStateException: Cannot forward as OutputStream or Writer
>has already been obtained
> at
>org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:130)
> at
>org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:357)
> at
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:381)
> at
>jsp.jcsdict._0002fjsp_0002fjcsdict_0002fAdvancedFirstResults_0002ejspAdvancedFirstResults_jsp_17._jspService(_0002fjsp_0002fjcsdict_0002fAdvancedFirstResults_0002ejspAdvancedFirstResults_jsp_17.java:459)
> at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
> at
>org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
> at
>org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
> 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(HttpConnectionHandler.java:160)
> at
>org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
> at java.lang.Thread.run(Thread.java:484)
>
>If the run the same query from an SQL prompt it runs OK without resulting
>in any error. I have not been able to find the source of the error and
>hence any remedy. Please help!
>
>
>====================================================================
>++ Amarjyoti Das
>
>++ email: [EMAIL PROTECTED]
>
>++ phone: (207) 594-3048 x 30
>
>++ fax:(207) 594-3021
>
>++ web: www.stgeorgeconsulting.com
>
>====================================================================
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html