Javax. servlet. ServletException: java. lang. NoClassDefFoundError: javax/el/ELResolver error solution,
Today, you don't need eclipse, myeclipse, or other development tools. When writing a JSP page (a little dead), you suddenly encounter problems that you have never encountered before. The error is as follows:
HTTP Status 500 - java.lang.NoClassDefFoundError: javax/el/ELResolvertype Exception reportmessage java.lang.NoClassDefFoundError: javax/el/ELResolverdescription The server encountered an internal error that prevented it from fulfilling this request.exceptionjavax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver org.apache.jasper.servlet.JspServlet.service(JspServlet.java:268) javax.servlet.http.HttpServlet.service(HttpServlet.java:723)root causejava.lang.NoClassDefFoundError: javax/el/ELResolver java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:620) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) java.net.URLClassLoader.defineClass(URLClassLoader.java:260) java.net.URLClassLoader.access$100(URLClassLoader.java:56) java.net.URLClassLoader$1.run(URLClassLoader.java:195) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:188) java.lang.ClassLoader.loadClass(ClassLoader.java:306) java.lang.ClassLoader.loadClass(ClassLoader.java:299) sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) java.lang.ClassLoader.loadClass(ClassLoader.java:299) java.lang.ClassLoader.loadClass(ClassLoader.java:251) java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:209) org.apache.jsp.hellotag.hellotag_jsp._jspInit(hellotag_jsp.java:30) org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:164) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:723)note The full stack trace of the root cause is available in the Apache Tomcat/6.0.45 logs.Apache Tomcat/6.0.45
I checked the information on the Internet, summarized various solutions, to the apache-tomcat/lib directory, copy the el-api.jar put in % JAVA_HOME % \ jre \ lib \ ext this can solve the temporary problem.
There is a post said jsp-api.jar and servlet-api.jar these two jar are added to the jdk classpath, the solution is to delete the jsp-api.jar; suddenly thought of because it is handwritten variant java code, so the jsp-api.jar and servlet-api.jar added to the % JAVA_HOME % \ jre \ lib \ ext (this operation method is actually the same as the effect of adding jdk classpath), okay, it should be a problem of packet disorder conflicts.
Solution summary:
First: to apache-tomcat/lib directory, copy the el-api.jar to % JAVA_HOME % \ jre \ lib \ ext;
The second type: Delete % JAVA_HOME % \ jre \ lib \ ext in the jsp-api.jar, servlet-api.jar, to compile the code and then copy in, the method is stupid, but also the method.
If the above problem occurs in eclispe or myeclipse, I have never encountered it. If it happens, it should be well solved:
First check tomcat whether there is a need for the el-api.jar package, generally certainly have;
Delete the el-api.jar in % JAVA_HOME % \ jre \ lib \ ext (if any );
Delete all the packages added by the Integration Environment. manually add the required jar packages one by one, so that you can easily clarify the path of each package, check which package is in conflict (generally, it is a conflict problem, and the thief is annoying ).
Finally, there are a lot of kids shoes that say reinstall JDK, reinstall IDE, and reinstall tomcat. Well, I can't try again at last.