EL表达式无效?
来源:互联网 发布:网络电影制作流程 编辑:程序博客网 时间:2024/06/09 15:34
好久没用过EL表达式了,今天用了竟然不起作用。先说下我的开发环境吧,用的是JDK1.5,Tomcat5.5。最后的解决方案是在JSP页面加<%@ page isELIgnored="false" %> 就OK了。
在网上查了一下,问题就出在建Web Project的时候web.xml声明上。
web.xml声明部分一般分为如下版本的xsd,
web-app_2_2.xsd
web-app_2_3.xsd
web-app_2_4.xsd
web-app_2_5.xsd 在默认情况下,Servlet 2.3 / JSP 1.2是不支持EL表达式的,而Servlet 2.4 / JSP 2.0支持
下面是官方Documention中isELIgnored Attribute的详解:
The isELIgnored Attribute
• Format
– <%@ page isELIgnored="false" %>
– <%@ page isELIgnored="true" %>
Purpose
– To control whether the JSP 2.0 Expression Language
(EL) is ignored (true) or evaluated normally (false).
• Notes
– If your web.xml specifies servlets 2.3 (corresponding to
JSP 1.2) or earlier, the default is true
• But it is still legal to change the default—you are permitted
to use this attribute in a JSP-2.0-compliant server
regardless of the web.xml version.
– If your web.xml specifies servlets 2.4 (corresponding to
JSP 2.0) or earlier, the default is false
为了不在每个页面添加<%@ page isELIgnored="false" %>,网上说可以在web.xml中这样配置
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
</jsp-property-group>
</jsp-config>
- el表达式无效
- el表达式无效
- EL表达式无效?
- EL表达式无效的解决方案
- EL表达式无效的问题
- EL表达式无效的解决方法
- JSP中EL表达式无效的问题
- JSP页面EL表达式无效的问题
- JSP页面EL表达式无效的问题
- JSP中EL表达式无效问题
- JSP中EL表达式无效的问题
- JSP中EL表达式无效的问题
- JSP页面EL表达式无效的问题
- JSP中EL表达式无效的问题
- JSP中EL表达式无效的问题
- JSP页面EL表达式无效的问题
- JSP页面EL表达式无效的问题
- spring MVC jsp页面EL表达式无效
- JQuery源码学习——匿名函数
- 多孔材料吸附性质模拟程序RASPA的离线和在线安装方法
- 第八章:多态(下)
- android so文件加载连接简单理解
- win8.1下安装ubuntu,通过iso文件做双系统步骤,调整引导页
- EL表达式无效?
- 基于公众号服务的预付款会员卡服务系统
- 时间相关
- View 事件传递
- 60.[PHP]PHP简介及LNMP环境搭建(CentOS 7环境)
- 如何解决request.getParameter()取值乱码问题
- PreparedStatement接口详解
- maven私服搭建
- iOS面试常见问题最全梳理