tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Data File Directory
Date Fri, 16 Jun 2000 18:18:38 GMT
Steve Haines wrote:

> I am facing the same problem and I found that the current working directory
> for my servlet (System.getProperty( "user.dir" ) ) is:
>
> D:\Jakarta\jakarta-tomcat\bin
>
> Is there a way to get the application's document base directory, as defined
> in the server.xml file:
>
> <Context path="/myapp" docBase="webapps/myapp" debug="0" reloadable="true" >
>
> </Context>
>
> So in my example:
>
> D:\Jakarta\jakarta-tomcat\webapps\myapp
>

    String path = getServletContext().getRealPath("/");

>
> Thanks in advance!
> Steve

Craig McClanahan




Mime
View raw message