當我試圖瀏覽 「本地主機:8080」 在MyEclipse中,我得到以下錯誤:HTTP狀態500 - java.lang.NoClassDefFoundError:無法初始化類org.apache.jasper.el.ELContextImpl
type Exception report
message java.lang.NoClassDefFoundError: Could not initialize class org.apache.jasper.el.ELContextImpl
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.jasper.el.ELContextImpl
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.lang.NoClassDefFoundError: Could not initialize class org.apache.jasper.el.ELContextImpl
org.apache.jasper.compiler.Validator$ValidateVisitor.prepareExpression(Validator.java:1568)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:747)
org.apache.jasper.compiler.Node$ELExpression.accept(Node.java:954)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1795)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
標籤說它的Tomcat。 –
謝謝,我將el-api.jar複製到目錄「。\ jre \ lib \ ext」中。當我刪除.jar時,沒有錯誤報告。 –