Solution for Java class size exceeding 65535 bytes because JSP include many files (reproduced)

Source: Internet
Author: User

Yesterday, I met a problem that gave me a headache. I made a common JSP, only to measure it is OK, but, put in the other JSP include it, will be wrong as shown in the title: The Code of Method _jspservice (HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit. The JSP used to adjust it is written in this way:<% @include file= "/module name/nani_include.jsp"% >. So I changed this include phrase to <jsp:include flush= "true" page= "/module name/nani_include.jsp"/>. No more mistakes. Because <%@ include file= ""%> is in the JSP container to translate the JSP file into a servlet file, and to edit it, is the static contains the JSP, that is, the editor is a kind of file, and Java file is forbid over 65k this big , so it will be wrong as shown in the title. and <jsp:include flush= "true" page= "" "/> in the translation and editing, the production of two kinds of files, that is, the modified JSP to generate a unique type of file, and the JSP generated by the application of its type file, only a method to adjust the JSP.

But the problem is now. The parameters are not going to go in.

The solution is to adjust its JSP with <jsp:param>.

<jsp:include flush= "true" page= "/Module name/nani_include.jsp" >
<jsp:param name= "ss" value= "_programform"/>
</jsp:include>

In the used JSP, the El table is used to connect the parameters:

${SS}

(Whatever the sign in it, name "SS" is OK)

I hope there are people who can't solve the problem can see hehe

Solution for Java class size exceeding 65535 bytes because JSP include many files (reproduced)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.