When creating a large page, a Summary of all choices made on the ten or more pages before it, I receive the following error:
The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
From searching elsewhere, I can find this question: Byte limit Exceed problem when reloading a jsp page? but my problem is slightly different. I have no code in the page, beyond (several) c:forEach
tags.
It seems to work when I move one of the c:forEach
blocks to another jsp and jsp:include
it, but the other question implies that this shouldn't work.
I want to make sure I'm not doing some heinous act of coding, so if there's a different solution, I'm open to hearing it.
(I'll reiterate that there is NO business logic code inside this jsp, just c:forEach
and c:if
tags used strictly to determine if specific sections should be shown. The if tests are simple boolean checks that rely on the servlet to populate the boolean answer that the jsp checks.)
For an example of the if statements in the Jsp that I'm talking about:
Jsp:
<c:if test="${viewOnly==null}">
<div align="center">
<input type="button" name="editInfo"
title="Update"
id="Update"
value="Update"
class="button" />
</div>
</c:if>
Java:
if (request.getParameter("view") != null) {
viewOnly = "Y";
}
mv.addObject("viewOnly", viewOnly);
If it helps, I'm using SpringMVC and Hibernate. (Some spring:message tags were removed from the jsp code and replaced with the actual message.)