The auxiliary interface of a Tag, IterationTag or BodyTag tag
handler that wants additional hooks for managing resources.
This interface provides two new methods: doCatch(Throwable)
and doFinally(). The prototypical invocation is as follows:
h = get a Tag(); // get a tag handler, perhaps from pool
h.setPageContext(pc); // initialize as desired
h.setParent(null);
h.setFoo("foo");
// tag invocation protocol; see Tag.java
try {
doStartTag()...
....
doEndTag()...
} catch (Throwable t) {
// react to exceptional condition
h.doCatch(t);
} finally {
// restore data invariants and release per-invocation resources
h.doFinally();
}
... other invocations perhaps with some new setters
...
h.release(); // release long-term resources
This interface provides two new methods: doCatch(Throwable) and doFinally(). The prototypical invocation is as follows:
h = get a Tag(); // get a tag handler, perhaps from pool h.setPageContext(pc); // initialize as desired h.setParent(null); h.setFoo("foo"); // tag invocation protocol; see Tag.java try { doStartTag()... .... doEndTag()... } catch (Throwable t) { // react to exceptional condition h.doCatch(t); } finally { // restore data invariants and release per-invocation resources h.doFinally(); } ... other invocations perhaps with some new setters ... h.release(); // release long-term resources