Hi,
I need to be able to read a file when I start the application server.
Can some please help me.
I would example some examples.
Regards
Simon
yakovfain@gmail.com - 20 Dec 2005 20:10 GMT
Google on java startup classes
Larry - 21 Dec 2005 20:38 GMT
In your web.xml file, you can specify to load a servlet on statup:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Put your code for reading the file in the init() method of that servlet.