Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2015-07-23 23:11:16 +0000
committerJoakim Erdfelt2015-07-23 23:11:16 +0000
commit06cb0ca8975fd38019fa0f596f0ed9d493416fc7 (patch)
treefdeaa3fa2dbd8dc3c4402e1fdd9f0017bdf61e5c /apache-jstl/src/test/webapp
parent0476d4d28d6350616bb41525d0b6cbe1067d57aa (diff)
downloadorg.eclipse.jetty.project-06cb0ca8975fd38019fa0f596f0ed9d493416fc7.tar.gz
org.eclipse.jetty.project-06cb0ca8975fd38019fa0f596f0ed9d493416fc7.tar.xz
org.eclipse.jetty.project-06cb0ca8975fd38019fa0f596f0ed9d493416fc7.zip
Adding <c:catch> JSTL test cases
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