Hello All,
From all the places that I could gather information about <jsp:forward> and getRequestDispatcher("").forward(), it says these are equal. Meaning, <jsp:forward> is just a tag format of getRequestDispatcher("").forward().
If I use:
<%request.getRequestDispatcher("Second.jsp").forward(request,response);%>
<%System.out.println("Request Forwarded");%>
I get the message saying "Request Forwarded" in the log. i.e. the execution does come back to the current page after processing the forward request.
While, if I use
<jsp:forward page="Second.jsp"/>
<%System.out.println("Request Forwarded");%>
I don’t see message in the log. i.e. once the request is forwarded, the execution doesn’t come back to the current page.
Please help me to clear my doubt.