On Tue, Aug 10, 2004 at 05:16:24PM -0500, Randy Paries wrote:
: If I remove the <load-on-startup> tag from the web.xml, then the first time
: I call the servlet the init gets only called once

What's your evidence that init() is being called twice? I'm after log
messages, etc.  Are you sure the entire context (webapp) isn't being
loaded twice due to autoDeploy or loadOnStartup?

btw, the servlet spec gives containers leeway to create as many
instances of a given servlet as they see fit; so your servlet may very
well be init()'d multiple times within a context's runtime.

If you're using a servlet+<load-on-startup> to perform some one-time
context initialization, look into ServletContextListener instead.  It
was designed with that in mind.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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

Reply via email to