Another option is to subclass the Struts 2 FilterDispatcher to perform
initializations:
public class YourAppDispatcher extends FilterDispatcher {
public void init(FilterConfig filterConfig) throws ServletException {
super.init(filterConfig);
// your initialization code here...
}
}
Gab
You can do the same with an application scope bean using spring . Create
a simple pojo that initializes values on the constructor. Then add an
entry to the applicationContext.xml file :
Then in your java action file that you wish to have access declare :
private MyComponent myComp;
and
On 9/7/07, j alex <[EMAIL PROTECTED]> wrote:
> How is the ServletContextListener suited for my purpose ? . Can you please
> elaborate a little more? . What i'm looking for is access to the properties
> files' values and flags read from DB, not able to relate how this is related
> to the listener.
Hi Chris,
How is the ServletContextListener suited for my purpose ? . Can you please
elaborate a little more? . What i'm looking for is access to the properties
files' values and flags read from DB, not able to relate how this is related
to the listener.
Thanks,
Joseph
On 9/7/07, Chris Pratt <[
On 9/7/07, j alex <[EMAIL PROTECTED]> wrote:
> In Struts 1, we were having an init servlet to load the application-wide
> properties like dropdown values (from property files) into application
> context and accessing these within JSP. Is there a better way of doing this
> in Struts 2, and do we req
Hi,
In Struts 1, we were having an init servlet to load the application-wide
properties like dropdown values (from property files) into application
context and accessing these within JSP. Is there a better way of doing this
in Struts 2, and do we require an initialization servlet at all ? .
Thank
6 matches
Mail list logo