6

我有一个页面网址,如下所示:

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 中更改此属性吗?

4

1 回答 1

9

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

于 2011-06-03T23:14:31.333 回答