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/01/29 08:43:57 UTC
[Bug 56085] New: IllegalArgumentException is thrown when calling
getServletContext().getRealPath("\\")
https://issues.apache.org/bugzilla/show_bug.cgi?id=56085
Bug ID: 56085
Summary: IllegalArgumentException is thrown when calling
getServletContext().getRealPath("\\")
Product: Tomcat 8
Version: 8.0.0-RC10
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: lobanova.e.o@gmail.com
When getServletContext().getRealPath(System.getProperty("file.separator")) is
called in Windows OS, where the file separator is a back slash, the
getServletContext().getRealPath("\\") method throws an
IllegalArgumentException.
It seems to work fine in Tomcat 7.0, but fails in 8.0-RC10.
As a temporary workaround solution, I changed the separator to the right slash
("/").
--
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
[Bug 56085] IllegalArgumentException is thrown when calling
getServletContext().getRealPath("\\")
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56085
Konstantin Kolinko <kn...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|8.0.14 |8.0.0-RC10
--- Comment #3 from Konstantin Kolinko <kn...@gmail.com> ---
Restore "Version" field back to 8.0.0-RC10
This issue was reported in 8.0-RC10 and fixed since 8.0.2.
--
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
[Bug 56085] IllegalArgumentException is thrown when calling
getServletContext().getRealPath("\\")
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56085
karthic <ps...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|8.0.0-RC10 |8.0.14
--
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
[Bug 56085] IllegalArgumentException is thrown when calling
getServletContext().getRealPath("\\")
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56085
lobanova.e.o@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--
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
[Bug 56085] IllegalArgumentException is thrown when calling
getServletContext().getRealPath("\\")
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56085
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
This has been fixed in 8.0.x and will be included in 8.0.2 onwards.
--
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
[Bug 56085] IllegalArgumentException is thrown when calling
getServletContext().getRealPath("\\")
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56085
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
The argument for getRealPath() is a virtual path and should therefore always
use "/" as a file separator irrespective of the operating system Tomcat is
running on.
However, throwing an IllegalArgumentException in this case does not appear to
be justified by the Javadoc. getRealPath("\\") should return null.
--
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