Yes, i'm using 4.1.24 .... how come ???
 
Abid

        -----Opprinnelig melding----- 
        Fra: Tim Funk [mailto:[EMAIL PROTECTED] 
        Sendt: fr 11.07.2003 18:06 
        Til: Tomcat Users List 
        Kopi: 
        Emne: Re: Exception:getOutputStream() has already been called for this response
        
        

        Doh! I don't see anything obvious from my point of view. My last chance
        question (then I'm out of ideas for now): Are you using 4.1.24?
        
        -Tim
        
        Abid Ali Teepo wrote:
        > Hi Tim
        >
        > No, the rd.include doesn't write anything.
        >
        > I'm pasting the root cause stack trace that refers to line number 69 in my 
jasper produced file that i'm attaching ... sure hope you can have a look at it ...
        >
        > Abid
        >
        > java.lang.IllegalStateException: getOutputStream() has already been called 
for this response
        >       at 
org.apache.coyote.tomcat4.CoyoteResponse.getWriter(CoyoteResponse.java:614)
        >       at 
org.apache.coyote.tomcat4.CoyoteResponseFacade.getWriter(CoyoteResponseFacade.java:173)
        >       at 
org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:173)
        >       at 
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:166)
        >       at 
org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:184)
        >       at 
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:198)
        >       at 
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:193)
        >       at org.apache.jsp.netbid_done_jsp._jspService(netbid_done_jsp.java:69)
        >       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
        >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        >
        > -----Original Message-----
        > From: Tim Funk [mailto:[EMAIL PROTECTED]
        > Sent: 11. juli 2003 17:49
        > To: Tomcat Users List
        > Subject: Re: Exception:getOutputStream() has already been called for
        > this response
        >
        >
        > Does "rd.include(request, response);" do anything?
        >
        > What will really help is to look at the stacktraces produced - then go back
        > to the jasper generated files to get a better idea of narrowing down when the
        > excpetion gets thrown.
        >
        > -Tim
        >
        > Abid Ali Teepo wrote:
        >
        >>I don't understand Tim
        >>
        >>As far as i can see, i make no call to getOutputStream()
        >>
        >>And how come the exact same jsp-page will forward to my "menu.jsp" but not 
to "safe.html". When i request the latter i get this exception.
        >>
        >>Here is my JSP :
        >><%@ page import="Bid.BidSession"%>
        >><%   
        >>    BidSession bidSession = BidSession.readParameters(request, "AUTHCLIENT");
        >>    RequestDispatcher rd = request.getRequestDispatcher("BidProxy");
        >>    rd.include(request, response);
        >>    session.setAttribute("bid.authenticated",new String("true"));
        >>             
        >>    String pageWanted = (String)session.getAttribute("bid.pageWanted");
        >>   
        >>      if(pageWanted!=null && !"".equals(pageWanted)) {
        >>              System.out.println("PageWanted in netbid_done:" +pageWanted);
        >>              rd = request.getRequestDispatcher(pageWanted);
        >>              rd.forward(request, response);
        >>      } else {
        >>              rd = request.getRequestDispatcher("/secure/menu.jsp");
        >>      rd.forward(request, response);
        >>    }
        >>%>
        >>
        >>Could you please pinpoint my error ?
        >>
        >>Abid
        >>
        >>
        >>-----Original Message-----
        >>From: Tim Funk [mailto:[EMAIL PROTECTED]
        >>Sent: 11. juli 2003 17:13
        >>To: Tomcat Users List
        >>Subject: Re: Exception:getOutputStream() has already been called for
        >>this response
        >>
        >>
        >>You have code which is getting the response's output stream, then NOT using 
it.
        >>
        >>Then your JSP is trying to gett the writer.
        >>
        >>You can get one or the other, not both.
        >>
        >>-Tim
        >>
        >>Abid Ali Teepo wrote:
        >>
        >>
        >>>Hi
        >>>
        >>>Anyone recognize this exception :
        >>>
        >>>org.apache.jasper.JasperException: getOutputStream() has already been 
called for this response
        >>>
        >>>I get this exception when using requestDispatcher to forward to a
        >>>html file. The exact same code works when i forward to a jsp file ??
        >>>
        >>>Here is some code :
        >>>pageWanted is "/secure/safe.html"
        >>>
        >>>if(pageWanted!=null && !"".equals(pageWanted)) {
        >>>     rd = request.getRequestDispatcher(pageWanted);
        >>>     rd.forward(request, response);
        >>>     } else {
        >>>     rd = request.getRequestDispatcher("/secure/menu.jsp");
        >>>     rd.forward(request, response);
        >>>   }
        >>>
        >>>Any suggestions ?
        >>>
        >>>Abid
        >
        
        
        ---------------------------------------------------------------------
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, e-mail: [EMAIL PROTECTED]
        
        

Reply via email to