This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Request dispatcher object in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Request dispatcher object in servlet" Watch "Request dispatcher object in servlet" New topic

Request dispatcher object in servlet

saahil sinha
Ranch Hand

Joined: Apr 07, 2003
Posts: 68
hi ,
I need help with request dispatcher used in servlet to forward request to jsp.I have stored my file display.jsp in tomcat 4.1\webapps\ROOT directory now how do specify the path in request dipatcher do i specify it as /display.jsp or c:\program files\apache group\tomcat 4.1\webapps\root\display.jsp.
suresh guru
Ranch Hand

Joined: Sep 07, 2002
Posts: 38
u have to use a path relative to the ROOT context
for ex getRequestDispatcher("/jsp/page.jsp").forward(req,res);
I agree. Here's the link:
subject: Request dispatcher object in servlet
Similar Threads
difference between ways of getting RequestDispatcher
HelloServlet not running ?
Forward output to Jsp from servlet
Forwarding Servlet output to JSP
Help on Servlets- web.xml not working