Sasikumar Muralikrishnan wrote:
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.
Hi.
I do not know the answer to your question.
But maybe now would be a good time to examine why you are using
getServletContext().getRealPath(), and to browse the following thread for some good
reasons not to be doing that.
http://tomcat.markmail.org/thread/5vfsnf56w2r5gz6q
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org