User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 401,552 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,547 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 2228 | Replies: 3
Reply
Join Date: Jan 2007
Posts: 12
Reputation: jeet_portal is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jeet_portal jeet_portal is offline Offline
Newbie Poster

Help Auto call to a servlet file inside Tomcat 4.1

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,693
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 195
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Auto call to a servlet file inside Tomcat 4.1

  #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.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Join Date: Jan 2007
Posts: 12
Reputation: jeet_portal is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jeet_portal jeet_portal is offline Offline
Newbie Poster

Re: Auto call to a servlet file inside Tomcat 4.1

  #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  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,693
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 195
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Auto call to a servlet file inside Tomcat 4.1

  #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.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 3:35 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC