You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/09/17 13:40:30 UTC
DO NOT REPLY [Bug 23211] New: -
ServletContext,getRequestDispatcher throws exception for invalid path instead of returning null
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23211>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23211
ServletContext,getRequestDispatcher throws exception for invalid path instead of returning null
Summary: ServletContext,getRequestDispatcher throws exception for
invalid path instead of returning null
Product: Tomcat 4
Version: 4.1.24
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: Other
Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: sthepper@hursley.ibm.com
when calling ServletContext,getRequestDispatcher("invalidPath") the method
throws an exception. However, the servlet javadocs specify to return null in
that case.
getRequestDispatcher
public RequestDispatcher getRequestDispatcher(java.lang.String path)
Returns a RequestDispatcher object that acts as a wrapper for the resource
located at the given path. A RequestDispatcher object can be used to forward a
request to the resource or to include the resource in a response. The resource
can be dynamic or static.
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org