Byte limit Exceed problem when reloading a jsp page?

前端 未结 7 1882
日久生厌
日久生厌 2020-12-06 07:38

Im new to jsp.I\'m getting error is The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit

I am using s

7条回答
  •  误落风尘
    2020-12-06 08:12

    Move some of the logic out of your JSP pages and into dedicated beans.

    The limit of 65k bytes per Java method is insanely high and only very, very long methods exceed it.

    Note also that the length of any strong constants is not included in that method, so you simply have some absurd amount of logic in that single method (note: JSPs are compiled into Servlets, wher the _jspService method holds the main bulk of the content of the JSP).

    So you simply have too much logic. You shouldn't have any logic in your JSP at all (only output rendering).

    Also note that <%@ include and are simply two different ways to do the same thing in this case, so that won't make a difference.

提交回复
热议问题