tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franz-Josef Herpers <...@wir-age.de>
Subject Re: getRealPath() returns real path plus context path
Date Tue, 06 Sep 2005 08:50:25 GMT
Hi,

Edmund Urbani wrote:

> the getRealPath method simply returns a path inside the webapp's 
> directory. eg. you can do getRealPath("images/someimg.jpg") and get the 
> actual filesystem path for that file, so you can access it using 
> java.io.File and do something with it. getRealPath("/") should give you 
> the webapp directory itself.
> note that you probably should not use this method, if you ever want to 
> be able to run your webapp directly from a .war file.

I know about the problem with the war file. That's the reason why I 
until today never used this method and apparently never read the 
Javadocs....

Thanks for the helpful answer.

Regards
Franz


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


Mime
View raw message