tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wentzel <>
Subject RE: Checking the time
Date Tue, 16 Jan 2001 12:53:35 GMT
> Hi, i have a problem, i am developing servlets under Tomcat 3.1 and Apache
1.3.1 under a Suse 7.0. I 
> need to develop a program that check the time everynight and send e-mail
to the users if it´s 
> necessary. I would like how to configure that program and where must it be
placed (a directory of 
> Tomcat..).

You could write a GenericServlet(since I'm assuming you don't need support
for HTTP methods... post, get, put, etc...) that in the init method starts a
persistent thread that waits for a specific time and
does something only at that time.  Then add this servlet to your web.xml
file(templates for doing this are including in the core web.xml files) and
add the following line for your new <servlet></servlet> block in web.xml:


This will cause your servlet to be loaded (and therefore the init method
called) when the server is started.  The value for this property is a
startup index for the priority startup queue.  The lower the value(can be
negative) the sooner the servlet is loaded.

Hope this makes sense.

Michael Wentzel
Software Developer
<A HREF="">Software As We Think</A>
<A HREF="mailto://">Michael Wentzel</A>

View raw message