<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body>
<!--简单运算 -->
${17+2}
<!--==和eq的用法完全 相同 -->
${5==5}
${5 eq 5}
${4<5}
${4 lt 5}
&{3>2&&2<1}
${3>2and 2<1}
${3>2||2<1}
${3>2 or 2<1 }
${!(3>2)}
<!-- empty判断p存在不存在,再判断p的内容是否是空的 -->
${empty p}
${a?b:c}
<!-- 在四个作用域由小到大搜索 -->
${name}
<!-- 从request中搜索属性名字为password的值 -->
${requestScope.password}
<%-- <%
pageContext.setAttribute("name", "zs");
request.setAttribute("password", "123");
Student s = new Student();
s.setName("ls");
request.setAttribute("s", s);
%> --%>
<!-- 取出s对象的名字的名字 -->
${s.name }
${s["name"] }
<!-- 系统和浏览器信息 -->
${header["User-Agent"] }
<!-- 工程根目录 -->
${pageContext.request.contextPath }
</body>
</html>
04-01