title: Java Servlet Filter redirect problem
body: <p>I'm having a problem with my authentication filter. When the filter redirects to the login page, no images gets displayed in the login JSP. However, if I go to the login page manually after I'm logged in, the images are displayed.</p>
  
  <p>I don't understand why this is happening! I appreciate any help. :-)</p>
  
  <p>AuthFilter:  </p>
  
  <pre><code>if (authorized == null &amp;&amp; path.indexOf("Auth") == -1 &amp;&amp; path.indexOf("Login") == -1 ) {
          httpResponse.sendRedirect("Login");  
          return;  
  } else {  
          chain.doFilter(request, response);  
  }
  </code></pre>
  
  <p>Login servlet:</p>
  
  <pre><code>// Just using a servlet in case I want more data sent to the jsp
  Dispatcher.dispatch("views/login.jsp", request, response);
  </code></pre>
  
  <p>login.jsp:</p>
  
  <pre><code>&lt;img src="images/logo.png" /&gt;
  </code></pre>
  
  <p>The jsp is otherwise "normal", all required HTML tags are present. The "images" folder is in the default "web" folder of the project, alongside all the other jsp's and javascripts.</p>
  
  <p>Thanks in advance for any help. :)<br>
  - Stian</p>