Magnus Stenman wrote:
>
> > Most likely you have not defined any special applications and therefore
> > use the default context, with the context root "" (empty string). If so,
> > the first example gives you an RD for the URI /member/info.jsp, but the
> > second fails with a NullPointerException since getContext("/member")
> > returns null (there's no application with context root /member).
> >
> > All of this should be described in the Servlet 2.2 specification.
>
> Not quite, he'd get the default (root) context, getContext("/path") returns the
> context which an URI is a part of (ie never null except for security reasons).
> The second part of his statement would return null though if there's no resource
> associated with that URI (file or servlet/other-mapping).
Yes, Magnus is right. My mistake. I also noticed that the getContext() method
is not described in the spec (2.2 PR1) itself, only in the JavaDocs. It would
probably be a good idea to describe this in more detail in the Servlet Context
section of the final 2.2 spec. James, are you listening?
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
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