Andy Chu <andychu <at> gmail.com> writes:

> 
> Dear All,
> 
> In my self-defined service, an IEngineSerivce, I need to access files under 
> ${CONTEXT}/myfiles. Would you please tell me how to access them with a 
> FileInputStream ?

Try: 
String path = 
cycle.getRequestContext().getServlet().getServletContext().
getRealPath("/myfiles/foo");
FileInputStream stream = new FileInputStream(path);

--
Author of e-book for learning Tapestry (www.agileskills2.org/EWDT)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to