The purpose of EL is to aid producing scriptless JSP pages
Syntax of EL in a JSP page:${expr}
You can escape the expression:
\${expr}
<body>
<form action="el2.jsp">
username:<input type="text" name="username">
password:<input type="submit" name="password">
<input type="submit" value="submit" >
</form>
<body>
${param.username }
${param.password}
<!-- <%= request.getParameter("username") %>-->
</body>
Beans within the namespace avaiable to the JSP can be accessed easily using EL.
Beans can be accessed by way of dot notation:${bean.attribute}
Beans can be located by searching through the scopes:page,request,session and application
Beans scope can be specified by preceding the bean name with the scope
${sessionScope.cust.fristName}
<%session.setAttribute("aa","bb"); %>
${sessionScope.aa}<br>
<%=session.getAttribute("aa") %>
Implicit Object :Description
if the bean return an array ,and element can specify its
index using[] nation:
${paramValues.fruit[2]}
username: <input type="text" name="username">
<input type="text" name="username">
<input type="text" name="username">
${paramValue.username[2]}
Example operation
${2+1*3}
User user = new User;
session.setAttribute("user",user);
${sessionScope.user.sex}
User user = (User)session.getAttribute("user");
String sex = user.getSex();
${sessionScope.user.sex}equals${sessionScope.user["sex"]}
TypeCast:${param.count+20}