If I correct, ServletContext's getRequestDispatcher(String path) method has the absolute path/url as argument!
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Joined: Jun 15, 2010
Are there any advantages we get by getting requestDispatcher from
Joined: Aug 23, 2010
There is a method getContext(string) in servletContext which can be used to get the foreign context. so we can use the method getRequestDispatcher to get the RequestDispatcher for resources in foreign context. But when we use the request.gerRequestDiapatcher method we get the RequestDispatcher of the current context only.
So the servletContext requestDispatcher may be helpful in some scenarios.