tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9430] New: - getResource() doesn't return null for invalid URLs
Date Mon, 27 May 2002 01:52:10 GMT
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=9430>.
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=9430

getResource() doesn't return null for invalid URLs

           Summary: getResource() doesn't return null for invalid URLs
           Product: Tomcat 3
           Version: 3.2.3 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Servlet
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jeff@socialchange.net.au


Hi,

>From the Servlet 2.2 javax.servlet.ServletContext javadocs, method:

public java.net.URL getResource(java.lang.String path):

"This method returns null if no resource is mapped to the pathname."

Yet it clearly doesn't, as this JSP demonstrates:

<%= config.getServletContext().getResource("/some/nonexistent/path") %>

This bug is fixed in 3.3.1rc1 and 4.0.1 (at least), but I thought I'd just
record this bug for future generations.


--Jeff

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message