EL(Expression Language)
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.">
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}