• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Starting Servlet automaticaally when tomcat starts?  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 10191
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 42974
76
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!