You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Inge Solvoll <in...@gmail.com> on 2009/04/17 23:33:21 UTC
T5 equivalent of ServletContext.getResource()
Hi!
I'm converting an old servlet to T5. The one thing I can't seem to figure
out is how to do this in Tapestry:
servletConfig.getServletContext().getResource("/'WEB-INF/files/config.xml");
That is, getting a URL object from any resource in the webapp, inside or
outside WEB-INF. I need the URL object to send to another framework we're
using for generating RTF.
Anyone who can help me?
Inge :)
Re: T5 equivalent of ServletContext.getResource()
Posted by Inge Solvoll <in...@gmail.com>.
Excellent, thanks :)
I only checked RequestGlobals, didn't know/remember ApplicationGlobals
existed :)
On Sat, Apr 18, 2009 at 1:19 AM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> Hi!
>
> Try injecting the ApplicationGlobals and using its getServletContext()
> method.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: T5 equivalent of ServletContext.getResource()
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Hi!
Try injecting the ApplicationGlobals and using its getServletContext()
method.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org