title: Tomcat : Error during execution : java.lang.NoClassDefFoundError: javax/servlet/GenericFilter
body: <p>I am getting the errors below : </p>
  
  <pre><code>SEVERE: ContainerBase.addChild: start:
  org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/snow]]
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1018)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:994)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
          at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:712)
          at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:2002)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
  Caused by: java.lang.NoClassDefFoundError: javax/servlet/GenericFilter
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
          at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3251)
          at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1420)
          at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1924)
          at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1798)
          at org.apache.tomcat.websocket.server.WsServerContainer.&lt;init&gt;(WsServerContainer.java:106)
          at org.apache.tomcat.websocket.server.WsSci.init(WsSci.java:131)
          at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:47)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5709)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
          ... 10 more
  Caused by: java.lang.ClassNotFoundException: javax.servlet.GenericFilter
          at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1955)
          at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1798)
          ... 22 more
  </code></pre>
  
  <p>When I have in my pom.xml this dependency : </p>
  
  <pre><code>&lt;dependency&gt;
       &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
       &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
       &lt;version&gt;4.0.1&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I have tried to follow some people suggestions to add <code>&lt;scope&gt;provided&lt;/scope&gt;</code> , but still this does not work.</p>
  
  <p>What could cause such errors ?</p>
  
  <p>Thank in advance</p>