JSP页面上使用EL标签无效(会被当做普通字符串输出)
出现问题:在page directive中的isELIgnored属性用来指定是否忽略。格式为: <%@ page isELIgnored="true|false"%> 如果设定为真,那么JSP中的表达式被当成字符串处理。比如下面这个表达式 1 + 1 , 在 i s E L I g n o r e d = " t r u e " 时 输 出 为 {1+1}, 在isELIgnored="true"时输出为 1+1,在isELIgnored="true"时输出为{1+1},而isELIgnored="false"时输出为2。Web容器默认isELIgnored="false"。
解决问题:所有把标签上添加一共isELIgnored="false"这个属性就行了,并且属性值为false。