Im new to jsp.I'm getting error is The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
I am using static include such as
<%@ include file="/jsp/common/createScriptMsg.jsp" %>
but the page is not loading ... I'd also try dynamiac include such as
<jsp:include page="/jsp/common/createScriptMsg.jsp" /> \
NO LUCK..
Any help would be appriciated.
JSP technology allows you to introduce new custom tags through the tag library facility. As a Java developer, you can extend JSP pages by introducing custom tags that can be deployed and used in an HTML-like syntax.
We "fixed" this here by setting mappedfile
to false
for JspServlet in our Tomcat-Config.
Go to %TOMCAT_HOME%/conf/web.xml
and add the following init-param to the JspServlet:
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
This does not solve the 64 KiB limit but helps in that way that it occurs much later because the generated code is shorter then.
Rather making multiple files i found above mentioned answer's solution more good i-e Adding
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
into Web.XML file. but i did not found "JspServlet" in my web.XML file and found a ref link and placed the complete mapping
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
that worked for me. hope this will help someone.
I have been having this problem since yesterday, I split my JSP into two JSPs using dynamic include <jsp:include
,but it alone didn't help me, Make sure you also add all tags lib and import statement. <jsp:include
works like a function, So if you are breaking up your JSP in two or more they require same import which you have in your original JSP. Hope it works for you, it worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With