Hello,

you can get the servlet context (and using getRealPath, etc) as an 
attribute of its context:
ServletContext sc = (ServletContext) 
getContext().getAttributes("org.restlet.ext.servlet.ServletContext");

This attribute is not set at instantiation time, but is avaible for 
example from the Application#createInboundRoot method.

Otherwise, you can externalize the full path of the root directory, 
which gives you more control on the storage place.

Best regards,
Thierry Boileau

> hey!
>
> I have set up restlet inside j2ee (tomcat). now I want to save a file so the 
> client can access this file.
>
> The problem: I dont know how to save the file into the web-inf directory, 
> because I dont know how to get the path.
>
> At the moment I'm using FileWriter(filename).
>
> Thanks in advance!
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2435011
>
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2435211

Reply via email to