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 2015/01/28 04:15:54 UTC
[Bug 57508] New: tomcat-8.0.17 Unable to compile class for JSP on
JDK8
https://issues.apache.org/bugzilla/show_bug.cgi?id=57508
Bug ID: 57508
Summary: tomcat-8.0.17 Unable to compile class for JSP on JDK8
Product: Tomcat 8
Version: 8.0.17
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: P2
Component: Jasper
Assignee: dev@tomcat.apache.org
Reporter: conquer0715@163.com
1.I use jdk8, define a interface named TestInterface:
package test;
public interface TestInterface {
public static String test() {
return "*************";
}
}
2.use this interface in my jsp named test.jsp:
<%@ page import="test.TestInterface" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title></title>
</head>
<body>
<%
TestInterface.test();
%>
</body>
</html>
3.access the test.jsp, occur errors below:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 9 in the jsp file: /b.jsp
This static method of interface TestInterface can only be accessed as
TestInterface.test
6: </head>
7: <body>
8: <%
9: TestInterface.test();
10: %>
11: </body>
12: </html>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:198)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:450)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:570)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
--
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 57508] tomcat-8.0.17 Unable to compile class for JSP on JDK8
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57508
Violeta Georgieva <vi...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|WORKSFORME |INVALID
--
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 57508] tomcat-8.0.17 Unable to compile class for JSP on JDK8
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57508
conquer0715 <co...@163.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WORKSFORME
--- Comment #2 from conquer0715 <co...@163.com> ---
Thank Violeta Georgieva , it works, it's my fault,Thank Violeta Georgieva
again.
--
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 57508] tomcat-8.0.17 Unable to compile class for JSP on JDK8
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57508
--- Comment #1 from Violeta Georgieva <vi...@apache.org> ---
Hi,
Did you specify the init params below for the JSPServlet?
<init-param>
<param-name>compilerSourceVM</param-name>
<param-value>1.8</param-value>
</init-param>
<init-param>
<param-name>compilerTargetVM</param-name>
<param-value>1.8</param-value>
</init-param>
Regards,
Violeta
--
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