getRealPath("/")- How does the result of this method differ in Tomcat and WebSphere -


using method

getservletcontext().getrealpath("/")  

returns "\" in end of path in tomcat (eg. c:\testfolder\myapp) whereas in websphere doesn't (eg. c:\testfolder\myapp) . reason ? relevance of ("/") in getrealpath("/") ?

q-1: relevance of ("/") in getrealpath("/") 

/ refers root web context path. , function returns physical path of web directory war/web app installed.

q-2 why tomcat appends \ in end , websphere not. 

different servers vary in results have mentioned because api implementations vary server server when part vaguely defined java ee.

regards, ravi


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -