标签:contex 对象 cat cookie user ges path text val
示例 结果
${1+1} 2
${1-1} 0
${1*3} 3
${3/2} 1.5
${5%3} 2
示例 结果
${2>1} true
${1<0} false
${1==1} true
${3!=2} true
${5>=2} true
${4<=3} false
示例 结果
${true||true} true
${true||false} true
${false||false} false
${true&&true} true
${true&&false} false
${false&&false} false
${!true} false
${!false} true
示例: ${2>1? "true" : "false"} 结果 true
String username = "tom";
${empty username} 结果 true
如:
<context-param>
<param-name>username</param-name>
<param-value>tom</param-value>
</context-param>
${sessionScope.person.name}
${sessionScope.person.age}
// HashMap userInfo= new HashMap(); userInfo.put("username","tom"); userInfo.put("password","123456");
${userInfo.username}
${userInfo.password}
${names[0]} // String names = {"tom","lisa","jerry"}
${names[0]}
标签:contex 对象 cat cookie user ges path text val
原文地址:http://www.cnblogs.com/guoxh/p/7586856.html