Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 6.1.4, 6.1.11, 6.1.12rc1
-
Fix Version/s: None
-
Component/s: JSP
-
Labels:None
-
Environment:java 5 on mac
-
Testcase included:yes
-
Number of attachments :
Description
For the jsp
<html>
<body>
<h2>Include test!</h2>
<p>1.
<jsp:include page="includePage.jsp?p=1"/>
</p>
<p>2.
<% request.getRequestDispatcher("includePage.jsp?p=2").include(request, response); %>
</p>
<p>3.
<% request.getRequestDispatcher("includePage.jsp?p=3").include(request, response); %>
</p>
</body>
</html>
Result is strange: the includePage response where p= 2 and 3 is visible before p=1
=======
2-I am Include:1218169749332867000 3-I am Include:1218169749333014000
Include test!
1. 1-I am Include:1218169749332762000
2.
3.
====
Reproduce:
attached is maven project so just run mvn jetty:run and hit http://localhost:8080/reqestDispInc/
Konstantin,
The output is actually correct.
The reason for that is the JspWriter does not write to the response outputstream/writer not until the full jsp file is served (in your case "index.jsp").
request.getRequestDispatcher("includePage.jsp?p=2").include(request, response) <-- this writes the content after serving includePage.jsp which is why
it appears first on the page.
I've deployed your webapp to tomcat-5.5 and I'm getting the same output.
Cheers,
dyu