Home Jsp Jsp redirect



Jsp redirect
Posted on: February 3, 2009 at 12:00 AM
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:

 

Related Tags for Jsp redirect:
ccomjspbrowserurlserverredirectioclientmethodsedrequestdisplaypageclithisresponserowjsrowsieexamplewheresendtoedilearnwseexamwsearexteilitsectioncanlisplusefrombrowseinmntnextplaycajispclesthroughdirendagemehowhrctlxawhichxampsrectspeedisplaysdirectespatquestisirhallivmpleaandarrvxtssthavsthatdispendsendspleplndonomo


More Tutorials from this section

Ask Questions?    Discuss: Jsp redirect   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.