EL——基本知识点

EL表达式
EL语法:${expression}  字符${为EL表达式的开始,如果想发送字符${,则需要转换第一个字符,入:\${。
保留字:and eq gt true instanceof or ne le false empty not lt ge null div mod
[]和.运算符:访问某个对象中的属性,[]和.运算符效果相同${object["propertyName"]}或者${object.propertyName}
             如果propertyName不是有效的Java变量名称,则只能使用[]运算符。
关闭EL运算
    关闭EL有两种方式
    第一:<%@page isELIgnored="true" %> 在jsp页面上关闭
    第二:关闭一个jsp页面
          <jsp-config>
              <jsp-property-group>
                  <url-pattern>/new.jsp</url-pattern>
                  <el-ignored>true</el-ignored>
              </jsp-property-group>
          </jsp-config>
          关闭所有jsp页面的EL
          <jsp-config>
              <jsp-property-group>
                  <url-pattern>*.jsp</url-pattern>
                  <el-ignored>true</el-ignored>
              </jsp-property-group>
          </jsp-config>
            
关于EL的基础知识看另一篇:https://www.cnblogs.com/it-mh/articles/10382719.html
posted @ 2019-08-12 15:36  !O0O!  阅读(256)  评论(0)    收藏  举报