On 21/06/2019 03:21, Tommy Pham wrote:
> </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?

It isn't.

The Java EE specs have moved to Eclipse and are in the process of
re-branding to Jakarta EE. The process now is to raise an issue here:

https://github.com/eclipse-ee4j/servlet-api

However...

>  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 I'm one of the folks who would respond to any such request, I can
give you a heads up on the likely response.

That is never going to happen. There are multiple reasons:

1. It would break backwards compatibility.

2. The purpose of getPathTranslated() is to map *just* the pathInfo to
the file system. There are use cases that need this functionality.

3. You can use ServletContext.getRealPath(String path)

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

What is more likely to be accepted (but no guarantees) is a new method
on ServletRequest getRealPath() (note the lack of parameter) that calls
ServletContext#getRealPath() with servletPath + pathInfo (with
appropriate null handling).

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to