This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes getRequestDispatcher Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getRequestDispatcher Method" Watch "getRequestDispatcher Method" New topic

getRequestDispatcher Method

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 166
Hi Everyone

I have a question although i know it is very silly to ask but still just want to know . It as follows:

Why is it that the getRequestDispatcher method is in ServletRequest interface aswell as ServletContext interface ... ??

Although it sounds ok to be in ServletRequest interface because this interface contains all the methods which provide the request information's to the servlet. But why did they add this method in the ServletContext ??

Thanks in Advance!!!
J. Kevin Robbins
Ranch Hand

Joined: Dec 16, 2010
Posts: 632

Check this thread.

"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 166
J. Kevin Robbins wrote:Check this thread.

Thanks dear .. i got it
I agree. Here's the link:
subject: getRequestDispatcher Method
Similar Threads
Regarding Request Dispatcher
Question - RequestDispatcher from ServletContext
getRequestDispatcher() method
doubt in request dispatcher concept in servlets
getRequestDispatcher error in servlets