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=42411>.
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=42411

           Summary: DefaultServlet should use ServletPath + PathInfo
           Product: Tomcat 5
           Version: 5.5.23
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


currently the DefaultServlet only uses PathInfo to locate the file to serve. i
think it should use ServletPath + PathInfo to serve the file.

as it is now, it is impossible to use a servlet mapping like this:

<servlet-mapping>
   <servlet-name>default</servlet-name>
   <url-pattern>/images/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
   <servlet-name>dispatcher</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>

if you make a request for '/images/blah.gif', ServletPath = '/images' and
PathInfo = '/blah.gif'.

so DefaultServlet will try to serve '/blah.gif' which doesn't exist because it
is in the '/images/' directory. if it used ServletPath + PathInfo, it will work
as expected.

making this change will not affect the current standard usage of DefaultServlet
(where its mapped to '/') because in that case ServletPath is null, so it only
uses PathInfo. it will also still work if people use a suffix mapping.

in the other case, where its is used with a path mapping like '/images/*', the
current behavior seems almost useless.

-- 
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