-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan,

On 11/12/2009 11:47 AM, Dan Armbrust wrote:
> How can I make tomcat cancel the deployment of the entire war file 
> that this servlet was distributed with?

By the time the servlets are started, the context (webapp) has already
started up, though that is not defined by the servlet spec per se.

> I thought that throwing a ServletException back up to Tomcat would 
> make the webapp unavailable

The servlet specification does not require that the container behave in
this way.

> but Tomcat continues to serve pages from this webapp even though the
> startup failed.  That doesn't seem like correct behavior... am I
> missing a setting somewhere?

What you are observing is correct behavior. Note that no requests will
be routed to a servlet that has not successfully completed its init()
method, so you've got that going for you.

Unfortunately, I don't really have any ideas of how to mitigate this,
other than to set some kind of context attribute that contains the names
of all the successfully-started servlets, and then write a filter to
check to make sure the list is complete before processing any requests.
That's a little hacky and still doesn't really get you what you want,
though.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr8jkAACgkQ9CaO5/Lv0PCrIwCgl/QKZZBLau7LuSJSvBpUyV0d
Y5MAn1cTg5cBK1rQCqXfd+NdfrDimC5p
=ZDYt
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to