You can use the "getDocumentBase()" method to find the path/URL of your servlet. and/or "getCodeBase()" which gets the base URL.
Hope this helps.
Panos
> -----Original Message-----
> From: Saikat Chatterjee [mailto:[EMAIL PROTECTED]]
> Sent: 08 December 2000 10:10
> To: [EMAIL PROTECTED]
> Subject: Re: Application Path
>
>
> Hello,
> Thanks for your reply.It works. But i want to
> slightly extend my
> question. Is it possible to exact path of a servlet? My
> servlets are loaded
> under webapps\myapp\web-inf\classes and then in package
> format. Can i get the
> exact path of a servlet?
>
> Thanks in advance
>
> Saikat
>
> Albert Chang - �i�� wrote:
>
> > String appPath = request.getRealPath("/");
> >
> > -----Original Message-----
> > From: Saikat Chatterjee [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 08, 2000 5:17 PM
> > To: [EMAIL PROTECTED]
> > Subject: Application Path
> >
> > Hello All,
> > I have a question regarding application path in
> Tomcat. I have
> > loaded and application named "myapp" under 'webapps' of
> Tomcat. Now, is it
> > possible to know the full path of my application
> "myapp"?[i.e upto and
> > including
> > the folder 'myapp']
> >
> > Thanks in advance,
> >
> > Saikat
>
