title: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/commons/dbcp/ConnectionFactory
body: <p>I get the following error:</p>
  
  <blockquote>
    <p>javax.servlet.ServletException: java.lang.NoClassDefFoundError:
    org/apache/commons/dbcp/ConnectionFactory</p>
  </blockquote>
  
  <p>I have added the relevant <code>jars</code> <code>commons-dbcp-1.4.jar</code> and <code>commons-pool-1.4.jar</code> but the error isn't resolved.</p>
  
  <h3>Stacktrace:</h3>
  
  <blockquote>
    <p>Stack trace:
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:579)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:461)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    root cause</p>
    
    <p>javax.servlet.ServletException: java.lang.NoClassDefFoundError:
    org/apache/commons/dbcp/ConnectionFactory
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)
      org.apache.jsp.ozLogin_jsp._jspService(ozLogin_jsp.java:470)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    root cause</p>
    
    <p>java.lang.NoClassDefFoundError:
    org/apache/commons/dbcp/ConnectionFactory
      org.apache.jsp.ozLogin_jsp._jspService(ozLogin_jsp.java:189)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    root cause</p>
    
    <p>java.lang.ClassNotFoundException:
    org.apache.commons.dbcp.ConnectionFactory
      org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1335)
      org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1163)
      org.apache.jsp.ozLogin_jsp._jspService(ozLogin_jsp.java:189)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)</p>
  </blockquote>