struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignacio de Córdoba <>
Subject Best global parameter aproach for struts2
Date Wed, 28 Jan 2009 02:20:17 GMT

Hi there,
after starting some serious migration from struts to struts2 I am wondering
is there is any "best practices" for global application parameters.
I used to store this parameters in web.xml, but as struts2 finds important
not to be tied to the "http" thing (I read it very often in docs... about
unit testing, etc.) I find myself with problems every time I want to get a
web.xml init parameter.
In actions it is not that difficult, but it is in interceptors, as there is
no way to get the ServletContext as they have no init method getting it as a
parameter. (I am now lazy loading that parameter at first Action invocation
to the interceptor)
I wonder if there is another aproach to set init parameters and forget about
web.xml... I need some init parameters easily readable from both actions and
interceptors... struts.xml,, ...

Thanks for any ideas,
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message