Foros de discusión
Error in jsp execution: exceeding the 65535 bytes limit
Sam Wan, modificado hace 14 años.
Error in jsp execution: exceeding the 65535 bytes limit
Liferay Master Mensajes: 660 Fecha de incorporación: 3/03/09 Mensajes recientes
Hi,
I dont' kown whether this is memory issue or my jsp file is too large to be delt with by the java compiler.
Here is the error I got when the jsp pages executed:
My server has only not enough 1GB memory. Is this the problem?
Thanks
Sam
I dont' kown whether this is memory issue or my jsp file is too large to be delt with by the java compiler.
Here is the error I got when the jsp pages executed:
23:13:07,401 ERROR [IncludeTag:79] Current URL /web/guest generates exception: Unable to compile class for JSP:
An error occurred at line: 417 in the generated java file
The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
Stacktrace:
23:13:07,471 ERROR [IncludeTag:165] org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 417 in the generated java file
The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:67)
at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:3516)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
My server has only not enough 1GB memory. Is this the problem?
Thanks
Sam
Sam Wan, modificado hace 14 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
Liferay Master Mensajes: 660 Fecha de incorporación: 3/03/09 Mensajes recientes
Had anyone solved the similar problem?
I would very appreciate for any suggestion and help.
Thanks
Sam
I would very appreciate for any suggestion and help.
Thanks
Sam
Tarun S. Kayasth, modificado hace 14 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
Regular Member Mensajes: 162 Fecha de incorporación: 8/06/07 Mensajes recientes
Hi Sam,
I am facing same problem. Did you get any solution for it?
Thanks,
Tarun Kayasth
I am facing same problem. Did you get any solution for it?
Thanks,
Tarun Kayasth
Amos Fong, modificado hace 14 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
Liferay Legend Mensajes: 2047 Fecha de incorporación: 7/10/08 Mensajes recientes
Hi Guys,
This looks like a bug that was fixed here:
http://issues.liferay.com/browse/LPS-7003
The fix is to change the .jspf file to a .jsp file (and changing some variables).
This looks like a bug that was fixed here:
http://issues.liferay.com/browse/LPS-7003
The fix is to change the .jspf file to a .jsp file (and changing some variables).
Tarun S. Kayasth, modificado hace 14 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
Regular Member Mensajes: 162 Fecha de incorporación: 8/06/07 Mensajes recientes
Thanks Amos, will try this...
Olaf Kock, modificado hace 14 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Even without the fix - keep in mind, that a jsp is compiled into a java servlet class that outputs all the HTML code that you had in your jsp and also contains all the code that you wrote in the scriptlets on that jsp.
This servlet class will be compiled by javac to bytecode, loaded by the classloader and executed as if you wrote a servlet with loads of
There's a java limit for a single method to contain only 2^16 bytes. So if you hit this limit you almost always have too a very complicated jsp and can work around this by externalizing parts of it to proper java classes and just call them from the jsp, shrinking your jsp dramatically. I've seen this more with generated jsps than hand written ones, as writing (and maintaining) such a beast will be a lot of pain...
Now that you understand the root cause, you might be able to work around it without applying a patch. Note: I've not taken a deeper look at the linked (fixed) issue - might be that you need the patch nevertheless, but you'll figure that out...
This servlet class will be compiled by javac to bytecode, loaded by the classloader and executed as if you wrote a servlet with loads of
pageContext.getOut().write("<div>some HTML stuff</div>");
There's a java limit for a single method to contain only 2^16 bytes. So if you hit this limit you almost always have too a very complicated jsp and can work around this by externalizing parts of it to proper java classes and just call them from the jsp, shrinking your jsp dramatically. I've seen this more with generated jsps than hand written ones, as writing (and maintaining) such a beast will be a lot of pain...
Now that you understand the root cause, you might be able to work around it without applying a patch. Note: I've not taken a deeper look at the linked (fixed) issue - might be that you need the patch nevertheless, but you'll figure that out...
Gnaniyar Zubair, modificado hace 14 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
Liferay Master Mensajes: 722 Fecha de incorporación: 19/12/07 Mensajes recientes
Hi Tarun and Sam,
Hope content size of jsp file is exceeded. just split that jsp file and include one inside another.
- Gnaniyar Zubair
Hope content size of jsp file is exceeded. just split that jsp file and include one inside another.
- Gnaniyar Zubair
Qin Dou, modificado hace 11 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
New Member Mensaje: 1 Fecha de incorporación: 6/09/12 Mensajes recientes
can we use dynamic include to replace static include
Bill Hillston, modificado hace 11 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
New Member Mensajes: 4 Fecha de incorporación: 6/09/12 Mensajes recientes
>10000 Views now
Mayur Mulani, modificado hace 6 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
New Member Mensajes: 3 Fecha de incorporación: 2/03/17 Mensajes recientes
Hi sam,
Hope you have got solution for this. If you still haven't got any answer for this then please find below solution. It works fine.
Go to Tomcat path then config folder where you will find web.xml file . Find Servlet name with jsp. add
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
Because tomcat can not handle without this.
final jsp servlet tag:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
Hope this solution will work for your crucial problem.
Thanks & regards,
Mayur Mulani
Hope you have got solution for this. If you still haven't got any answer for this then please find below solution. It works fine.
Go to Tomcat path then config folder where you will find web.xml file . Find Servlet name with jsp. add
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
Because tomcat can not handle without this.
final jsp servlet tag:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
Hope this solution will work for your crucial problem.
Thanks & regards,
Mayur Mulani
Palak NA, modificado hace 5 años.
RE: Error in jsp execution: exceeding the 65535 bytes limit
New Member Mensaje: 1 Fecha de incorporación: 29/06/18 Mensajes recientesI got it resolved by adding a parameter in web.xml in tomcat/conf/web.xml
<init-param> <param-name>mappedfile</param-name> <param-value>false</param-value> </init-param>
And final attribute looks like
<servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>fork</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>xpoweredBy</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>mappedfile</param-name> <param-value>false</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet>