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
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply 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: 8795

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: 35256
    
    7
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.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Starting Servlet automaticaally when tomcat starts?
 
Similar Threads
Need to Invoke a Java Program from a trigger
SMS sending functionality working when hard coded. but not working when called through a trigger
Is it possible to do this?
How I send sms through servlet?
SMS Sending Issue