What is the difference between requestDispatcher and namedDispatcher?

Questions by kiran.pathipaka   answers by kiran.pathipaka

Showing Answers 1 - 3 of 3 Answers

What I found is there is nothing called namedDispatcher. But there is a method called getNamedDispatcher() in servletcontext which is similar to getRequestDispatcher(). 

             getNamedDispatcher() is used to get a requestDispatcher object for a servlet whose name is passed to this method call.
             getRequestDispatcher() is used to get a requestDispatcher object for the resource indicated by the path passed to this method call.

public RequestDispatcher getNamedDispatcher(java.lang.String name)

public RequestDispatcher getRequestDispatcher(java.lang.String path)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions