You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/05/21 09:21:40 UTC

DO NOT REPLY [Bug 20098] New: - RequestDispatcher.include() in a jsp prints it's contents before any of the parents jsp's content is printed

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20098>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20098

RequestDispatcher.include() in a jsp prints it's contents before any of the parents jsp's content is printed

           Summary: RequestDispatcher.include() in a jsp prints it's
                    contents before any of the parents jsp's content is
                    printed
           Product: Tomcat 4
           Version: 4.1.24
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Servlet & JSP API
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: PaulRivers@boundarywaterscanoeing.com


Let's say you have a.jsp and b.jsp

a.jsp: --------------------------------------------------------

1

<%
RequestDispatcher rd = request.getRequestDispatcher("b.jsp");
rd.include(request, response);
%>
	
3
-- End of a.jsp ----------------------------------------------------

b.jsp: -------------------------------------------------------------

2

-- End of b.jsp ----------------------------------------------------

You should get results of: 1 2 3
But you don't. The contents of b.jsp get printed BEFORE anything in a.jsp, 
resulting in: 2 1 3 

I've been trying to use RequestDispatcher's all throughout my code to cleanly 
allow secure jsp's to include content in the middle of non secure jsp's, this 
really halts that effort entirely.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org