Here's your answer - straight out of the Servlet API javadoc:
"The pathname must begin with a "/" and is interpreted as relative to the
current context root. Use getContext to obtain a RequestDispatcher for
resources in foreign contexts. This method returns null if the
ServletContext cannot return a RequestDispatcher ."
Scott Evans
-----Original Message-----
From: Arun M. Thomas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 14, 2000 2:30 AM
To: [EMAIL PROTECTED]
Subject: ServletContext.getRequestDispatcher
Does anyone know whether or not
ServletContext.getRequestDispatcher is
supposed to be able to return a non-null request dispatcher
is a
non-existent resource is requested?
I've a couple of JSP pages which I'm forwarding to from a
servlet.
Depending on parameters supplied by the user, the
appropriate page is
chosen by changing the name of the JSP page requested. If a
requested
page is missing, however, I'd like to be able to default to
another page.
My original assumption was that the getRequestDispatcher
method should
return null if the requested resource is unavailable. At
least on Weblogic
5.1,
this does not seem to happen. Is this the correct
behaviour? If so,
is there any way to determine in advance whether or not a
particular
resource
exists prior to dispatching requests to it?
Any and all help appreciated!
-AMT
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body:
"signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets