You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/11/04 23:35:28 UTC

[Bug 61723] New: The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit

https://bz.apache.org/bugzilla/show_bug.cgi?id=61723

            Bug ID: 61723
           Summary: The code of method _jspService(HttpServletRequest,
                    HttpServletResponse) is exceeding the 65535 bytes
                    limit
           Product: Tomcat 7
           Version: 7.0.75
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: tmoreira2020@gmail.com
  Target Milestone: ---

Hi there, 

I'm facing the following exception on versions newer than 7.0.73, for instance
7.0.75 to 7.0.82.

nov 04, 2017 11:31:01 PM org.apache.catalina.core.ApplicationDispatcher invoke
GRAVE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [427] in the generated java file:
[/opt/liferay/tomcat/work/Catalina/localhost/_/org/apache/jsp/html/common/themes/portlet_jsp.java]
The code of method _jspService(HttpServletRequest, HttpServletResponse) is
exceeding the 65535 bytes limit

Stacktrace:
        at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
        at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
        at
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:490)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
        at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

If I add the following configuration (conf/web.xml) to any 7.0.73+ version I
still get the exception, from my research these settings should avoid the
problem, am I right?

    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>checkInterval</param-name>
            <param-value>300</param-value>
        </init-param>
        <init-param>
            <param-name>development</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>mappedfile</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>

I don't have access to the JSP that throw the exception.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 61723] The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61723

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Changes were made to the way code was generated for JSPs to resolve some bugs
(that were also spec compliance issues) with resource clean-up if a tag throws
an Exception. We minimised the impact of these as much as we can but the end
result is still that the generated code is larger than it was before.

There are some useful pointers in this thread.
http://markmail.org/thread/5gh57ststsbjqbza

Note:
trimSpaces - true       should be zero impact and might help
enablePooling - false   is likely to have a negative performance impact

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org