Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expression Language skip identifier check in tomcat 7

I got following error :

SEVERE: Servlet.service() for servlet jsp threw exception
javax.el.ELException: The identifier [case] 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.

It is due to in tomcat 7 by default SKIP IDENTIFIER CHECK feature is false(which was true in tomcat 6 and below) and I use "case" in regular expression and case is identifier so it throws error.

I found following solution: javax.el.ELException: The identifier [return] is not a valid Java identifier

But it would not work for me because I don't want to make changes in my code. So I want solution to configure tomcat 7 to SKIP IDENTIFIER CHECK to true.

Even after lots of googling I didn't find way to do this. I am using eclipse juno and tomcat 7, please help me regard this.

like image 961
commit Avatar asked Apr 09 '13 10:04

commit


3 Answers

Finally got solution for eclipse. Add below line to the location I specify

-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true

Please look for below step by step images

STEP 1 :

Step 1

STEP 2 :

Step 2

STEP 3 :

Step 3

Cheers. :)

like image 62
commit Avatar answered Nov 16 '22 20:11

commit


Create a setenv.[bat|sh] file in CATALINA_HOME/bin (i.e. alongside all your other scripts) and set the system property in that file. On Windows you'd create setenv.bat with the following contents:

SET CATALINA_OPTS=%CATALINA_OPTS% -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true

On Linux you'd create setenv.sh with the following contents:

export CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true"

You can repeat those lines (changing the system property name) to set multiple system properties in the same setenv.[bat|sh] file.

like image 44
Mark Thomas Avatar answered Nov 16 '22 20:11

Mark Thomas


We can also add following command to catalina.sh file under the tomcat_home dir/bin

CATALINA_OPTS="-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true"

like image 33
Istiyak Vasiwala Avatar answered Nov 16 '22 20:11

Istiyak Vasiwala