Henri Dupre wrote:
I'm currently porting our upcoming website to tapestry 4.
How can I access the servlet object? I need to query one of the init
parameters (where I store the version)
Also in the engine object, I was loading an xml file into the global
context in the setupforrequest method, but it seems to have gone now.
Where should I do it now?
Thanks,
Henri.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I don't see a way to access the servlet object directory, but if you
inject service:tapestry.globals.ApplicationGlobals into your page, you
can then call getWebContext() that has access to the servlet's init
parms. Here's an example
@InjectObject("service:tapestry.globals.ApplicationGlobals")
public abstract ApplicationGlobals getApplicationGlobals();
then you could:
getApplicationGlobals().getWebContext().getInitParameterValue("some key");
Of couse you don't have to use annotations, you could use <inject>
inside your specification file.
scott.
--
Scott F. Walter Scott F. Walter
Principal Consultant
Vivare, Inc.
E: [EMAIL PROTECTED]
E: [EMAIL PROTECTED]
Visit scottwalter.com <http://scottwalter.com> --Point. Click. Explore!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]