This check can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHEC

来源:互联网 发布:电话属于网络吗 编辑:程序博客网 时间:2024/05/22 02:09

今天把之前的一个项目考到另一个myeclipse,我用的事tomcat7,启动时报错:

SEVERE: Servlet.service() for servlet jsp threw exception
javax.el.ELException: The identifier [case] is not a valid Java identifier as required by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.

查找资料才知道,这是由于在默认情况下,在tomcat 7中SKIP IDENTIFIER CHECK功能是错误的(这在tomcat 6及以下版本中是这样),我在正则表达式中使用“case”,case是标识符,因此会引发错误。
解决方法是将变量case改成其他就可以成功启动项目了,
主要原因是使用了关键字case,在使用el表达式时,不要使用关键字或与保留字。

阅读全文
0 0