How to redirect the Control to jsp page
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sharath_S
Posted On:   Thursday, April 29, 2004 01:53 PM



Actually it may be silly question for many of u but I am new to this jsp world. I want to redirect the control from my login module to some jsp page. How could i do that .I need a sample code which redirects the ctrl to some jsp page.


Can any one help me

Re: How to redirect the Control to jsp page

Posted By:   sushil_srivastava  
Posted On:   Friday, April 30, 2004 06:24 AM

You could use the Request Object to get hold of the RequestDispatcher and use its forward method to forward the request to that page.

RequestDispatcher rd = or.getRequestDispatcher("/pagename.jsp")
rd.forward(request,response);

Re: How to redirect the Control to jsp page

Posted By:   Anonymous  
Posted On:   Thursday, April 29, 2004 02:15 PM


If you're using struts
return(new ActionForward("/doc/logon.jsp"));

else just use response.sendRedirect("/doc/logon.jsp")
About | Sitemap | Contact