-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
Paul
This creation of a file surprises me, the File object is used to determine the cwd
(the dot), there should be no writing done what so ever.
See chapter 10 of Thinking in Java by Bruce Eckel at www.BruceEckel.com
I use this method to initalize my db connection broker.
Prehaps there may be some file permission problems. Try running Apache JServ in
manual mode.
John
Paul Murphy wrote:
> Thanks John,
> tried that, java creates the file in your user.dir which isn't much use.
> There are good arguments as to why I shouldn't be able to find out this
> information but I think my need outweighs them.
> I think some of the JServ config info should be at least readable using a
> static method.
> Unless of course there's some sneaky easy way of finding out.
>
> Paul.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] On Behalf Of John
> Reynolds
> Subject: Re: environment information
>
> Paul,
>
> Try something like the below to get the path of the servlet class.
>
> File path = new File(".");
> String dir = path.getAbsolutePath();
> System.out.println("path is: " + dir);
>
> John
>
> Paul Murphy wrote:
>
> > I am trying to find out the real path for where my servlet is running
> from.
> > I am trying to do this in the init() method before I have access to a
> > HttpServletRequest object. I could work it out from the real path of where
> > JServ is located but there doesn't seem to be any static methods or
> members
> > to tell me where the JServ installation is.
> > I am using a properties file during initialisation but I have to hard code
> > the path right now. This makes it difficult to move the code between
> > development, testing and production.
> >
> > Any ideas?
> >
> > Thanks,
> > Paul.
> >
--
==============================================================================
Beta may be a state of mind
But Alpha is the state of being
me - but inspired be ./ sig
==============================================================================
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]