Can load-on-startup in web.xml be used to load an arbitrary class on startup?

Viewed 27936

How can I load an arbitrary class on startup in Tomcat? I saw load-on-startup tag for web.xml file, but can I use it and how should I implement my class?

<servlet-name>??</servlet-name>
<servlet-class>??</servlet-class>
<load-on-startup>10</load-on-startup>
4 Answers
Related