title: AWS Tomcat on Elastic Beanstalk servlet Filter
body: <p>I'm trying to launch my web application for the first time on AWS Elastic Beanstalk (platform: Tomcat 8 with Java 8 running on 64bit Amazon Linux/3.0.0).</p>
  
  <p>It succeeds in creating the application in beanstalk but when it tries to launch my application (uploaded with a war) it throws an error:</p>
  
  <pre><code>04-Jun-2018 20:44:02.060 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter SecurePathFilter
  java.lang.AbstractMethodError
  at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)
  at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)
  at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:108)
  at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4708)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5348)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
  at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1126)
  at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1868)
  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)
  </code></pre>
  
  <p>The SecurePathFilter is a javax.servlet.Filter class so I'm thinking it might be that jsp and servlet api jars are missing on the tomcat (or perhaps some other version of what I used locally) but how can I check this? And how could I add/change them?</p>
  
  <p>Edit:
  As requested, the relevant pieces of my web.xml:</p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;SecurePathFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;be.qsds.sade.filters.SecurePathFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;SecurePathFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/secure/*&lt;/url-pattern&gt;
      &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>and my SecurePathFilter class is roughly:</p>
  
  <pre><code>public class SecurePathFilter implements Filter {
  
      @Override
      public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
          ...
  
          filterChain.doFilter(request, response);
      }
  }
  </code></pre>