</snip>

After some further research, it appears the issue I'm encountering is known
since 2007 by IBM at least:

https://www-01.ibm.com/support/docview.wss?uid=swg21259282

While reviewing the JSR-369 history, at jcp.org, it seems that this is
since servlet spec 2.3, perhaps even earlier.  Does anyone know if the
email spec-sub...@jcp.org is the correct email which I can submit a
proposal for updating the JSR-369?  I think the section 3.6 of the servlet
spect should be changed from:

"The getPathTranslated method computes the real path of the pathInfo of the
request."

to:

The getPathTranslated method computes the real path of the servletPath and
pathInfo of the request.  If the pathInfo is not valid, then compute the real
path of the servletPath.

Since the requestURI is comprise of /contextPath/servletPath/pathInfo.  I
think the above would be more accurate to translate the requested path to a
static file on the file system as I've seen by various cases, and possibly
IBM's too.

Servlet name: default , registered class:
org.apache.catalina.servlets.DefaultServlet.
Servlet default's mapping:
     /img/*
     /css/*
     /js/*
     *.html
Servlet default's init parameters:
     listings: false
     debug: 0
Class: org.apache.catalina.connector.RequestFacade
ServletContext Class: org.apache.catalina.core.ApplicationContextFacade
ContextPath: /erm-0.0.1-SNAPSHOT
DispatcherType: REQUEST
HttpServletMapping:
       Class: org.apache.catalina.core.ApplicationMapping$MappingImpl
       MappingMatch: PATH
       MatchValue: jquery-ui/base/index.html
       Pattern: /css/*
       ServletName: default
Method: GET
PathInfo: /jquery-ui/base/index.html
PathTranslated:
D:\apache-tomcat-9.0.21\webapps\erm-0.0.1-SNAPSHOT\jquery-ui\base\index.html
Correction of PathTranslated:
D:\apache-tomcat-9.0.21\webapps\erm-0.0.1-SNAPSHOT\css\jquery-ui\base\index.html
RequestURI: /erm-0.0.1-SNAPSHOT/css/jquery-ui/base/index.html
RequestURL:
http://localhost:8080/erm-0.0.1-SNAPSHOT/css/jquery-ui/base/index.html
ServletPath: /css
ServletContext.ServletContextName: erm
response: org.apache.catalina.connector.ResponseFacade

Thanks,
Tommy

>

Reply via email to