title: java.lang.NoClassDefFoundError: javax/el/ELResolver when running SimpleHelloByEnteringName JSF example
body: <p>I am new to JSF. I am using Tomcat 7.0.14 and trying to run SimpleHelloByEnteringName example but getting following errors in startup and at runtime</p>
  
  <p>Startup Console message:</p>
  
  <pre><code>INFO: Deploying web application directory SimpleHelloByEnteringName
  Jun 15, 2011 7:35:42 AM com.sun.faces.config.ConfigureListener contextInitialized
  INFO: Initializing Mojarra 2.0.3 (FCS b03) for context '/SimpleHelloByEnteringName'
  Jun 15, 2011 7:35:43 AM com.sun.faces.spi.InjectionProviderFactory createInstance
  INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
  
  **Jun 15, 2011 7:35:44 AM com.sun.faces.config.processor.NavigationConfigProcessor addNavigationCasesForRule
  WARNING: JSF1058: The resource referred to by to-view-id, 'result.jsp', for navigation from '/pages/inputname.jsp', does not start with '/'.  This will be added for you, but it should be corrected.**
  
  Jun 15, 2011 7:35:44 AM com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor$Monitor &lt;init&gt;
  INFO: Monitoring jndi:/localhost/SimpleHelloByEnteringName/WEB-INF/faces-config.xml for modifications
  Jun 15, 2011 7:35:44 AM org.apache.coyote.AbstractProtocolHandler start
  INFO: Starting ProtocolHandler ["http-apr-8081"]
  Jun 15, 2011 7:35:44 AM org.apache.coyote.AbstractProtocolHandler start
  INFO: Starting ProtocolHandler ["ajp-apr-8009"]
  Jun 15, 2011 7:35:44 AM org.apache.catalina.startup.Catalina start
  </code></pre>
  
  <p>and runtime error when trying to run <a href="http://localhost:8081/SimpleHelloByEnteringName/" rel="nofollow">http://localhost:8081/SimpleHelloByEnteringName/</a></p>
  
  <pre><code>HTTP Status 500 -
  
  type Exception report
  
  message
  
  description The server encountered an internal error () that prevented it from fulfilling this request.
  
  exception
  
  javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:342)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  
  root cause
  
  java.lang.NoClassDefFoundError: javax/el/ELResolver
      java.lang.ClassLoader.defineClass1(Native Method)
      java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      java.security.AccessController.doPrivileged(Native Method)
      java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
      java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      java.lang.ClassLoader.loadClass(ClassLoader.java:295)
      sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      java.lang.ClassLoader.loadClass(ClassLoader.java:295)
      java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:220)
      org.apache.jsp.index_jsp._jspInit(index_jsp.java:23)
      org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
      org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:171)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  
  root cause
  
  java.lang.ClassNotFoundException: javax.el.ELResolver
      java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      java.security.AccessController.doPrivileged(Native Method)
      java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
      java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      java.lang.ClassLoader.defineClass1(Native Method)
      java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      java.security.AccessController.doPrivileged(Native Method)
      java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
      java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      java.lang.ClassLoader.loadClass(ClassLoader.java:295)
      sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      java.lang.ClassLoader.loadClass(ClassLoader.java:295)
      java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:220)
      org.apache.jsp.index_jsp._jspInit(index_jsp.java:23)
      org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
      org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:171)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  
  note The full stack trace of the root cause is available in the Apache Tomcat/7.0.14 logs.
  </code></pre>
  
  <p>How is this problem caused and how can I solve it?</p>