title: Java Servlet - Mapping a servlet to every URL but a string
body: <p>I have a servlet configured to handle all URLs (<code>*</code>):</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;servlet&gt;
      &lt;servlet-name&gt;MyServ&lt;/servlet-name&gt;
      &lt;servlet-class&gt;MyServlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;MyServ&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>I need that for URLS beginning with <code>/static/</code>, it should serve them from the static <code>WEB-INF</code>.  That is, MyServ should serve everything <em>but</em> <code>/static</code>.</p>
  
  <p>How can I do that?</p>
  
  <hr>
  
  <p><strong>UPDATE</strong>: To clarify, what I'd like is:</p>
  
  <p><code>/*/</code> - Goes to MyServ<br>
  <code>/static/dir/file.css</code> - Jetty serves the static file.css from the /dir/.</p>
  
  <p>I'm not sure what web.xml to do, or where to put the static files.</p>
  
  <p>I tried adding this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;default&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/static/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>But, when I go to a <code>/static/</code> URL, I just get:</p>
  
  <pre class="lang-none prettyprint-override"><code>HTTP ERROR 404
  
  Problem accessing /static/dir/file.css. Reason: 
      Not Found
  
  Powered by Jetty://
  </code></pre>
  
  <p>I'm not sure if my web.xml is wrong, or if I'm simply putting the files in the wrong place (I've tried under <code>src/main/webapp</code> and <code>src/main/webapp/lib/META-INF/resources/</code>)</p>
  
  <hr>
  
  <h1>Jetty</h1>
  
  <p>I am using <strong>Jetty</strong>.  I want to avoid any other layers, such as Nginx, Apache, etc.</p>
  
  <p>To win the bounty, please make sure you answer works for Jetty.</p>