Helo, making a web service using Tomcat 4.0.2, I have found a problem.

When I try to make a forward into a Bean It's produce an exception that the
server encounter.
In fact, I don't know if the problem it's in the jsp file or in the Bean.
With Tomcat 3.2 I didn't have problems so I thought that maybe it was
because of using a new version of Tomcat.

Jsp file is:

<jsp:useBean id="gestor" class="hem.Gestor" scope="request">
     <jsp:setProperty name="gestor" property="*"/>
     <jsp:setProperty name="gestor" property="paginaBuena"
value="/ok.html"/>
</jsp:useBean>

<%
      gestor.existeUsuario(pageContext);
%>

The method of the bean gestor (existeUsuario) receive the PageContext, so I
try to do the forward to this way:

    rd = pageContext.getServletContext().getRequestDispatcher(goodURL);
    rd.forward (pageContext.getRequest(), pageContext.getResponse());

Where rd is a RequestDispatcher and pageContext is the PageContext


But in the web browser appear:


java.lang.IllegalStateException: getOutputStream() ya ha sido llamado para esta 
respuesta
        at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java:755)
        at 
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:165)
        at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:166)
        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:158)
        at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:205)
        at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:177)
        at 
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:198)
        at 
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:193)
        at org.apache.jsp.Login$jsp._jspService(Login$jsp.java:186)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
        at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
        at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
        at java.lang.Thread.run(Thread.java:536)




Please, if anybody knows how make this forward I am very grateful for response me with 
the solution.
Thanks for read my e-mail.


Gonzalo

Reply via email to