Name
TryCatchFinally
Synopsis
The
TryCatchFinally
interface provides methods for
handling exceptions thrown while evaluating the body of an action
element and can be implemented by a tag handler in addition to one of
the main tag handler interfaces: Tag
,
IterationTag
, and BodyTag
.
Synopsis
Interface name: |
javax.servlet.jsp.tagext.TryCatchFinally |
Extends: |
None |
Implemented by: |
Custom action tag handler classes |
Methods
-
public void doCatch(Throwable exception) throws Throwable
Handles the specified exception and may optionally rethrow the same exception or a new exception. This method is invoked by the container if an exception is thrown when evaluating the body or by calling
doStartTag( )
,doEndTag( )
,doInitBody( )
, ordoAfterBody( )
.-
public void doFinally( )
Typically clears per-invocation state, such as closing expensive resources used only for one invocation. This method is invoked after
doEndTag( )
or afterdoCatch( )
if an exception is thrown when evaluating the body or by callingdoStartTag( )
,doEndTag( )
,doInitBody( )
, ordoAfterBody( )
.
Get JavaServer Pages, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.