Source Code : Catch an Exception in JSTL
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Catch an Exception in JSTL
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
<title>Catch an Exception</title>
</head>
<body>
<c:catch var="e">
<c:set var="x" value="10" scope="page" />
<c:set var="y" value="five" scope="page" />
x divided by y is
<c:out value="${x/y}" />
<br />
</c:catch>
<br />
<c:if test="${e!=null}">The caught exception is:
<c:out value="${e}" />
<br />
</c:if>
<c:if test="${e==null}">No exception was thrown
<br />
</c:if>
</body>
</html>
Thank with us