同学重装了Tomcat后,打开http://localhost:8080/ 却提示
javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver
以及
Type Exception Report Message javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:579) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:480) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) Root Cause
如下图:
在网上试了各种各样的办法,诸如修改path环境变量,修改classpath环境变量,删除servlet-api.jar,将servlet-api.jar加入jdk\jre\lie\ext文件夹等等都无效,最后找到以下解决办法:
- 打开Tomcat目录下的lib目录
- 将lib目录下的el-api.jar文件复制到javaJdk安装目录\jre\lib\ext文件夹下即可解决。
请登录之后再进行评论