代码对于try块来说太大了

时间:2011-08-01 20:33:59

标签: java jsp web-applications

Eclipse编译并运行这个jsp就好了但是当我部署到Sun One 6.1时,我得到“代码太大而无法尝试{”

我正在尝试在执行聚合摘要时循环遍历bean列表。有关如何重构它以使其在我们过时的服务器上工作的任何建议吗? screenshot

        <c:set var="ahJan" value="20" scope="request" />
        <c:set var="ahTot" value="246" scope="request" />

        <table border="0" width="95%" cellspacing="0" cellpadding="0" class="tableBlackBorder">
            <tr>
              <td>
              <table width="100%" border="0" cellpadding="1" class="tableInternalBorder" id="sortable">
                    <tr>
                       <td class="tl">Source</td>
                       <td class="tl">Program</td>
                       <td class="tl">Project</td>
                       <td class="tl">Contract</td>
                       <td class="tl">Line Code</td>
                       <td class="tl">Jan</td>
                       <td class="tl">Total</td>
                    </tr>

                          <c:set var="prevProgram" value="" scope="request" />
                          <c:set var="prevProject" value="" scope="request" />
                          <c:set var="prevContract" value="" scope="request" />
                          <c:set var="prevLinecode" value="" scope="request" />
                          <c:set var="prevBusArea" value="" scope="request" />
                          <c:set var="ctc_totSub" value="" scope="request" />
                          <c:set var="plan_totSub" value="" scope="request" />

              <c:forEach var="gap" items="${list}" varStatus="status">

                 <c:if test="${status.first}">
                    <tr>
                       <td class="o" NOWRAP>Plan</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.pjan}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.plineSum}" /></td>
                    </tr>  
                    <tr>
                       <td class="o" NOWRAP>CTC</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><a href="CTC.jsp?filter=byDept&dept=<c:out value="${dept}" />&lineCode=<c:out value="${gap.linecode}" />&year=<c:out value="${year}" />"><c:out value="${gap.linecode}" /></a></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.ctcjan}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.ctclineSum}" /></td>
                    </tr>  
                    <tr>
                       <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>
                          <c:set var="deltaJan" value="${gap.pjan-gap.ctcjan}" />
                          <c:set var="deltaSubTotal" value="${gap.plineSum-gap.ctclineSum}" />

                          <c:set var="programDeltaJan" value="${deltaJan}" />
                          <c:set var="programDeltaSubTotal" value="${deltaSubTotal}" />

                          <c:set var="planProgramSubTot" value="${gap.plineSum}" />
                          <c:set var="ctcProgramSubTot" value="${gap.ctclineSum}" />
                    <tr>
                       <td class="o" NOWRAP>Delta Hrs</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${deltaJan}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaSubTotal}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${deltaSubTotal}" /></td>
                    </tr>  
                    <tr>
                       <td class="o" NOWRAP>Delta Heads</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaJan/(ahJan*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${deltaJan/(ahJan*8)}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaSubTotal/(ahTot*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${deltaSubTotal/(ahTot*8)}" /></td>
                    </tr>  
                 </c:if>

                 <c:if test="${gap.program_name == prevProgram}" >
                    <tr>
                       <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>

                    <tr>
                       <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>

                     <tr>
                       <td class="o" NOWRAP>Plan</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.pjan}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.plineSum}" /></td>
                    </tr>  
                    <tr>
                       <td class="o" NOWRAP>CTC</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><a href="CTC.jsp?filter=byDept&dept=<c:out value="${dept}" />&lineCode=<c:out value="${gap.linecode}" />&year=<c:out value="${year}" />"><c:out value="${gap.linecode}" /></a></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.ctcjan}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.ctclineSum}" /></td>
                    </tr>  
                    <tr>
                       <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>
                          <c:set var="deltaJan" value="${gap.pjan-gap.ctcjan}" />
                          <c:set var="deltaSubTotal" value="${gap.plineSum-gap.ctclineSum}" />


                          <c:set var="programDeltaJan" value="${programDeltaJan+deltaJan}" />
                          <c:set var="programDeltaSubTotal" value="${programDeltaSubTotal+deltaSubTotal}" />

                          <c:set var="planProgramSubTot" value="${planProgramSubTot+gap.plineSum}" />
                          <c:set var="ctcProgramSubTot" value="${ctcProgramSubTot+gap.ctclineSum}" />
                    <tr>
                       <td class="o" NOWRAP>Delta Hours</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${deltaJan}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaSubTotal}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${deltaSubTotal}" /></td>
                    </tr>  
                    <tr>
                       <td class="o" NOWRAP>Delta Heads</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaJan/(ahJan*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${deltaJan/(ahJan*8)}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaSubTotal/(ahTot*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${deltaSubTotal/(ahTot*8)}" /></td>
                    </tr>  


                 </c:if>


                 <c:if test="${gap.program_name != prevProgram && !status.first}" >
                    <tr>
                       <td class="CTCProgramSummary" colspan="5">Gap Summary for Program: <c:out value="${prevProgram}" /></td>
                       <td class="CTCProgramSummary" style="background-color: <c:if test='${0>programDeltaJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${programDeltaJan}" /></td>
                       <td class="CTCProgramSummary" style="background-color: <c:if test='${0>programDeltaDec}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${programDeltaDec}" /></td>

                       <c:set var="delta" value="${planProgramSubTot-ctcProgramSubTot}" />
                       <td class="CTCProgramSummary" style="background-color: <c:if test='${0>delta}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${delta}" /></td>

                          <c:set var="BusAreaDeltaJan" value="${BusAreaDeltaJan+programDeltaJan}" />
                          <c:set var="BusAreaDeltaSubTotal" value="${BusAreaDeltaSubTotal+programDeltaSubTotal}" />
                          <c:set var="planBusAreaSubTot" value="${planBusAreaSubTot+planProgramSubTot}" />
                          <c:set var="ctcBusAreaSubTot" value="${ctcBusAreaSubTot+ctcProgramSubTot}" />

                          <c:set var="programDeltaJan" value="" />
                          <c:set var="programDeltaSubTotal" value="" />

                          <c:set var="planProgramSubTot" value="" />
                          <c:set var="ctcProgramSubTot" value="" />
                    </tr>

                 <c:if test="${gap.business_area == prevBusArea}" >
                     <tr>
                       <td class="o" NOWRAP>Plan</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.pjan}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.plineSum}" /></td>
                    </tr>  
                    <tr>
                       <td class="o" NOWRAP>CTC</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><a href="CTC.jsp?filter=byDept&dept=<c:out value="${dept}" />&lineCode=<c:out value="${gap.linecode}" />&year=<c:out value="${year}" />"><c:out value="${gap.linecode}" /></a></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.ctcjan}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.ctclineSum}" /></td>
                    </tr>  
                     <tr>
                       <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>
                          <c:set var="deltaJan" value="${gap.pjan-gap.ctcjan}" />
                          <c:set var="deltaSubTotal" value="${gap.plineSum-gap.ctclineSum}" />


                          <c:set var="programDeltaJan" value="${programDeltaJan+deltaJan}" />
                          <c:set var="programDeltaSubTotal" value="${programDeltaSubTotal+deltaSubTotal}" />


                          <c:set var="planProgramSubTot" value="${planProgramSubTot+gap.plineSum}" />
                          <c:set var="ctcProgramSubTot" value="${ctcProgramSubTot+gap.ctclineSum}" />
                    <tr>
                       <td class="o" NOWRAP>Delta Hours</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${deltaJan}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaSubTotal}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${deltaSubTotal}" /></td>
                    </tr>  
              <tr>
                       <td class="o" NOWRAP>Delta Heads</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaJan/(ahJan*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${deltaJan/(ahJan*8)}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaSubTotal/(ahTot*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${deltaSubTotal/(ahTot*8)}" /></td>
                    </tr>  

                    </c:if>

                 <c:if test="${gap.business_area != prevBusArea && !status.first}" >

                    <tr>
                       <td class="CTCBusAreaSummary" colspan="5">Gap Summary for Business Area: <c:out value="${prevBusArea}" /></td>
                       <td class="CTCBusAreaSummary" style="background-color: <c:if test='${0>BusAreaDeltaJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${BusAreaDeltaJan}" /></td>
                       <c:set var="delta" value="${planBusAreaSubTot-ctcBusAreaSubTot}" />
                       <td class="CTCBusAreaSummary" style="background-color: <c:if test='${0>delta}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${delta}" /></td>


                          <c:set var="totalDeltaJan" value="${totalDeltaJan+BusAreaDeltaJan}" />
                          <c:set var="totalDeltaSubTotal" value="${totalDeltaSubTotal+BusAreaDeltaSubTotal}" />


                          <c:set var="planTotal" value="${planTotal + planBusAreaSubTot}" />
                          <c:set var="ctcTotal" value="${ctcTotal + ctcBusAreaSubTot}" />

                          <c:set var="BusAreaDeltaJan" value="" />
                          <c:set var="BusAreaDeltaSubTotal" value="" />

                          <c:set var="planBusAreaSubTot" value="" />
                          <c:set var="ctcBusAreaSubTot" value="" />
                    </tr>


                    <tr>
                       <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>

                    <tr>
                       <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>

                     <tr>
                       <td class="o" NOWRAP>Plan</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.pjan}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.plineSum}" /></td>
                    </tr>  
                    <tr>
                       <td class="o" NOWRAP>CTC</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><a href="CTC.jsp?filter=byDept&dept=<c:out value="${dept}" />&lineCode=<c:out value="${gap.linecode}" />&year=<c:out value="${year}" />"><c:out value="${gap.linecode}" /></a></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.ctcjan}" /></td>
                       <td class="oRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap.ctclineSum}" /></td>
                    </tr>  
                    <tr>
                       <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>
                          <c:set var="deltaJan" value="${gap.pjan-gap.ctcjan}" />
                          <c:set var="deltaSubTotal" value="${gap.plineSum-gap.ctclineSum}" />
                          <c:set var="planProgramSubTot" value="${planProgramSubTot+gap.plineSum}" />
                          <c:set var="ctcProgramSubTot" value="${ctcProgramSubTot+gap.ctclineSum}" />
                    <tr>
                       <td class="o" NOWRAP>Delta Hours</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${deltaJan}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaSubTotal}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${deltaSubTotal}" /></td>
                    </tr>  
              <tr>
                       <td class="o" NOWRAP>Delta Heads</td>
                       <td class="o" NOWRAP><c:out value="${gap.program_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.project_name}" /></td>
                       <td class="o" NOWRAP><c:out value="${gap.contract}" /></td>
                       <td class="oLeft"><c:out value="${gap.linecode}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaJan/(ahJan*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${deltaJan/(ahJan*8)}" /></td>
                       <td class="oRight" style="background-color: <c:if test='${0>deltaSubTotal/(ahTot*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${deltaSubTotal/(ahTot*8)}" /></td>
                    </tr>  

                          <c:set var="programDeltaJan" value="${programDeltaJan+deltaJan}" />
                          <c:set var="programDeltaSubTotal" value="${programDeltaSubTotal+deltaSubTotal}" />

                 </c:if>
                 </c:if>


                 <c:set var="prevLinecode" value="${gap.linecode}" />
                 <c:set var="prevContract" value="${gap.contract}" /> 
                 <c:set var="prevProgram" value="${gap.program_name}" /> 
                 <c:set var="prevProject" value="${gap.project_name}" /> 
                 <c:set var="prevBusArea" value="${gap.business_area}" /> 


                 <c:if test="${status.last}" >
                    <tr>
                       <td class="CTCProgramSummary" colspan="5">Gap Summary for Program: <c:out value="${prevProgram}" /></td>
                       <td class="CTCProgramSummary" style="background-color: <c:if test='${0>programDeltaJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${programDeltaJan}" /></td>
                       <td class="CTCProgramSummary" style="background-color: <c:if test='${0>programDeltaDec}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${programDeltaDec}" /></td>
                       <c:set var="delta" value="${planProgramSubTot-ctcProgramSubTot}" />
                       <td class="CTCProgramSummary" style="background-color: <c:if test='${0>delta}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${delta}" /></td>

                          <c:set var="BusAreaDeltaJan" value="${BusAreaDeltaJan+programDeltaJan}" />
                          <c:set var="planBusAreaSubTot" value="${planBusAreaSubTot+planProgramSubTot}" />
                          <c:set var="ctcBusAreaSubTot" value="${ctcBusAreaSubTot+ctcProgramSubTot}" />
                          <c:set var="planProgramSubTot" value="" />
                          <c:set var="ctcProgramSubTot" value="" />
                    </tr>

                    <tr>
                       <td class="CTCBusAreaSummary" colspan="5">Gap Summary for Business Area: <c:out value="${prevBusArea}" /></td>
                       <td class="CTCBusAreaSummary" style="background-color: <c:if test='${0>BusAreaDeltaJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${BusAreaDeltaJan}" /></td>
                       <c:set var="delta" value="${planBusAreaSubTot-ctcBusAreaSubTot}" />
                       <td class="CTCBusAreaSummary" style="background-color: <c:if test='${0>delta}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${delta}" /></td>


                          <c:set var="totalDeltaJan" value="${totalDeltaJan+BusAreaDeltaJan}" />
                          <c:set var="planTotal" value="${planTotal + planBusAreaSubTot}" />
                          <c:set var="ctcTotal" value="${ctcTotal + ctcBusAreaSubTot}" />
                    </tr>


                    <tr>
                       <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>

                    <tr>
                        <td colspan="18" class="TableRowBGSubNav"></td>
                    </tr>
                 </c:if>
              </c:forEach>

                    <tr>
                        <td colspan="5" class="CTCTotalSummary">TOTAL Gap Summary Hours:</td>
                       <td class="CTCTotalSummary" style="background-color: <c:if test='${0>totalDeltaJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${totalDeltaJan}" /></td>
                       <c:set var="delta" value="${planTotal-ctcTotal}" />
                        <td class="CTCTotalSummary" style="background-color: <c:if test='${0>delta}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${delta}" /></td>
                    </tr>
                    <tr>
                        <td colspan="5" class="CTCTotalSummary">TOTAL Gap Summary Heads:</td>
                       <td class="CTCTotalSummary" style="background-color: <c:if test='${0>totalDeltaJan/(ahJan*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${totalDeltaJan/(ahJan*8)}" /></td>
                       <c:set var="delta" value="${planTotal-ctcTotal}" />
                        <td class="CTCTotalSummary" style="background-color: <c:if test='${0>delta/(ahTot*8)}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${delta/(ahTot*8)}" /></td>
                    </tr>
                    <tr>
                        <td colspan="5" class="CTCTotalSummary">Accounting Hour Summary </td>
                       <td class="CTCTotalSummary" style="background-color: <c:if test='${0>ahJan}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${ahJan}" /></td>
                       <c:set var="delta" value="${planTotal-ctcTotal}" />
                        <td class="CTCTotalSummary" style="background-color: <c:if test='${ahTot}'>#FF0000</c:if>" ><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="1" value="${ahTot}" /></td>
                    </tr>

              </table>
              </td>
            </tr>
          </table>

编辑: 尝试使用forTokes:

<c:forTokens
    items="ctcjan, ctcfeb, ctcmar, ctcapr, ctcmay, ctcjun, ctcjul, ctcaug, ctcsep, ctcoct, ctcnov, ctcdec, ctclineSum"
    delims=", " var="curField">
      <td class="TableOutputTextRight"><fmt:formatNumber type="number" minIntegerDigits="1" maxFractionDigits="0" value="${gap[curField]}" /></td>
</c:forTokens>

仍然太大。还有其他任何削减想法吗?

编辑: 所以基本上我的修复是删除了很多聚合细节。我已经提出要求获得Glassfish或JBoss的IT请求。我已经阅读过有关JSF的内容,它看起来很棒!

1 个答案:

答案 0 :(得分:9)

Java中方法的大小限制为65535个字符。您需要重构该代码。这个网站有一个solution。来自Java Spec

  

字段和方法名称,字段和方法描述符的长度,   和其他常量字符串值限制为65535个字符   CONSTANT_Utf8_info结构的16位无符号长度项   (§4.4.7)。请注意,限制是在的字节数   编码而不是编码字符的数量。 UTF-8编码   一些字符使用两个或三个字节。因此,字符串包含   多字节字符受到进一步限制。

显然,这在动态生成的JSP中很常见。

而且,由于您可能在工作中被阻止 - 这是该网站推荐的解决方案:

  

帮助您的容器模块化代码。尝试将JSP拆分为   几个块和动态包括而不是静态的。   动态包含(jsp:include against%@ include)将编译JSP   然后流输出输出而不是尝试包含所有代码   进入一个大方法或试试阻止。