원인 : Java Method는 64KB보다 커질 수 없음.

(JLS 4.10) The amount of code per non-native, non-abstract method is limited to 65536 bytes by the sizes of the indices in the exception_table of the Code attribute (§4.7.3), in the LineNumberTable attribute (§4.7.8), and in the LocalVariableTable attribute (§4.7.9).

 

근본원인? :

Tomcat에서 사용하는 Jasper compiler는 <> tag 하나가 method 하나를 생성.

JSP 파일에서 행이 바뀔 때마다 해당 내용을 'out.print("......\n");'으로 변환하여 file size를 키움.

 

해결방법 :

1. web.xml에 mappedfile config를 false로 설정하면 out.println() 으로 변환하지 않아 compile되는 파일 사이즈를 줄일 수 있음.

2. 여러 jsp 파일로 나누고 @include가 아니라 jsp:include 사용