tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien BARRET" <>
Subject WebApps and getRealPath...
Date Mon, 19 Jun 2000 10:04:08 GMT

I have 2 web applications on my tomcat server.

My first webapp (lets call it rootapp) is "/" [accessible with http://server/rootappFile.jsp]
My second webapp (lets call it app2) is "/app2" [accessible with http://server/app2/app2File.jsp]

If a servlet running in app2 tries to do a getRealPath on a file located under "/" (e.g getRealPath("/file.txt"))
then getRealPath returns a wrong value. I believe this is normal, due to the separation between
webapps contexts.

But if a servlet running in rootapp do a getRealPath on a file located in app2 (e.g getRealPath("/app2/file.txt"))
then getrealpath returns the right value...

So is the root application a "special" webapp with sort of "super user" rights ? 


Julien BARRET (still working on realPaths...)


View raw message