Expression Language skip identifier check in tomcat 7

后端 未结 5 1777
一向
一向 2020-12-28 10:53

I got following error :

SEVERE: Servlet.service() for servlet jsp threw exception
javax.el.ELException: The identifier [case] is not a valid Java identifier          


        
相关标签:
5条回答
  • 2020-12-28 11:22

    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. :)

    0 讨论(0)
  • 2020-12-28 11:24

    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"

    0 讨论(0)
  • 2020-12-28 11:25

    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.

    0 讨论(0)
  • 2020-12-28 11:35

    If you are using Eclipse, for example, you have to add the folowing line to catalina.properties in Servers folder, (look for it in Package Explorer, and select your corresponding Tomcat folder):

    org.apache.el.parser.SKIP_IDENTIFIER_CHECK=true
    

    Remember that Eclipse uses different location for configurations rather CATALINA original directories.

    It's worthy to take a look on Tomcat's properties page, at https://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html

    0 讨论(0)
  • 2020-12-28 11:36

    I had the same problem while migrating my present application to Tomcat 7 it is(jsf 1.2 with ice faces 1.8.2). I have solved it by including a bat file with name setenv.bat with the below content in it. 'SET CATALINA_OPTS=%CATALINA_OPTS% -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true'

    i have included it in TomcatInstallationDirectory/bin.

    it is read by catalina.bat file. in the below line 'call "%CATALINA_BASE%\bin\setenv.bat"'.

    Hence my jspx pages are rendered appropriately

    I had went through the following documentation by tomcat:

    https://tomcat.apache.org/tomcat-7.0-doc/RUNNING.txt

    please do post all the solution you made

    0 讨论(0)
提交回复
热议问题