JSP:jsp页面的编译中的代码太大 [英] JSP : Code too large in compilation of jsp page

查看:375
本文介绍了JSP:jsp页面的编译中的代码太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行我的应用程序,但在编译时出现错误,当最小字符超出时,代码太大.

I am trying to run my application but its gives me error at compilation time that code is too large when minimum character exceeds.

那么,除了JSP:include还是将页面切成多个部分,还有其他方法吗? 如何在Glassfish服务器的编译中为JSP页面设置最大字符数限制?

So is there any way other than JSP:include or cutting page into parts? how can i set the maximum character limit for JSP page in compilation in glassfish server?

谢谢

推荐答案

Java类的大小限制(64k),对此问题进行了详细描述:

There is a size limit of Java class (64k), which is described with details in this question: maximum size of java class / exception table

所以这是一个硬限制,不应重写(如果内部地址为2字节,从理论上讲甚至是不可能的).

So it's a hard limit, which should not be overriden (if the internal addresses are 2 byte, it could be even theoretically not possible).

在主题 _jspService超过65535字节限制中,推荐的解决方案是使用动态包含而不是静态包含:

In the topic _jspService is exceeding the 65535 bytes limit the recommended solution is to use dynamic includes instead of static:

<jsp:include page="test.jsp" /> 

如果页面中有很多Java逻辑,请将其移至Java类.

If you have a lot of Java-logic in your page, move it to Java classes.

如果您仅拥有庞大的页面,并且不能将其拆分为许多较小的页面,则可以尝试将其尽可能多地移至自定义标签.

If you simply have enormous page, and splitting it to many smaller pages is not an option, you can try to move as much as possible to custom tags.

这篇关于JSP:jsp页面的编译中的代码太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆