우아한 프로그래밍

1. 오류로그


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

Error. org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 35 in the generated java file The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit Stacktrace:

//------------------------

(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 *** attribute (§4.7.8), and in the LocalVariableTable attribute (§4.7.9).

2. 해결방안


  1. web.xml에 아래 코드를 삽입한다.

        <servlet>
            <servlet-name>jsp</servlet-name>
            <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
            <init-param>
                <param-name>mappedfile</param-name>
                <param-value>false</param-value>
            </init-param>
        </servlet>
    ​
    
  2. 실제적인 해결방안으로는 파일을 쪼개기위해 include를 사용하는 것을 추천한다.

'프로그래밍 > JSP' 카테고리의 다른 글

[JSP] 이클립스를 활용하여 웹프로젝트 생성  (3) 2016.07.02
profile

우아한 프로그래밍

@자바조아!

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!