javax.el.ELException:标识符 [返回] 不是有效的 Java 标识符
我有一个页面网址,如下所示:
http://mydomain.com/nodes /32/article/new?return=view
安装 tomcat 7 后,尝试访问它时出现此异常:
/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.
有什么想法为什么会出现这个情况吗?要修复它,我应该只在 tomcat 中更改此属性吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
return
是 Java 编程语言(tm) 中的保留关键字。但幸运的是,还有另一种拼写。尝试使用param['return']
代替。return
is a reserved keyword in the Java Programming Language(tm). But luckily there is an alternative spelling. Tryparam['return']
instead.