File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes RequestDispatcher Doubt?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "RequestDispatcher Doubt??" Watch "RequestDispatcher Doubt??" New topic

RequestDispatcher Doubt??

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10031

Hi Guys,

Why is that we need the \ when we get the RequestDispatcher from the ServletContext??

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Boobalan Jegathesan

Joined: Jan 08, 2007
Posts: 17

/ always refered to root-context.Inorderto access any resources you will have to give url path.If you think that resource is available on root-context you dont need to give the entire absolute path like


we could use only /OrderView.jsp

Server will try to find this OrderView.jsp resource under Mywebapp folder...


Thanks<br />Boobalan.(SCJP1.4)
I agree. Here's the link:
subject: RequestDispatcher Doubt??
It's not a secret anymore!