Well... I'm using 8.0.3 (and before I used to use 8.0 RC something) and the access to the static interface methods are working pretty well...
On Mon, Apr 7, 2014 at 4:17 PM, Mark Thomas <ma...@apache.org> wrote: > On 07/04/2014 12:25, Francesco Bassi wrote: > > Hello everybody. > > > > Since 8.0.5, it seems that .jsps that include invocations of static > > interface methods don't work anymore. > > What do you mean any more? The changes necessary to support that out of > the box (updated JDT compiler) weren't available until 8.0.5. > > Also, have you changed the defaults for compilerSourceVM and > compilerTargetVMas they will be 1.7 by default (i.e. Java 7, not Java 8). > > Mark > > > > > > > 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) > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >