You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Benny Law <be...@gmail.com> on 2009/09/30 20:39:02 UTC

Reading context-params in T5

Hello,

I define the application version along with some other things as
context-params in web.xml. What is the best way to read these parameters in
T5? Thanks.

Benny

Re: Reading context-params in T5

Posted by Benny Law <be...@gmail.com>.
Thanks a lot guys!  The Context service is a perfect fit in my case.

Benny

On Thu, Oct 1, 2009 at 3:17 AM, Robin Komiwes <od...@gmail.com> wrote:

> Just inject the "Context" service and use the getInitParameter method.
>
>
>
> On Thu, Oct 1, 2009 at 9:01 AM, Inge Solvoll <inge.tapestry@gmail.com
> >wrote:
>
> > I believe you just have to inject SymbolSource into your class and get
> the
> > parameter value from there. The ServletContextSymbolProvider should be on
> > top of the situation :)
> >
> > On Wed, Sep 30, 2009 at 8:39 PM, Benny Law <be...@gmail.com>
> wrote:
> >
> > > Hello,
> > >
> > > I define the application version along with some other things as
> > > context-params in web.xml. What is the best way to read these
> parameters
> > in
> > > T5? Thanks.
> > >
> > > Benny
> > >
> >
>

Re: Reading context-params in T5

Posted by Robin Komiwes <od...@gmail.com>.
Just inject the "Context" service and use the getInitParameter method.



On Thu, Oct 1, 2009 at 9:01 AM, Inge Solvoll <in...@gmail.com>wrote:

> I believe you just have to inject SymbolSource into your class and get the
> parameter value from there. The ServletContextSymbolProvider should be on
> top of the situation :)
>
> On Wed, Sep 30, 2009 at 8:39 PM, Benny Law <be...@gmail.com> wrote:
>
> > Hello,
> >
> > I define the application version along with some other things as
> > context-params in web.xml. What is the best way to read these parameters
> in
> > T5? Thanks.
> >
> > Benny
> >
>

Re: Reading context-params in T5

Posted by Inge Solvoll <in...@gmail.com>.
I believe you just have to inject SymbolSource into your class and get the
parameter value from there. The ServletContextSymbolProvider should be on
top of the situation :)

On Wed, Sep 30, 2009 at 8:39 PM, Benny Law <be...@gmail.com> wrote:

> Hello,
>
> I define the application version along with some other things as
> context-params in web.xml. What is the best way to read these parameters in
> T5? Thanks.
>
> Benny
>