tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject 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
Date Wed, 21 May 2003 07:21:40 GMT
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


Mime
View raw message