tomcat 7中EL表达式报"is not a valid Java identifier"...
2012-07-16 14:01
423 查看
在tomcat 7中默认会检查EL表达式中是否会有java关键字。比如Foo#getClass()#name()中有class关键字,${foo.class.name}这样就是会报错,解决方法是${foo['class'].name},再如Session#isNew() ,要${pageContext.session['new']}这样表达。
参考https://issues.apache.org/bugzilla/show_bug.cgi?id=50147
或者有另种比较暴力的解决方法,就是修改配置文件,不让检查java关键字。在tomcat 6中“org.apache.el.parser.SKIP_IDENTIFIER_CHECK”默认是false的。
解决方法:
$CATALINA_BASE/conf/catalina.properties 增加
org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
org.apache.el.parser.SKIP_IDENTIFIER_CHECK=true
$CATALINA_BASE/conf/Catalina/localhost/webapp.xml 增加
<Context path="" docBase="/vmind/vmind" useHttpOnly="false" debug="0" reloadable="false">
或修改server.xml的context选项,增加useHttpOnly="false" 即可。
参考:/article/11182837.html
参考https://issues.apache.org/bugzilla/show_bug.cgi?id=50147
或者有另种比较暴力的解决方法,就是修改配置文件,不让检查java关键字。在tomcat 6中“org.apache.el.parser.SKIP_IDENTIFIER_CHECK”默认是false的。
解决方法:
$CATALINA_BASE/conf/catalina.properties 增加
org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
org.apache.el.parser.SKIP_IDENTIFIER_CHECK=true
$CATALINA_BASE/conf/Catalina/localhost/webapp.xml 增加
<Context path="" docBase="/vmind/vmind" useHttpOnly="false" debug="0" reloadable="false">
或修改server.xml的context选项,增加useHttpOnly="false" 即可。
参考:/article/11182837.html
相关文章推荐
- VM tools安装错误The path "" is not a valid path to the 3.5.0-23-generic kernel headers.
- java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- bug:"Operation is not valid due to the current state of the object."
- 有感"Java is not platform-independent, it is the platform"
- fedora下安装vmware-tools时提示 The path "" is not a valid path to the $(kernel number) kernel headers
- Z-order assignment: " is not a valid widget.
- The期path "" is not a valid path to the 3.11.0-15-generickernel headers
- javax.el.ELException: The identifier [import] is not a valid Java identifier as required by section
- Qt 中 Z-order assignment: " is not a valid widget.
- 虚拟机安装VMware Tools出现 The path "" is not a valid path to the 3.11.0-18-generic kernel headers.
- (上一篇的问题解决后又遇到的新问题)在eclipse中导入工程后运行任意文件出现"The selection is not within a valid module"
- svnmanager1.10: VersionControl_SVN_Exception: "svn_path" is not a valid option
- 有感"Java is not platform-independent, it is the platform"
- java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- vmware7安装vmwareTools出现Searching for a valid kernel header path... The path "" is not valid.
- [WebService] the namespace on the "definitions" element, is not a valid SOAP version
- "There is not a valid medialib id!"与解析wav文件格式
- The path "" is not a valid path to the 3.5.0-44-generic kernel headers.
- 解决vmware fusion + centos 7安装vmtools时提示The path "" is not a valid path to the xxx kernel headers.