You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by satyanarayana katta <sa...@gmail.com> on 2010/06/23 20:08:07 UTC

Re: IMPORTANT Call action on application deploy, like servlet with load-on-startup (Struts 2)

If u have used spring in ur application then u can use the init-method.  Here is how it works

You can configure your war to load the spring upon app start-up.  The init method will auomatically get invoked.

Sent from my iPhone

On Jun 23, 2010, at 11:03 AM, Oscar <os...@gmail.com> wrote:

> Hi to all, i have the next situation: I need to call an action on
> application startup like you can call a servlet on application startup
> by setting <load-on-startup> parameter servlet on web.xml . I can't
> use a servlet because i need to trigger my interceptors that
> initialize JPA EntityManager . Is there a way to achieve this?
> 
> Best regards.
> 
> -- 
> Oscar Calderón
> SCJP 6
> http://www.javahowto.net/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org