Here I am listing some erroneous cases that might occur in your web development phase, due to some size restrictions.
JSP file size limit :
You might get some run time exceptions that the JSP file size limit exceeds. Please find below the reason :
In JVM the size of a single JAVA method is limited to 64kb. When the jsp file is converted to Servlet, if the jspservice method's size exceeds the 64kb limit, this exception will occur. Keep in mind that this exception depends on the implementation of the JSP translator, means the same JSP code may give an exception in Tomcat and may run successfully in Weblogic due to the the difference in the logic to built the Servlet methods from JSP.
The best way to omit this issue is by using dynamic include.For example, if you are using
<%@ include file="sample.jsp" %> (static include),
replace this to
<jsp:include page="sample.jsp" /> (dynamic include).
Static includes affect page size where dynamic includes affect processing overhead.
Read more @ http://docs.oracle.com/cd/B32110_01/web.1013/b28961/workjsp.htm
CSS size limit in IE :
To get some performance improvements, if you try to combine all your CSS files and if the combined CSS size exceeds 288kb, beware : IE has a size limit to load the CSS content. IE will ignore any CSS beyond 288 KB and even gzipping content doesn't matter. This size limit appears to be a "per file" limit and you can split the CSS into two files and it will work fine.
JSP file size limit :
You might get some run time exceptions that the JSP file size limit exceeds. Please find below the reason :
In JVM the size of a single JAVA method is limited to 64kb. When the jsp file is converted to Servlet, if the jspservice method's size exceeds the 64kb limit, this exception will occur. Keep in mind that this exception depends on the implementation of the JSP translator, means the same JSP code may give an exception in Tomcat and may run successfully in Weblogic due to the the difference in the logic to built the Servlet methods from JSP.
The best way to omit this issue is by using dynamic include.For example, if you are using
<%@ include file="sample.jsp" %> (static include),
replace this to
<jsp:include page="sample.jsp" /> (dynamic include).
Static includes affect page size where dynamic includes affect processing overhead.
Read more @ http://docs.oracle.com/cd/B32110_01/web.1013/b28961/workjsp.htm
CSS size limit in IE :
To get some performance improvements, if you try to combine all your CSS files and if the combined CSS size exceeds 288kb, beware : IE has a size limit to load the CSS content. IE will ignore any CSS beyond 288 KB and even gzipping content doesn't matter. This size limit appears to be a "per file" limit and you can split the CSS into two files and it will work fine.
Pleas add the kind of "this exception" too..
ReplyDelete//KP