tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefán F. Stefánsson <stef...@snote.decode.is>
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.

Regards
	Stefan

-----Original Message-----
From: William Au [mailto:billa@cnet.com]
Sent: 23. janúar 2001 15:43
To: tomcat-user@jakarta.apache.org
Subject: Re: startup class in Tomcat


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

Bill

Michael Wentzel wrote:

> > Besides setting load-on-startup in the web.xml file, is there
another
> > 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="http://www.aswethink.com">Software As We Think</A>
> <A HREF="mailto:wentzel@aswethink.com">Michael Wentzel</A>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message