开发者

How can I run initialization code during axis2 startup?

开发者 https://www.devze.com 2022-12-18 07:02 出处:网络
I have a 3rd party library that I use in my webapp. I need to call an init method from this library during axis2 startup.

I have a 3rd party library that I use in my webapp. I need to call an init method from this library during axis2 startup.

I can't wait until the first request comes in - it must be done at start开发者_如何学Cup.


in your web.xml:

<listener>
    <listener-class>com.my.YourServletContextListener</listener-class>
</listener>

Where YourServletContextListener has to implement javax.servlet.ServletContextListener and provide your initialization code in the contextInitialized(..) method.

This method is called as soon as the servlet context is loaded.

0

精彩评论

暂无评论...
验证码 换一张
取 消