title: Disable JSP servlet in Jetty
body: <p>I'm using Spring with Jetty. Until now I haven't used JSP's, but I have a 3rd party servlet that uses them.</p>
  
  <p>It appears in the logs that Jetty is trying to load a "jsp" servlet. But I want all requests to go through to springs dispatcher servlet.</p>
  
  <p>What can I do to stop Jetty from intercepting *.jsp?</p>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;web-app xmlns:...
  
      &lt;!-- ~~~~~~~~~~~~~~~ SPRING DISPATCHER SERVLET ~~~~~~~~~~~~~~~ --&gt;
      &lt;!-- Allows Spring to handle all web requests --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;!-- ~~~~~~~~~~~~~~~ SPRING SECURITY HOOK ~~~~~~~~~~~~~~~ --&gt;
      &lt;!-- removed for clarity --&gt;
  
      &lt;!-- ~~~~~~~~~~~~~~~ BEAN SCOPES FOR WEB ~~~~~~~~~~~~~~~ --&gt;
      &lt;!-- removed for clarity --&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p><strong>Jetty logs for a non-JSP request:</strong></p>
  
  <pre><code>28902 [qtp1620636050-15 - /myaccount/transactions] DEBUG org.eclipse.jetty.util.log  - REQUEST /myaccount/transactions on org.eclipse.jetty.server.nio.SelectChannelConnector$3@52d85409
  28902 [qtp1620636050-15 - /myaccount/transactions] DEBUG org.eclipse.jetty.util.log  - Got Session ID 1x85qr20xozki139cfcd6a520o from cookie
  28902 [qtp1620636050-15 - /myaccount/transactions] DEBUG org.eclipse.jetty.util.log  - sessionManager=org.eclipse.jetty.server.session.HashSessionManager@21e3cc77
  28902 [qtp1620636050-15 - /myaccount/transactions] DEBUG org.eclipse.jetty.util.log  - session=org.eclipse.jetty.server.session.HashSessionManager$HashedSession:1x85qr20xozki139cfcd6a520o@1420624050
  28902 [qtp1620636050-15 - /myaccount/transactions] DEBUG org.eclipse.jetty.util.log  - servlet=dispatcher
  28903 [qtp1620636050-15 - /myaccount/transactions] DEBUG org.eclipse.jetty.util.log  - servlet holder=
  28903 [qtp1620636050-15 - /myaccount/transactions] DEBUG org.eclipse.jetty.util.log  - chain=
  28903 [qtp1620636050-15 - /myaccount/transactions] DEBUG org.eclipse.jetty.util.log  - call filter springSecurityFilterChain
  </code></pre>
  
  <p><strong>Jetty logs for a JSP request:</strong></p>
  
  <pre><code>398317 [qtp1620636050-14 - /console/login.jsp] DEBUG org.eclipse.jetty.util.log  - REQUEST /console/login.jsp on org.eclipse.jetty.server.nio.SelectChannelConnector$3@1eaf0e38
  398317 [qtp1620636050-14 - /console/login.jsp] DEBUG org.eclipse.jetty.util.log  - Got Session ID 1x85qr20xozki139cfcd6a520o from cookie
  398317 [qtp1620636050-14 - /console/login.jsp] DEBUG org.eclipse.jetty.util.log  - sessionManager=org.eclipse.jetty.server.session.HashSessionManager@21e3cc77
  398318 [qtp1620636050-14 - /console/login.jsp] DEBUG org.eclipse.jetty.util.log  - session=org.eclipse.jetty.server.session.HashSessionManager$HashedSession:1x85qr20xozki139cfcd6a520o@1420624050
  398318 [qtp1620636050-14 - /console/login.jsp] DEBUG org.eclipse.jetty.util.log  - servlet=jsp
  398319 [qtp1620636050-14 - /console/login.jsp] DEBUG org.eclipse.jetty.util.log  - servlet holder=
  398319 [qtp1620636050-14 - /console/login.jsp] DEBUG org.eclipse.jetty.util.log  - chain=
  398319 [qtp1620636050-14 - /console/login.jsp] DEBUG org.eclipse.jetty.util.log  - call filter springSecurityFilterChain
  </code></pre>