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

I have a page url that looks like this:

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

After installing tomcat 7 when I tried 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 it? To fix this, should I change this property only in tomcat?

+4
source share
1 answer

return is a reserved keyword in the Java programming language (tm). But, fortunately, there is an alternative spelling. Instead, try param['return'] .

+7
source

All Articles