반응형
jsp에서 this를 사용하다가 아래의 에러가 발생했다. 결국 이 에러의 원인은 jsp에서 this를 사용하여 발생한 문제다.
javax.el.ELException: The identifier [this] 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.
원인
jsp에서 blob 저장을 할 때 해당 파일의 이름을 캔버스바디의 크기로 설정할 때 this를 사용했다.
this.saveBlob(blob, `screencapture-${this.tsim01CanvasBody.width}x${this.tsim01CanvasBody.height}.png`);
문제 해결 방법
이 문제를 해결하는 방법은 this를 사용하지 않는 방법과 정작 사용해야 한다고 하면 jsp 파일이 아닌 js 파일을 새로 만들어서 사용하는 방법이다.
this.saveBlob(blob, `screencapture-${tsim01CanvasBody.width}x${tsim01CanvasBody.height}.png`);
추가적으로, 자바 식별자 유효성 체크를 하지 않도록 하는 방법도 있다.
-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true
반응형
최근댓글