title: Can Spring Controller change the url of browser?
body: <p>I am using Spring controllers to return the name of views, like this:</p>
  
  <pre><code>    @RequestMapping(value = {"/login","/login.do"})
  public ModelAndView showLoginForm(HttpServletRequest request, HttpServletResponse response) throws IOException {
  
      String username = getUsername();
      if(!username.equals("anonymousUser")){
          return new ModelAndView("redirect:/home"); 
      }
      return new ModelAndView("login");
  }
  </code></pre>
  
  <p>My application is running in this domain (example) <strong>www.localhost:8080/App/home</strong>
  and after second login, i need to invalidade the first login and redirect to <strong>www.localhost:8080/App/login</strong>. This is possible to do in server code?</p>
  
  <p>If i am in home page and return new ModelAndView("login"), the browser url isn't modified. why?</p>