javax.el.ELException: The identifier [return] is not a valid Java identifier

。_饼干妹妹 提交于 2019-12-20 01:09:40

问题


I have a page url, which looks like:

http://mydomain.com/nodes/32/article/new?return=view

After installing tomcat 7, when trying to access it I got this exception:

/nodes/${param.id}/article/new?return=${param.return}
contains invalid expression(s): javax.el.ELException: The identifier [return] 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.

Any ideas why I get that? To fix it should I change this property in tomcat only?


回答1:


return is a reserved keyword in the Java Programming Language(tm). But luckily there is an alternative spelling. Try param['return'] instead.



来源:https://stackoverflow.com/questions/6233473/javax-el-elexception-the-identifier-return-is-not-a-valid-java-identifier

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!