In this example program we will show you how to use the <jsp:forward tag in your jsp program.
The <jsp:forward tag is used to forward the request another resource on the same server. Browser never knows where the request is forwarded. Server only sends the final response to the browser.
You can use this tag if you have to forward the request on another resource on the server for additional processing work.
For example if user is not logged in you can forward the user on the login page.
Here is the use of <jsp:forward tag:
Example code of HTML page:
<head><title>Request forwarded here</title></head>
This page received a forwarded request from <b>getRequest.jsp</b>,
<br>This page is the output from <b>gotForwardedRequest.jsp</b>,
<br>but the URL is for <b>getRequest.jsp</b>.
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: April 18, 2011 If you enjoyed this post then why not add us on Google+? Add us to your Circles