Moby
Moby

Reputation: 29

Alternative Servlet if initialization stage fails

During loading or initializing stage of a Servet, if due to some unknown reason, exception is thrown,do we have way to call some alternative Servlet ( may be some callback mechanism ? ).

Upvotes: 1

Views: 33

Answers (1)

Andrea
Andrea

Reputation: 2764

No, there's nothing about that in Jee specs. The init method should use (ie throw) an UnavailableException to indicate a permanent or temporary failure...but what that means is definitely up to the container which can be different between vendors.

However, even in "vendor" extensions (e.g. websphere, jboss, weblogic) I never seen a feature like that

Upvotes: 1

Related Questions