req.getRequestURI());
  req.getServletPath());
where req is the request object.
You could use either of the two. only thing is that getRequestURI() will
include the extra path info also whereas getServletPath will not.
 ----- Original Message -----
From: "Henning Meinhardt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 08, 2000 12:24 PM
Subject: Servlet getting it's own path?


> Hi everybody.
>
> Can a servlet get the path it was loaded from by the servlet container? I
> want to have a property file lying in the same directory as the servlet
und
> have the servlet access the file without using a servlet parameter of the
> container pointing to the directory where the file lies.
>
> Thanks in advance.
> Henning Meinhardt
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to