Hello.

I'm attempting to use 

        System.getProperty("user.dir")

in my servlet to locate the a directory that is hopefully the directory
where my servlets were installed.  I need to write some persistent database
files as the servlet runs.  

Here's where I'm getting confused... On other servlet engines such as JRun
this system call returns the directory where the servlets themselves were
installed.  However, on my Apache JServ (on a Linux system) setup, this
system call returns "/".

I guess this seems strange to me and I'm not sure where I messed up (or if
I did).  If my servlet is used at a site where I don't have root access, I
will not be able to use it since (obviously), I probably won't be able to
write the files requried by my servlet to maintain persistence.

So, a few questions that I have are

1) Is getProperty("user.dir") returning what is considered to be correct
information (especially in JServ)?

1.a) Why is there inconsistency between servlet implementations?

2) What are other ways to get the path to the directory where the servlet
exists?

Many thanks for any help anyone can provide.

Pete Willemsen
[EMAIL PROTECTED]





----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to