javax.el.E​​LException:标识符[return]不是有效的Java标识符

Mah*_*leh 4 java-ee tomcat7

我有一个页面网址,看起来像:

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.
Run Code Online (Sandbox Code Playgroud)

任何想法为什么我得到它?要解决它,我应该只在tomcat中更改此属性吗?

Rol*_*lig 7

return是Java编程语言(tm)中的保留关键字.但幸运的是,有一种替代拼写.试试吧param['return'].