tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sasikumar Muralikrishnan" <sasiku...@pointelsolutions.com>
Subject Reg. getRealPath("/") _ How does the result of this method differ in Tomcat 7 and Tomcat 8
Date Tue, 10 Feb 2015 12:14:48 GMT
Hi Team,

Using this method

getServletContext().getRealPath("/")

returns '\' at the end when I run my project in Tomcat 7 whereas it is not
working as such in Tomcat 8.

For example,
In Tomcat 7 it returns as "D:\Tomcat\webapps\project\"
In Tomcat 8 it returns as "D:\Tomcat\webapps\project"

At present the project is in production so, I am unable to change the code
in every part(where i useĀ getRealPath("/")). Is there a way/setting in
tomcat level configuration to make it resolved.

Additional information,
	
Tomcat version : 8.0.14

OS : Windows server 2008 R2 standard

System Type: 64 bit operating system

Thanks,
Sasi Kumar M.



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


Mime
View raw message