What is RequestDispatcher ?

Does RequestDispatcher, redirectes the call or forwards it.
ie. If it redirects, the Browser to the new URl and forwarding I suppose should be internal, without the browser getting involved

cheers
W
W122498Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shaveriCommented:
A more exciting addition to 2.1 is the ability for servlets to programmatically delegate request handling to other components on the server.  This serves two purposes. First, a servlet can forward an entire request, doing some preliminary processing and then passing off the request to another component. This ability may remind you of the "NameTrans" feature in Netscape's NSAPI.Second, a servlet can include in its response a bit of content generated by another component, essentially creating a programatic server-side include.
     This delegation ability gives servlets more flexibility, and allows for better abstraction. Using delegation, a servlet can construct its response as a collection of content generated by various Web server components, all located using the Web server's URI (a fancy word for URL) namespace. This functionality is especially important to JavaServer Pages, where it often happens that one servlet preprocesses a request, then hands off the request to a .jsp page for completion.
        To support request delegation, 2.1 includes a new interface called RequestDispatcher. A servlet gets a RequestDispatcher using the getRequestDispatcher(String uripath) method of its ServletContext. This method returns a RequestDispatcher that can dispatch to the component found at the given URL.
for more information............visit
http://www.javaworld.com/javaworld/jw-12-1998/jw-12-servletapi-2.html
0
shaveriCommented:
In the proposed answer by me 2.1 denotes Servlet API 2.1.......
0
shaveriCommented:
shaveri changed their proposed answer to a comment
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
W122498Author Commented:
Hi
Can you give an pointer, wher I can see an implentation of RequestDispatcher

cheers
W
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.