title: JSP page not found when switching what welcome file comes first
body: <p>I have MVC with the welcome files in XML looking like</p>
  <pre><code>&lt;welcome-file-list&gt;
      &lt;welcome-file&gt;welcome/loginP.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;welcome/index.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  </code></pre>
  <p>welcome/loginP.jsp just redirects to profilePages/profileP.jsp using</p>
  <pre><code>response.sendRedirect(&quot;profilePages/profileP.jsp&quot;);
  </code></pre>
  <p>which works fine and produces the result but when swapped places</p>
  <pre><code>&lt;welcome-file-list&gt;
      &lt;welcome-file&gt;welcome/index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;welcome/loginP.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  </code></pre>
  <p>as I press the button it doesn't know where profileP is anymore.</p>
  <p>The only function of welcome/index.jsp is to redirect to welcome/loginP.jsp using</p>
  <p><code>response.sendRedirect(&quot;welcome/loginP.jsp&quot;);</code></p>
  <p>what could be the problem?</p>
  <p>here is an image of how my jsp are arranged: <a href="https://i.stack.imgur.com/OXVq5.png" rel="nofollow noreferrer">directory</a></p>