jakarta-ee - javax.el.E​​LException : The identifier [return] is not a valid Java identifier

标签 jakarta-ee tomcat7

我有一个页面 url,它看起来像:

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

最佳答案

return是 Java Programming Language(tm) 中的保留关键字。但幸运的是,还有另一种拼写。试试 param['return']反而。

关于jakarta-ee - javax.el.E​​LException : The identifier [return] is not a valid Java identifier,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6233473/

相关文章:

spring - 从Spring Tool Suite部署Gradle任务以部署War文件

maven - 为什么要运行tomcat7:deploy与tomcat7:redeploy?

linux - 32 位到 64 位 jvm 迁移 - jboss web 应用程序和 linux 服务器

java - 当用户从资源类访问资源时,Rest Service 将如何执行?

java - memcached 自定义序列化器 jar 的正确位置

android - 如何在我的 PC 上运行 Apache Tomcat Web 服务器并从真正的 Android 设备访问?

tomcat - 运行多个 tomcat 服务器

java - 处理具有未知异常类的堆栈跟踪

java - LinkedList 上的 ArrayIndexOutOfBoundsException : -32443 with iterator . 下一个

java - 使用 DeltaSpike Security 时出现 ClassCastException?