본문 바로가기

Develop/JAVA & Spring

[Tomcat] Java 유효하지 않은 식별자 관련 / javax.el.ELException: java spring The identifier [native] is not a valid Java identifier as required by section 1.19 EL specification - SKIP_IDENTIFIER_CHECK

예상원인 : 
1. 유효하지 않은 식별자를 사용 "${native}"
2. Java 버전업에 따른 식별자 제약사항 변경(구축 Java 1.6 -> 현재 Java 1.8)
3. Eclipse/Tomcat 기반의 개발환경에서 발생


발생예제 :
[Java]
ModelAndView mav;
mav.addObject("native", "N");

[JSP]
<input type="hidden" name="native" id="native" value="${natiev}">


[JSP]
<input type="hidden" name="native" id="native" value="${natiev}">


해결방안 : 
톰캣 구동 시 java 식별자 유효성 체크하지 않도록 옵션 추가

Tomcat Configure > VM arguments : 

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

 

 

에러로그 : 

Error Message : 
심각: Servlet.service() for servlet [jsp] threw exception
javax.el.ELException: java spring The identifier [native] is not a valid Java identifier as required by section 1.19 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.

...

심각: Servlet.service() for servlet [jsp] threw exception
java.io.IOException: org.apache.tiles.util.TilesIOException: JSPException including path '/WEB-INF/views/member/minorjoinstep1.jsp'.

...

Caused by: javax.el.ELException: Failed to parse the expression [${native}]

 

참고 - stackoverflow.com/questions/23607919/jstl-is-not-working-after-migration-to-tomcat-7

 

JSTL is not working after migration to Tomcat 7

Hello everyone, today I have migrated my application from Tomcat 6 to Tomcat 7. The server started successfully without any error messages, but when I tried accessing one of the JSP files, which was

stackoverflow.com