Meaningless Drivel is fun!
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "context dispatcher  vs requestdispatcher " Watch "context dispatcher  vs requestdispatcher " New topic

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?
I agree. Here's the link:
subject: context dispatcher vs requestdispatcher
It's not a secret anymore!