aspose file tools*
The moose likes Tomcat and the fly likes Starting Servlet automaticaally when tomcat starts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Starting Servlet automaticaally when tomcat starts?" Watch "Starting Servlet automaticaally when tomcat starts?" New topic
Author

Starting Servlet automaticaally when tomcat starts?

ayyappa karamsetty
Greenhorn

Joined: Feb 26, 2011
Posts: 4
Hi folks.


I have a requirement where , i have one table in that columns are phno , name , id. when ever i update the table one servlet need to read that table and gather phno's continuously with out giving any request to that servlet. Then we can get phno's which are new ones
and send sms to those only.

any one have idea on this send sms. i am using spring's ,tomcat .
is there any other way to do this.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Your title and your post content seem to contradict.

An idea for your title: Have a look at load on start up element of the web.xml

An idea for your post content: Since you are using Spring, have a look at Spring's timer feature


SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
Have a look at load on start up element of the web.xml

No, don't do that. load-on-startup is an obsolete hack, and should not be used any more. Servlets are for request processing - no request, no servlet.

Web app initialization is done by servlet context listeners these days.


Ping & DNS - updated with new look and Ping home screen widget
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Starting Servlet automaticaally when tomcat starts?
 
Similar Threads
SMS sending functionality working when hard coded. but not working when called through a trigger
SMS Sending Issue
Is it possible to do this?
How I send sms through servlet?
Need to Invoke a Java Program from a trigger