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
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: 9427
    
    2

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, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42291
    
  64
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 - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Starting Servlet automaticaally when tomcat starts?