Home Jsp Forward a Jsp Page
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Forward a Jsp Page

Advertisement
This page discusses - Forward a Jsp Page

Forward a Jsp Page

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:

<jsp:forward page="gotForwardedRequest.jsp"/>

Example code of HTML page:

<html>
<head><title>Request forwarded here</title></head>
<body>
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>.
</body>
</html>
Advertisements

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 18, 2011

Ask Questions?    Discuss: Forward a Jsp Page  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
Nishant Dwivedi
October 18, 2012
Link

IN website Every page there are 3 links of Previous, Index and Next. These links are not working. Users are not understand the page have more information or not...
DMCA.com