code097.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>EL逻辑运算</title>
</head>
<body>
<%
request.setAttribute("userName", "tom");
request.setAttribute("pwd", "123");
%>
userName = ${userName}<br>
pwd = ${pwd}<br>
\${userName !="" && (userName=="大王")}
${userName !="" && (userName=="大王")}
<br>
\${userName == "tom" && pwd == "123"}
${userName == "tom" && pwd == "123"}
</body>
</html>