What will be output on page and server when test1.jsp will be requested?Why?
/*test1.jsp*/
<%
1. RequestDispatcher rd=request.getRequestDispatcher("/test2.jsp");
2. rd.forward(request,response);
3. out.println("After forward");
4. System.out.println("After forward");
%>
/*test2.jsp*/
<%
out.println("Test 2");
%>
I tried this with
tomcat 5.5.
And answer is: �Test2� is printed on the page and �After forward� on server.
But I am confused
If line 4 is executed then why there is no output for line 3?
Can anyone explain it?