DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43241>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43241

           Summary: ServletContext.getResourceAsStream()  does not follow
                    API specs for Path
           Product: Tomcat 5
           Version: 5.5.23
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Say for example, you have a file style.css deployed in your context. The call to
ServletContext.getResourceAsStream("style.css") returns an input stream. This is
not correct behavior.

The spec (2.3) says:

> The path must be specified according to 
> the rules given in getResource. 

getResource() says:

> The path must begin with a "/" and is interpreted 
> as relative to the current context root.

My reading of these two things is that getResourceAsStream("style.css") should
return null, not an input stream to the file.

I got bit on this because my app behavior changed (broke) when ran on the
current version of WebSphere.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to