-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
OK... now you're asking for miracles! You need to write
"us...@miracleworkers.com" har de har!
-Original Message-
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com]
Sent: Thursday, November 12, 2009 12:08 PM
To: Tomcat Users List
Subject: Re: How to cancel a
ve no control over that?
If so, maybe a system level monitor to shut down the context if the
startup fails.
-Original Message-
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com]
Sent: Thursday, November 12, 2009 1:18 PM
To: Tomcat Users List
Subject: Re: How to cancel a servlet st
Thanks for all the tips. I'll have to put something together with a filter.
Just wanted to make sure there wasn't an easier way that I was missing.
Dan
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additiona
I'll one up it to make it trivial ...
// put this in a filter mapped to everything
doFilter(...) {
if (servletContext.getAttribute("initFailed")) {
response.sendError(503);
return;
}
chain.doFilter(request,response);
}
// and put this in any servlet or listerer
} catch(Throwable e)
Dan Armbrust wrote:
> I'll tell you what, if you can tell me how to prevent my users (who
> have full control over the application / installation / hardware where
> this is running) from being able to shoot themselves in the foot and
> do something that causes my app to fail - I'll buy you a case o
>From a spec perspective, you're only guaranteed that the specific
servlet that throws an exception from its init method will be taken
out of service, not the entire app. One possibility might be to do the
system checks in a ServletContextListener and then have a Filter
operate on every request, in
I'll tell you what, if you can tell me how to prevent my users (who
have full control over the application / installation / hardware where
this is running) from being able to shoot themselves in the foot and
do something that causes my app to fail - I'll buy you a case of beer
and not worry about t
Dan,
Pardon my advice, but... this sounds like a programming/config/illegal
state error that shouldn't make it to production.
Of course, you could simply add instrumentation to the system to detect
that this servlet didn't do its thing, and route every request to a
holding page.
Joe
-Orig