August 2002
Intermediate to advanced
688 pages
23h
English
<c:catch>
The <c:catch>
action catches an exception thrown by JSP elements in its body,
providing fine-grained error control. The exception can optionally be
saved as a page scope variable.
<c:catch [var="var"]>JSP elements</c:catch>
|
Attribute name |
Java type |
Dynamic value accepted |
Description |
|---|---|---|---|
var |
String |
No |
The variable name |
<c:catch var="importException">
<fmt:parseDate value="${param.empDate}" dateStyle="short" />
</c:catch>
<c:if test="${importException != null}">
<jsp:forward page="input.jsp">
<jsp:param name="msg" value="Invalid date format" />
</jsp:forward>
</c:if>Read now
Unlock full access