标题说明了它。我无法在任何地方找到答案。当我在我的.jsp文件中导入这个类时(不使用它),它抛出一个例外,说该类不能被编译。我错过了什么吗?JSP导入java.time.LocalDateTime时无法编译
导入:<%@页面进口= “java.time.LocalDateTime” %>
例外:
org.apache.jasper.JasperException: Unable to compile class for JSP:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
使用gradle?添加“存储库{flatDir名称:'localRepository',dirs:'lib'}” – IddoE
如果您不使用Java 8,则需要[ThreeTen](http://www.threeten.org/threetenbp/)。 –
是的,我正在使用Java 8 ..我在我的其他类(如DAO或实体模型类)中遍布所有类,它在除了jsp以外的任何地方都能正常工作。 – Vlladz