aspose file tools*
The moose likes Servlets and the fly likes HELP !!! - How can I call a JSP from a servlet??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HELP !!! - How can I call a JSP from a servlet???" Watch "HELP !!! - How can I call a JSP from a servlet???" New topic
Author

HELP !!! - How can I call a JSP from a servlet???

Catriona McCann
Greenhorn

Joined: Aug 31, 2000
Posts: 24
Hi,
I have a JSP which is basically a welcome screen. This JSP calls a servlet to extract some information from a DB. I would then like to call another JSP from the servlet and write to the fields in the JSP. How can I do this.
Thanks in advance !!!
Catriona.
parul jain1
Greenhorn

Joined: Apr 25, 2001
Posts: 5

forwardFileName = "/jsp/"+"homepage"+".jsp";
getServletConfig().getServletContext().getRequestDispatcher(forwardFileName).forward(req, res);
return;
bob walker
Greenhorn

Joined: Feb 20, 2001
Posts: 14
You can also do a servlet re-direct to your jsp.
Use the HttpServiceResponse.sendRedirect() method.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HELP !!! - How can I call a JSP from a servlet???