JSP JSTL < C: catch > tag: catch exception tag

< C: catch [var = "name"] >... Code with exception < / C: catch >

Example

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  <c:catch var = "error">
    <%
       String str = "mrzx";
       Integer number = new Integer(str);
     %>
  </c:catch>//将异常信息输出
  <c:out value = "发生异常${error}"></c:out>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>