title: Spring successful login results in js/bootstrap.min.js displayed
body: <p>I have a Spring Boot 1.3.0.BUILD-SNAPSHOT with Spring security for authentication.  I have a layout.html page for use by my other pages.</p>
  
  <p>When I go to my login.html:</p>
  
  <pre><code>&lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"/&gt;
       &lt;link href="/css/bootstrap.min.css" rel="stylesheet"/&gt;
      &lt;link href="/css/custom.css" rel="stylesheet" type="text/css"/&gt;
      &lt;link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"/&gt;
      &lt;script src="/libs/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
      &lt;script src="/js/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;!-- HTML5 shim, for IE6-8 support of HTML5 elements --&gt;
      &lt;!--[if lt IE 9]&gt;
      &lt;script src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div th:replace="layout :: head"&gt;&amp;nbsp;&lt;/div&gt;
  &lt;div style="padding-top:60px;"&gt;
  ....
  &lt;/div&gt;
  &lt;div th:include="layout :: foot"/&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Where here is my layout:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
        xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"&gt;
  &lt;body&gt;
  
  &lt;div th:fragment="head" class="my-header"&gt;
      &lt;div class="navbar navbar-default navbar-fixed-top navbar-transparent" role="navigation"&gt;
  ...
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The form submits a POST, which returns a 302:
  <a href="https://i.stack.imgur.com/IEZl9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IEZl9.png" alt="enter image description here"></a></p>
  
  <p>And then the url is redirected to <a href="http://localhost:9001/js/bootstrap.min.js" rel="nofollow noreferrer">http://localhost:9001/js/bootstrap.min.js</a> instead of <a href="http://localhost:9001/" rel="nofollow noreferrer">http://localhost:9001/</a>  so that the browser just shows the contents of the bootstrap js file.  If I manually change the URL to <a href="http://localhost:9001" rel="nofollow noreferrer">http://localhost:9001</a> then my authenticated window is shown.   All other pages behave normally, its just the login page that shows the js file content.</p>
  
  <p>I cannot figure out where the call to display js/bootstrap.min.js is coming from, I grep'd my files and all references to it are in the format:</p>
  
  <pre><code>&lt;script src="/libs/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
  &lt;script src="/js/bootstrap.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Thank you for your time in reading this and offering any advice on what might be causing this issue.</p>