Hello everybody.

Since 8.0.5, it seems that .jsps that include invocations of static
interface methods don't work anymore.

Here's an example:

Test.java;

package com.wfb.test;
public interface Test {
    public static String getText() { return "Gotcha!"; }
}

test.jsp
<%String s = com.wfb.test.Test.getText();%>

Tomcat says:

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 1 in the jsp file: /test.jsp
This static method of interface Test can only be accessed as Test.getText
1: <%String s = com.wfb.test.Test.getText();%>


Stacktrace:
        
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
        
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:199)
        
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:475)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:380)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:355)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:342)
        
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        
com.wfb.web.container.EnvironmentFilter.doFilter(EnvironmentFilter.java:33)
        
com.wfb.web.container.log4j.Log4JEnvironmentFilter.doFilter(Log4JEnvironmentFilter.java:57)
        
org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66)

Reply via email to