Fix for _jspService is exceeding the 65535 bytes limit

Are you facing issues like: “The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit” ?

Try the following simple fix. First you have to locate the file [Tomcat_Home]/conf/web.xml and search the file for ‘JspServlet’. This should return an xml node of containing some values. Add the following XML details to the block.

<init-param>

     <param-name>mappedfile</param-name>

     <param-value>false</param-value>

</init-param>

 

After adding this, final block will be :

 

<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>

 

Save the file and restart the Tomcat service. Hope this will help.

Use of mappedfile  variable – Should we generate static content with one print statement per input line, to ease debugging? true or false, default true.

Leave a Reply

Your email address will not be published. Required fields are marked *