calling a jsp from a servlet
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, June 18, 2003 01:49 AM

How to call a jsp from a servlet? my requirement is that I will do some processing in a servlet and the servlet should automatically call a jsp with some parameters.
In response.sendRedirect("address") can I add some querystring like


response.sendRedirect("http://servername/test/jsp/jspfile.jsp?xxx=111")


I think it is not possible with requestDispatcher also.


Is there any other way out






Binny

Re: calling a jsp from a servlet

Posted By:   Subodh_Chavan  
Posted On:   Wednesday, June 18, 2003 06:35 AM

I think adding querystring to the sendRedirect method should
work.

The second option is ,you create a request dispatcher object (say objRequestDispatcher)and add following code:



request.setAttribute("name","value")

objRequestDispatcher.forward(request,response)


let me know if you have any doubts .

About | Sitemap | Contact