title: Simple Redirect to another page is wrong
body: <p>If the user logs is success in i redirect him to the dashboard.</p>
  
  <p>It used to work ok until i deploy it using tomcat.</p>
  
  <p>now the url is <a href="http://localhost:8080/myWar/" rel="nofollow noreferrer">http://localhost:8080/myWar/</a></p>
  
  <p>so this:</p>
  
  <pre><code> window.location.href = "/dashboard";
  </code></pre>
  
  <p>redirects to <a href="http://localhost:8080/dashboard" rel="nofollow noreferrer">http://localhost:8080/dashboard</a></p>
  
  <p>and I get error 404. How do I redirect this dynamically ?</p>