struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paweł Wielgus <poulw...@gmail.com>
Subject Re: Migration from Struts1 to Struts2.1.6 - Plugin in Application Starup
Date Wed, 20 Jan 2010 08:36:14 GMT
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 <raghuveerv@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


Mime
View raw message