aspose file tools*
The moose likes Servlets and the fly likes context dispatcher  vs requestdispatcher 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 "context dispatcher  vs requestdispatcher " Watch "context dispatcher  vs requestdispatcher " New topic
Author

context dispatcher vs requestdispatcher

ani jadhao
Ranch Hand

Joined: Dec 23, 2008
Posts: 62
Hi All ,

I am surrounded by a thought about dispatchers.
we know that the difference between request and context Requestdispatcher is , of path i.e. context accepts only paths starting from / i.e. relative to context of root.
But Requestdispatcher of request accepts paths starting from / as well as ./ i.e. relative to root and relative to request .

So my question is , why there are two facilities provided and where they can fit if want to use specifically? Cant we do, using ONLY request.getrequestdispatcher method as it accepts both relative to request and root paths?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: context dispatcher vs requestdispatcher