I have some problems with the getContext method.

According to the servlet specification, the getContext(String path)
method of class ServletContext
returns allows servlet gain access to other context. And the
getRequestDispatcher(String urlPath) returns a RequestDispatcher of the
given urlPath, which is relative to current context root. But the
document doesn't not state clear what is the context root. Do anyone
know what the context root is?

By now I am assuming that the current directory is the context root. So
given the following path

/member/info.jsp

The following two should return the same requestDispatcher when used in
JSP:

getServletContext().getRequestDispatcher("/member/info.jsp");

getServletContext().getContext("/member").getRequestDispatcher("/info.jsp");



I tried the above in JRun but the second method returns null.

Any help is appreciated.
Daniel

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to