java - How can I run initialization code during axis2 startup? -


i have 3rd party library use in webapp. need call init method library during axis2 startup.

i can't wait until first request comes in - must done @ startup.

in web.xml:

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

where yourservletcontextlistener has implement javax.servlet.servletcontextlistener , provide initialization code in contextinitialized(..) method.

this method called servlet context loaded.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -