You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/08/27 15:23:40 UTC

[Bug 56890] getRealPath returns null

https://issues.apache.org/bugzilla/show_bug.cgi?id=56890

--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> ---
Resource paths are expected to start with a "/" (per javadoc of
ServletContext.getResource()). [1]

The behaviour in Tomcat 8 is caused by a more strict underlying Resources
implementation.

That said,
- I would expect "strict compliance" option (or more specifically
GET_RESOURCE_REQUIRE_SLASH option) to control this behaviour both in this and
in older versions. Apparently it is not so. [2]

- I wonder whether passing "" instead of "/" to getRealPath("") is valid.


[1]
http://docs.oracle.com/javaee/7/api/javax/servlet/ServletContext.html#getResource%28java.lang.String%29

[2]
http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html#Specification

-- 
You are receiving this mail because:
You are the assignee for the bug.

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