You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paweł Wielgus <po...@gmail.com> on 2010/01/20 09:36:14 UTC
Re: Migration from Struts1 to Struts2.1.6 - Plugin in Application
Starup
Hi Raghu,
i think You can do it with ServletContextListener,
register it in web.xml like this:
< web-app >
...
< listener >
< listener-class >
com.package.MyListener
< /listener-class >
< /listener >
< /web-app >
and overwrite public void contextInitialized(ServletContextEvent
context) method in MyListener that implements ServletContextListener.
Best greetings,
Paweł Wielgus.
2010/1/18 Raghuveer <ra...@infotechsw.com>:
> I need to migrate an application from struts1 to struts2.1.6.
>
> I had a plug-in configurations existing in Strut1 application related to SAP
> connection pool creation(CCreateSAPConnectionPlugin.java as shown below
> implementing org.apache.struts.action.PlugIn).This will create a SAP
> connection pool with connections.
>
>
>
> How this can be implemented through struts2.1.6.
>
> Is there a facility to implement custom plugin and to make it called dusting
> application startup.
>
>
>
>
>
>
>
> <!-- ========== Declare Log Plugin =====================================-->
>
> <plug-in className="com.utc.test.loadonstatup..util.LogPlugin">
>
> <set-property property="devlLogConfigFile"
> value="/log4j.properties"/>
>
> </plug-in>
>
> <!-- ========== Declare SAP Plugin =====================================-->
>
> <plug-in
> className="com.utc.test.loadonstatup..util.CCreateSAPConnectionPlugin">
>
> <set-property property="devlSapConfigFile"
> value="/config/config.properties"/>
>
> </plug-in>
>
>
>
> Regards,
> Raghu
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org