表达式语言跳过标识符检查tomcat 7 [英] Expression Language skip identifier check in tomcat 7

查看:380
本文介绍了表达式语言跳过标识符检查tomcat 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误:

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功能是false(在tomcat中是正确的6和以下),我在正则表达式中使用case, case 是标识符,因此它会引发错误。

It is due to in tomcat 7 by default SKIP IDENTIFIER CHECK feature is false(which was true in tomcat 6 and below) and I use "case" in regular expression and case is identifier so it throws error.

我找到以下解决方案:
javax.el.E​​LException :标识符[return]不是有效的Java标识符

I found following solution: javax.el.ELException: The identifier [return] is not a valid Java identifier

但是对我来说不行,因为我不想在我的代码中进行更改。所以我想要解决方案将tomcat 7配置为SKIP标识符检查为true。

But it would not work for me because I don't want to make changes in my code. So I want solution to configure tomcat 7 to SKIP IDENTIFIER CHECK to true.

即使经过大量的搜索,我还没有找到办法。我使用eclipse juno和tomcat 7,请帮我看看这个。

Even after lots of googling I didn't find way to do this. I am using eclipse juno and tomcat 7, please help me regard this.

推荐答案

最后得到了eclipse的解决方案。将下面的行添加到我指定的位置

Finally got solution for eclipse. Add below line to the location I specify

-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true

请查看以下逐步图片

STEP 1 :

STEP 2 :

STEP 3 :

干杯。 :)

这篇关于表达式语言跳过标识符检查tomcat 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆