Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'apache-jstl/src/test/webapp')
-rw-r--r--apache-jstl/src/test/webapp/catch-basic.jsp16
-rw-r--r--apache-jstl/src/test/webapp/catch-taglib.jsp11
2 files changed, 27 insertions, 0 deletions
diff --git a/apache-jstl/src/test/webapp/catch-basic.jsp b/apache-jstl/src/test/webapp/catch-basic.jsp
new file mode 100644
index 0000000000..06e2bcfd2b
--- /dev/null
+++ b/apache-jstl/src/test/webapp/catch-basic.jsp
@@ -0,0 +1,16 @@
+<%@ page contentType="text/plain; charset=UTF-8" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+Title: JSTL c:catch test
+
+<c:catch var ="catchException">
+ <fmt:parseNumber var="parsedNum" value="aaa" />
+</c:catch>
+
+<c:if test = "${catchException != null}">
+[c:catch] exception : ${catchException}
+[c:catch] exception.message : ${catchException.message}
+</c:if>
+<c:if test = "${catchException == null}">
+[c:catch] exception is null
+</c:if>
diff --git a/apache-jstl/src/test/webapp/catch-taglib.jsp b/apache-jstl/src/test/webapp/catch-taglib.jsp
new file mode 100644
index 0000000000..68c7b8f50e
--- /dev/null
+++ b/apache-jstl/src/test/webapp/catch-taglib.jsp
@@ -0,0 +1,11 @@
+<%@ page contentType="text/plain; charset=UTF-8" %>
+<%@ taglib uri="org.eclipse.jetty.jstl.jtest" prefix="jtest" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+Title: JSTL c:catch test
+
+<jtest:errortest>
+ <fmt:parseNumber var="parsedNum" value="aaa" />
+</jtest:errortest>
+
+parsedNum = <c:out value="${parsedNum}"/> \ No newline at end of file

Back to the top