Or if you want the root it's deployed to, request.getContextPath() will do
it for you.

-mike

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Endres
> Sent: Wednesday, January 17, 2001 9:39 AM
> To: Orion-Interest
> Cc: Johnson, Robert
> Subject: Re: How to find root of web app
>
>
> > Does anyone know how to programatically find the root directory of the
> > current web application?  I'm am trying to access a file that
> sits in the
> > "default-web-app" directory within my servlet code.
>
> Will getServletContext().getRealPath( "/" ) work for you?
> tim.
>
>
>


Reply via email to