Keshav
Posts: 11
Nickname: kesh
Registered: Aug, 2002
|
|
Re: how can we call a jsp from a servlet?
|
Posted: Aug 19, 2002 9:54 PM
|
|
Hi Senthil,
In a servlet, type in the following line in the service method
getServletConfig().getServletContext().getRequestDispatcher("sentil.jsp").for ward(req,res);
U can use either a jsp or a servlet. (sentil.jsp)
U can either use forward or include, but u need to pass the request & response objects. I am not sure of the redirect method since I haven't used it.
Hope ur clear with the code
Cheeeeeeeeeeeeeeers Keshav
|
|