You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Bulling <sp...@phoenix.hadiko.de> on 2006/03/21 20:00:49 UTC
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: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: get Servlet base path
Posted by James Carman <ja...@carmanconsulting.com>.
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:andreas@phoenix.hadiko.de] 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: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org