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:[EMAIL PROTECTED]]
Sent: 23. janúar 2001 15:43
To: [EMAIL PROTECTED]
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:[EMAIL PROTECTED]">Michael Wentzel</A>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to