I have two things which you might want to try out:

1) You will lose your JSP debugging capability - but if that's not your
concern, then in your CATALINA_HOME\conf folder append this for "JspServlet"

        <init-param>
            <param-name>mappedfile</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>suppressSmap</param-name>
            <param-value>true</param-value>
        </init-param>

     This will stop generating JSR45 debug info and Symbol Maps for JSP
pages ( I think I have said technical things right here, otherwise please
correct me!).

2) I sincerely recommend moving scriptlet code out of your JSP and remove
all unwanted/commented code, newline/carriages from your JSP. Even with the
config above, this might fail since the code is genuinely too large for
__jspService().

3) If possible, try to use Ant and precompile your JSP and iterate through
the .class files to check which method size is larger or close to 90% or
the 64k footprint. You can write a short program by leveraging java.io and
Apache commons BCEL library. Ant has a strange behaviour which doesn't
throw any exceptions if the Jsp method size exceeds the limit. But the
compilation occurs anyway. So you can go through those compiled files using
your custom tool and print the size of the methods.


I hope this helps you.

KR,

On 12 May 2017 at 07:58, Vidyadhar <techienote....@gmail.com> wrote:

> Hello Sagar,
>
> On Fri, 12 May 2017 at 12:26 PM, sagar kohli <sagarkohl...@gmail.com>
> wrote:
>
> > Try adding following init parameter in <tomcat_home>/conf/web.xml
> >
> > <init-param>
> >      <param-name>mappedfile</param-name>
> >      <param-value>false</param-value>
> > </init-param>
>
>
> We already tried it but no success.
>
> >
> >
> > On Fri, May 12, 2017 at 10:28 AM, Vidyadhar <techienote....@gmail.com>
> > wrote:
> >
> > > Hello Team,
> > >
> > > Recently we did a upgrade existing tomcat from 7.0.42 to 7.0.76 on
> > windows
> > > box. Post the up gradation we are seeing following error in couple of
> > JSPs
> > >
> > > org.apache.jasper.JasperException: Unable to compile class for JSP:
> > >
> > > An error occurred at line: [231] in the generated java file:
> [C:\Program
> > > Files\Apache\Tomcat\work\Catalina\localhost\app\org\apache\jsp\jsp\
> > > applicationChange\applicationChangeMain_jsp.java]
> > > The code of method _jspService(HttpServletRequest,
> HttpServletResponse)
> > is
> > > exceeding the 65535 bytes limit
> > >
> > > Stacktrace:
> > > org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> > > DefaultErrorHandler.java:103)
> > > org.apache.jasper.compiler.ErrorDispatcher.javacError(
> > > ErrorDispatcher.java:366)
> > >
> > org.apache.jasper.compiler.JDTCompiler.generateClass(
> JDTCompiler.java:490)
> > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
> > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
> > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
> > > I have checked the various threads on tomcat support archive and did
> try
> > > following solution which did not work on 7.0.76 as well as on 7.0.77.
> > >
> > > 1. Following changes in conf/web.xml
> > > <init-param>
> > >     <param-name>mappedfile</param-name>
> > >     <param-value>false</param-value>
> > > </init-param>
> > > <init-param>
> > >     <param-name>compiler</param-name>
> > >     <param-value>modern</param-value>
> > > </init-param>
> > > 2. Increased the buffer size.
> > >
> > > Can some one suggest some ways to resolve this error, without
> downgrading
> > > to 7.0.42
> > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > > Vidyadhar
> > >
> >
> >
> >
> > --
> > Regards,
> > sagar kohli
> >
> --
> Regards,
> Vidyadhar
>

Reply via email to