Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Off Topic - RequestDispatcher

N.B.Bopanna

2004-01-26


Hi all ,
i want to forward the control from a servlet to a jsp file using
RequestDispatcher.

the following code works:-

RequestDispatcher rd=request.getRequestDispatcher("finyear.jsp");
rd.forward(request,response);

and this does not work:-

RequestDispatcher rd=getServletConfig().getServletContext
().getRequestDispatcher("finyear.jsp");
rd.forward(request,response);

can any one please tell me why?
Thanks in advance
Bopanna



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.