tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefán F. Stefánsson <>
Subject RE: startup class in Tomcat
Date Tue, 23 Jan 2001 15:52:18 GMT
Make a servlet which init() only calls the methods needed in your class.
That way you extract the functionality to your class and the servlet is
only a wrapper.

In other words, create a new servlet that actually does nothing except
in the init method it calls the necessary methods in your class.


-----Original Message-----
From: William Au []
Sent: 23. janúar 2001 15:43
Subject: Re: startup class in Tomcat

The way I understand it, load-on-startup will only work on a servlet,
only the init() method is called.  What I have now is a generic Java
So I will have to convert it into a servlet and put most of the code
init().  I was just trying to see if I can use my class as-is.


Michael Wentzel wrote:

> > Besides setting load-on-startup in the web.xml file, is there
> > way
> > to have a startup class define in Tomcat? ( ie I want a class to run
> > whenever
> > Tomcat is started)
> Sounds to me like load-on-startup is what you need...  Is there
> some reason this does not fit your needs?
> ---
> Michael Wentzel
> Software Developer
> <A HREF="">Software As We Think</A>
> <A HREF="">Michael Wentzel</A>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message