title: index.jsp in Jetty failing to redirect when dirAllowed=false
body: <p>I was tasked with correcting a listable directories vulnerability in a Java web project running on Jetty. I did this by adding the following to the project's frontend jetty config XML file as a child of the &lt;Call name="addWebApplication"&gt; tag:</p>
  
  <pre><code>&lt;Call name="addHandler"&gt;
    &lt;Arg&gt;
      &lt;New class="org.mortbay.http.handler.ResourceHandler"&gt;
        &lt;Set name="dirAllowed"&gt;false&lt;/Set&gt;
      &lt;/New&gt;
    &lt;/Arg&gt;
  &lt;/Call&gt;
  </code></pre>
  
  <p>This worked, but had an odd side-effect of partially disabling the redirect from the project's base URL, i.e. entering www..com should redirect to www..com/setupPublicSolicitationSearch.do, but instead it just outputs the contents of index.jsp to the browser; entering www..com/random_junk still redirects to the .do page correctly. The following is the contents of index.jsp:</p>
  
  <p>&lt;%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %></p>
  
  <p>&lt;logic:forward name="redirectDefault" /&gt;</p>
  
  <p>SysAdmin have confirmed that Apache is forwarding the request to Jetty correctly, and it's definitely the above XML change that caused the problem; deleting that bit of XML allows the project to redirect as expected again.</p>