>I want to determine the real, absolute, path to where my servlet is
>running within my servlet.  Is there any way to do this other than passing
>initialization arguments to the servlet?  I want to create/read/modify a
>file within the servlet's directory.

String req.getRealPath ("/" ) will get you your root directory. From there
you should be able to figure out how to specify the servlet directory.
Note, you may not have the proper permissions to create a file in the
servlet's directory. That depends on its permission settings.

Regards,
Steve Mann

-------------------------------------------
Creative Digital Publishing Inc.
1317 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.788.0138            805.593.3811 (fax)
[EMAIL PROTECTED]       http://www.cdpubs.com

___________________________________________________________________________
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

Reply via email to