tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wyn Easton <wyn_eas...@yahoo.com>
Subject Re: Error with outputStream when forwarding a JSP
Date Sat, 06 May 2000 14:42:42 GMT
Antony,

You can not open a ServletOutputStream or get a
PrintWriter in your Servlet before you forward to a
JSP
page.  Try frowarding to your JSP without opening a
ServletOutputStream or getting a PrintWriter in your
Servlet and see what happens. 

--- Antony Ma <antonyma@system-pro-solutions.com>
wrote:
> Hi ,
> 
> From time to time, I got the following error
> 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._0002fjsp_0002fstore_0002ejspstore_jsp_0._jspService(_0002fjsp_0002fstore_0002ejspstore_jsp_0.java,
> Compiled Code)
> 	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,
> Compiled Code)
> 	at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
> Compiled Code)
> 	at
>
org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163)
> 	
> After I  restarted tomcat , it is working agina. I
> am using tomcat 3.1 with java1.2.2 on NT
> Please help to find the problem.
> 
> Thanks
> 
> Antony Ma 
> 
> 
>
--------------------------------------------------------------------------
> To unsubscribe, email:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email:
> tomcat-user-help@jakarta.apache.org
> 

=====
Wyn Easton
wyn_easton@yahoo.com

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Mime
View raw message