The out from the jspwriter is NOT the same out as receieved by response.getWriter();

The out in the JspPage is  buffered.

-Tim

George Finklang wrote:

have the following code in my jsp, which is called by a forward from my
Controller servlet. The various Dispatchers are either servlets or jsps declared
in my web.xml.

All the servlets and jsps get run correctly. The problem is the output. The
output of the root jsp and the 3-4 included jsps are arbitrarily rearranged, see
below. Bizarre shuffling, not reverse order, but a different order and not
interleaved with the text from the jsp.
If I translate the jsp into servlet code, and use RequestDispatchers
for all the components,
the page works.  The documentation says something about flushing buffers, but I
can't see how to do this with RequestDispatchers.


Code:

<BODY>
<jsp:include page="WEB-INF/jsps/portal/header.jsp" flush="true"/>
<% if(option1) {
    application.getNamedDispatcher("Option1Servlet").include(request,response);
    } else { %>
<table><tr>
<% if(option2) { %>
<td><% application.getNamedDispatcher("Option2Servlet").include(request,response);
%></td>
<%  } %>
<td><% application.getNamedDispatcher(page).include(request,response); %></td> <td><% application.getNamedDispatcher("InfoServlet").include(request,response);
%></td>
</tr></table>
<%  } %>
</BODY>



generated html:

<BODY>
Page text // from the page dispatcher Info servlet text // from the infoservlet dispatcher Header form text // from the header.jsp dispatcher <table><tr> <td></td>
<td></td>
</tr></table>
</BODY>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to