use the getRealPath() of servlet request.
it gives u the hard disk mapping of from where servlet was loaded
Punam Chordia
ITL Infosys
Pune Infotech Park
91-02139-32800 Extn. 2025
> -----Original Message-----
> From: Kevin Yancy [SMTP:[EMAIL PROTECTED]]
> Sent: Sunday, March 12, 2000 3:30 AM
> To: [EMAIL PROTECTED]
> Subject: Servlet File Access
>
> Hi all,
>
> I wrote a class that will open a static HTML file and return
>
> the <BODY> portion in various formats. The idea is that a
> servlet could use this class to get all or a portion of it's
>
> content from static HTML files.
>
> This works, but only if I provide the full path on the local
>
> file system where the servlet resides. This of course won't
> get it. The static HTML files will always be in a
> subdirectory of where the servlet that accesses them resides
>
> (i.e. /myServletDir/content).
>
> How can I determine where the servlet was actually loaded so
>
> that I can access the files in the "content" subdir by a
> relative pathname?
>
> Apologize in advance if this is a dumb question. I checked
> the archives but couldn't find the answer :-)
>
> thanx
> Kevin
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html