What triggers the initialization servlet to start up?  Do you have a
quickie Perl script which submits a request to that URL right after the
site is started?

We are using Jserv (still at version 0.9-something) which allows you to
specify a list of servlets to start immediately upon server startup.
Also, we have a lot of servlets that use other servlets to do something,
so the init() method for one servlet will grab a reference to another
servlet via getServletContext().getServlet() or whatever that function is
called. Lucky for us that Jserv automatically loads the other servlet if
it hasn't already been loaded.. from what I've read the servlet API
doesn't guarantee this behavior, and it's entirely possible to get a null
return value.  What servlet engine do you use - and how does it handle
this situation?

-Tony

 On Sun, 28 Nov 1999, Craig R. McClanahan wrote:

> For initialization, it is still something of a pain that there is no global
> "application start" and "application stop" events in the servlet API.  I get
> around this by using an initialization servlet like you do -- initialize the
> resources in the init() method and finalize them in the destroy() method.  As long
> as the servlet container does not throw out your initialization servlet (perhaps
> because no one is calling it), this works fine.  If the server does this, you
> might be better off moving the finalization stuff to a particular servlet that you
> explicitly call only when you are going to shut down the server.


*  Anthony Smith-Grieco   [EMAIL PROTECTED]   http://www.reed.edu/~ansmith  *

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to