• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat autorun

 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know how to have tomcat auto start a servlet once the tomcat service is started.
I found that if I include
<load-on-startup>1</load-on-startup>
for my servlet in my xml that would work. But I have also read that this can cause complications.
Thanks in advance for your help,
Ryan
 
Ryan Bailey
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok here is my web.xml file

I was told the lower the number takes precedence in <load-on-startup>
My code is as follows

Neither one of my sys.out statements are being called.
Any suggestions? I would like to make a timed thread execute once tomcat is started. I am using tomcat 4.1
Thanks in advance for your time,
Ryan
 
reply
    Bookmark Topic Watch Topic
  • New Topic