How do you know they're running Tomcat? Ask the ServletContext for a "real path":
File imagesDir = new File( servletContext.getRealPath( "/images" ) ); You can get the servlet context in Tapestry via injection( tapestry.globals.ServletContext is the service name). -----Original Message----- From: Lindsay Steele [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 28, 2006 6:02 AM To: Tapestry users Subject: Re: Getting servlet directory String tomcatHome = System.getProperty("catalina.home"); Jean-Eric Cuendet wrote: > Hi, > Is there a way to get the servlet directory from within Tapestry? > I need to know where it is to read images that I need to generate a PDF. > It's on my local machine /opt/tomcat/webapps/sympto/images but that > could/would be different when in production. > Thanks > -jec > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
