Auto call to a servlet file inside Tomcat 4.1

Reply

Join Date: Jan 2007
Posts: 17
Reputation: jeet_portal is an unknown quantity at this point 
Solved Threads: 0
jeet_portal jeet_portal is offline Offline
Newbie Poster

Auto call to a servlet file inside Tomcat 4.1

 
0
  #1
Mar 13th, 2007
Hi Experts,

I have written a Servlet file which sends email to a user .When if i run that servlet file in command Prompts it sends a email .Now i want that servlet file to be automatically executed inside my Tomcat server within a stipulated Time . Sothat it can send automatic reminder emails .How is it Possible..pls Help me . I have tried a lots but still i can't make it out. I also add listener in my web.xml file then also i can't get my requirements.....Pls help me out

Thanx in Advance
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Auto call to a servlet file inside Tomcat 4.1

 
0
  #2
Mar 14th, 2007
it's easy. Start a Timer inside the servlet init method, set the servlet to load on web application startup, and away you go.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 17
Reputation: jeet_portal is an unknown quantity at this point 
Solved Threads: 0
jeet_portal jeet_portal is offline Offline
Newbie Poster

Re: Auto call to a servlet file inside Tomcat 4.1

 
0
  #3
Mar 16th, 2007
Originally Posted by jwenting View Post
it's easy. Start a Timer inside the servlet init method, set the servlet to load on web application startup, and away you go.

Yes i can start a timer inside the servlet init Method but how to set the servlet sothat it will startup automatically in my web application. Do i use listener in web.xml or any other way are there so that my servlet will automatically load on web application
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Auto call to a servlet file inside Tomcat 4.1

 
0
  #4
Mar 17th, 2007
check the servlet specification. There's a simple flag you can set on a servlet declaration in the web.xml that causes the container to load the servlet during application startup.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC