EL表示式的用法
阿新 • • 發佈:2019-02-09
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
</head>
<body>
<h4>c:catch的使用</h4>
<c:catch var="error">
<%
int i = 8/0;
%>
</c:catch>
<c:out value="${error.message }"></c:out>
</body>
</html>
pageEncoding="GB18030"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
</head>
<body>
<h4>c:catch的使用</h4>
<c:catch var="error">
<%
int i = 8/0;
%>
</c:catch>
<c:out value="${error.message }"></c:out>
</body>
</html>