<%@ 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>
<%--
.与[]运算符用来存取数据
${sessionScope.user.sex}和${sessionScope.user["sex"]}同
${sessionScope.shoppingCart[0].price}
EL隐含对象
语法:${表达式或变量}
eg:<body>${sampleValue+1}</body>
${sessionScope.user.sex}
隐含对象:
pageContext
pageScope
*requestScope
*sessionScope
*param
*paramValues
applicationScope
cookie
--%>
<%
out.write("hahaha");
String tt="ha do y d";
out.write(tt);
%>
${10+5}
是否为空:${empty sessionScope.user.sex}
是否不为空:${not empty sessionScope.user.sex}
</body>
</html>
EL表达式
最新推荐文章于 2021-04-29 20:18:09 发布