Home Jsp Jsp redirect
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

Jsp redirect

Advertisement
In this section, you will learn how to redirect a page in JSP.

Jsp redirect

        

In this section, you will learn how to redirect a page in JSP. You can see in the given example that we have used the method response.sendRedirect() through which the server sends the response to the client browser, from where the next request comes and it displays that url correctly. You can also redirect the jsp page in a jsp.

Here is the code of redirect.jsp

<html>
<%
String redirectURL = "http://www.roseindia.net/";
response.sendRedirect(redirectURL);
%>
</html>

Output will be displayed as:

Download Source Code:

 

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



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: February 3, 2009

Related Tutorials

Ask Questions?    Discuss: Jsp redirect   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com