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

ios - iPhone/iPad different view orientations in different views , and apple approval process -

monitor web browser programmatically in Android? -

c# - Using multiple datasets in RDLC -