然后没有规律,每一行就是一个sql查出的list
每一行在页面上使用
<logic:iterate id="item" name="report6list01" type="java.model.PReport6">
<tr>
<td class="listhead"><bean:write name="item" property="cn1"/></td>
<td class="listhead"><bean:write name="item" property="sumamt1"/></td>
<td class="listhead"><bean:write name="item" property="cn2"/></td>
<td class="listhead"><bean:write name="item" property="sumamt2"/></td>
..................
<td class="listhead"><bean:write name="item" property="sumamt120"/></td>
</tr>
</logicLiterate>
然后12行也就是需要这样重付来个12次,<logic:iterate id="item" name="report6list01" type="java.model.PReport6"> 不同的就是这里的name属性会不同,
这样一来我在页面上弄了8个以后,页面就撑不住了,显示code too large 错误
显示如下:
请高手赐教要怎么解决这个问题呢?
小菜鸟心急如焚啊~
14 个解决方案
#1
这是显示的错误:
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:7628: code too large for try statement
} catch (Throwable t) {
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:7628: code too large for try statement
} catch (Throwable t) {
#2
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:50: code too large for try statement
try {
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:36: code too large
public void _jspService(HttpServletRequest request, HttpServletResponse response)
^
3 errors
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:50: code too large for try statement
try {
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:36: code too large
public void _jspService(HttpServletRequest request, HttpServletResponse response)
^
3 errors
#3
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
servlet.MyActionServlet.service(MyActionServlet.java:13)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
servlet.MyActionServlet.service(MyActionServlet.java:13)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
#4
不知道使用摸板能不能解决
#5
页面很复杂的话就不要用标签了,还有如果判断很多的情况下也不要用。不知道新版本的有没有解决问题。
#6
那要怎么解决呢?模板什么模板?
小妹急啊~~~~~~~··
小妹急啊~~~~~~~··
#7
用iframe分开
#8
用html直接显示试试,html的标签不用编译
#9
如果是页面代码过多的话可以吧它分解为12个JSP,嵌入到一个JSP里用Struts,Tiles就成<tiles:insert page="XXX.jsp" flush="flase"/>,用jsp标签也成吧<jsp:include flush="flase" page="XXX.jsp">
分解这样嵌入你要显示报表的JSP里在XXX1.jsp到XXX12.jsp里写你的实现,用上面的任意标签嵌入最终显示的JSP页面中
分解这样嵌入你要显示报表的JSP里在XXX1.jsp到XXX12.jsp里写你的实现,用上面的任意标签嵌入最终显示的JSP页面中
#10
也就是说struts中页面的标签它老人家无法支持长代码是吧~
我要嘛不用它,要嘛就拆了写~?
明天试试这两种办法~
可是还有其它的方法吗?
waiting~~~~~~~~`
我要嘛不用它,要嘛就拆了写~?
明天试试这两种办法~
可是还有其它的方法吗?
waiting~~~~~~~~`
#11
在逻辑处理处要将查询结果传向不同的页面,要怎么个forward法啊~。。。。。还这么多,
还有更好的办法吗~?
还有更好的办法吗~?
#12
不知这样可以吗?
你在该页面上只显示最主要几列的信息,然后再给一列放一个“详细信息”的链接,点击该链接,新开个页面,显示这条记录的全部列
你在该页面上只显示最主要几列的信息,然后再给一列放一个“详细信息”的链接,点击该链接,新开个页面,显示这条记录的全部列
#13
不行的话你可以分页显示啊,分两个页面,第一个页面用JSP的include或者是用struts的Titles链接到第二个页面,其实我个人感觉LS的说得还很不错的~~
#14
,呵呵,谢谢各位了~,我最后使用定义一个LIST,然后把各个查询出的结果存在一个BEAN中,然后逐一加入到LIST中,再输出到页面,这样就不存在那种要分好几个写的问题了·
谢谢大家了~
谢谢大家了~
#1
这是显示的错误:
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:7628: code too large for try statement
} catch (Throwable t) {
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:7628: code too large for try statement
} catch (Throwable t) {
#2
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:50: code too large for try statement
try {
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:36: code too large
public void _jspService(HttpServletRequest request, HttpServletResponse response)
^
3 errors
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:50: code too large for try statement
try {
Generated servlet error:
D:\Tomcat 5.0\webapps\loancheck\work\org\apache\jsp\report6_jsp.java:36: code too large
public void _jspService(HttpServletRequest request, HttpServletResponse response)
^
3 errors
#3
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
servlet.MyActionServlet.service(MyActionServlet.java:13)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
servlet.MyActionServlet.service(MyActionServlet.java:13)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
#4
不知道使用摸板能不能解决
#5
页面很复杂的话就不要用标签了,还有如果判断很多的情况下也不要用。不知道新版本的有没有解决问题。
#6
那要怎么解决呢?模板什么模板?
小妹急啊~~~~~~~··
小妹急啊~~~~~~~··
#7
用iframe分开
#8
用html直接显示试试,html的标签不用编译
#9
如果是页面代码过多的话可以吧它分解为12个JSP,嵌入到一个JSP里用Struts,Tiles就成<tiles:insert page="XXX.jsp" flush="flase"/>,用jsp标签也成吧<jsp:include flush="flase" page="XXX.jsp">
分解这样嵌入你要显示报表的JSP里在XXX1.jsp到XXX12.jsp里写你的实现,用上面的任意标签嵌入最终显示的JSP页面中
分解这样嵌入你要显示报表的JSP里在XXX1.jsp到XXX12.jsp里写你的实现,用上面的任意标签嵌入最终显示的JSP页面中
#10
也就是说struts中页面的标签它老人家无法支持长代码是吧~
我要嘛不用它,要嘛就拆了写~?
明天试试这两种办法~
可是还有其它的方法吗?
waiting~~~~~~~~`
我要嘛不用它,要嘛就拆了写~?
明天试试这两种办法~
可是还有其它的方法吗?
waiting~~~~~~~~`
#11
在逻辑处理处要将查询结果传向不同的页面,要怎么个forward法啊~。。。。。还这么多,
还有更好的办法吗~?
还有更好的办法吗~?
#12
不知这样可以吗?
你在该页面上只显示最主要几列的信息,然后再给一列放一个“详细信息”的链接,点击该链接,新开个页面,显示这条记录的全部列
你在该页面上只显示最主要几列的信息,然后再给一列放一个“详细信息”的链接,点击该链接,新开个页面,显示这条记录的全部列
#13
不行的话你可以分页显示啊,分两个页面,第一个页面用JSP的include或者是用struts的Titles链接到第二个页面,其实我个人感觉LS的说得还很不错的~~
#14
,呵呵,谢谢各位了~,我最后使用定义一个LIST,然后把各个查询出的结果存在一个BEAN中,然后逐一加入到LIST中,再输出到页面,这样就不存在那种要分好几个写的问题了·
谢谢大家了~
谢谢大家了~