Tomcat sets system property "catalina.home" at runtime. I guess other app
servers does similiar things. Try to get it like:

System.getProperty("catalina.home");

On 2/14/06, Daniel Lydiard <[EMAIL PROTECTED]> wrote:
>
> Isn't there a ServletContext getRealPath() that does something like that?
>
> ----- Original Message -----
> From: "Lindsay Steele" <[EMAIL PROTECTED]>
> To: "Tapestry users" <[email protected]>
> Sent: Monday, February 13, 2006 3:51 PM
> Subject: Re: Real path of the app server
>
>
> > Unless I am mistaken .. but from my testing this only gives me the path
> > of a file once it has been written.
> >
> > I can decide where to write a file by giving it a hard coded location -
> > but I need something that goes across different OS's.
> >
> > If I could find where the web server is I could better choose where to
> > write the file.
> >
> > The other alternative is to just let it write the file and then move it
> > .. but this could make things a bit messy unless I can control
> > where it writes the file.
> >
> > Would be best if there was some way to get the real path on disk of the
> > web server.
> >
> >
> > Jesse Kuhnert wrote:
> >> new File(".").getAbsolutePath() ?
> >>
> >> On 2/13/06, Lindsay Steele <[EMAIL PROTECTED]> wrote:
> >>
> >>> This should be simple but I just can't find it.
> >>>
> >>> I need to know from within tapestry the real path to the current
> >>> webserver so that it can be used when uploading.
> >>>
> >>> eg .. c:\Tomcat 5.5\  or   /var/tomcat
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to