In message <[EMAIL PROTECTED]>, Stephen R writes:
> I get the following error when I try to forward to a JSP ...
>
> java.lang.IllegalStateException: Cannot forward as OutputStream or Writer has
> already been obtained

>From the Sun's "JavaServer Pages Specification", page 68:

  If the page output is buffered then the buffer is cleared prior to
  forwarding.

  If the page buffer was unbuffered and anything has been written to it,
  an attempt to forward the request will result in an IllegalStateException.

> Here's the piece of code ....
>
> if ( formName.equals("updatePDForm") ) { %>
>    <jsp:include page='performUpdatePD.jsp' flush='true'>
>         <jsp:param name='userid' value='<%= request.getParameter("userid") %>
> '/>
>    </jsp:include>
>
>    <jsp:forward page='/SubscriberProfile.jsp'>
>         <jsp:param name='userid' value='<%= request.getParameter("userid") %>
> '/>
>    </jsp:forward>
> <% } %>

Can't you move the include statement to the SubscriberProfile.jsp?

Cheers,
Gorazd

--
Gorazd Bozic <[EMAIL PROTECTED]>
ARNES SI-CERT, Jamova 39 p.p. 7, SI-1001 Ljubljana, Slovenia
tel: +386 1 479 88 22, fax: +386 1 479 88 99

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to