Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to execute a java application once the server starts

843841Dec 12 2007 — edited Dec 14 2007
I have created a java application which executes correctly. I want this application to execute everytime I start my server. I have modified my web.xml as shown below

<servlet>

<servlet-name>SendEmail</servlet-name>

<servlet-class>

com.allcorp.alliance.tdocs.servlets.SendEmail</servlet-class>

<init-param>

<param-name>config</param-name>

<param-value>/WEB-INF/struts-config.xml</param-value>

<load-on-startup>1</load-on-startup>

</init-param>

</servlet>

I have extended the class with HttpServlet. When I start the server, I get the message saying the class is being initializing but it does not execute. I want the application to execute. Any idea what I need to do.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2008
Added on Dec 12 2007
8 comments
333 views