Check out ServletContext.getRealPath():

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html#getR
ealPath(java.lang.String)

-----Original Message-----
From: Andreas Bulling [mailto:[EMAIL PROTECTED] On Behalf Of
Andreas Bulling
Sent: Tuesday, March 21, 2006 2:01 PM
To: Tapestry users
Subject: get Servlet base path

Hi all,

a short question I wasn't able to find an answer for:
How can I get the (absolute) path of the servlet context?
I have a Upload component and I want to save all of the files
in a subdirectory of the context (perhaps even below WEB-INF,
I don't know).

What I've done so far:

@InjectObject("service:tapestry.globals.ServletContext")
public abstract ServletContext getServletContext();

How to go on?!

Thanks!
  Andreas

---------------------------------------------------------------------
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