title: Redirection after succesfull login Spring security
body: <p>After a successful login. What could be the reason I am not redirected to /admin/notifications. I enter at "contextpath/" when I log in. What am I missing?   </p>
  
  <pre><code>&lt;!-- Spring security --&gt;
  &lt;security:global-method-security secured-annotations="enabled"/&gt;
  
  &lt;security:http pattern="/admin/login" security="none" /&gt;
  &lt;security:http pattern="/resources/public/**" security="none" /&gt;
  &lt;security:http auto-config="true" use-expressions="true" pattern="/admin/**" authentication-manager-ref="authenticationManager"&gt;
      &lt;security:intercept-url pattern="/admin/**" access="hasRole('ROLE_ADMIN')"/&gt;
      &lt;security:form-login login-page="/admin/login" default-target-url="/admin/notifications" always-use-default-target="true"  authentication-failure-url="/admin/login?error=1" login-processing-url="/admin/j_spring_security_check"/&gt;
      &lt;security:logout invalidate-session="true" delete-cookies="" logout-url="/admin/logout" logout-success-url="/admin/login"/&gt;
  &lt;/security:http&gt;
  &lt;security:http auto-config="true" use-expressions="true" &gt;&lt;/security:http&gt;
  </code></pre>
  
  <p>Edit: The authentication-manager. It lives in another xml file that is included from the main application context. </p>
  
  <pre><code>&lt;security:authentication-manager alias="authenticationManager"&gt;
      &lt;security:authentication-provider&gt;
          &lt;security:user-service&gt;
                  &lt;security:user name="admin" password="admin" authorities="ROLE_ADMIN" /&gt;
          &lt;/security:user-service&gt;
      &lt;/security:authentication-provider&gt;
  &lt;/security:authentication-manager&gt;
  </code></pre>
  
  <p>This is my controller</p>
  
  <pre><code>@Controller
  @RequestMapping("/admin/notifications")
  public class NotificationControllerAdmin {
  
      @ResponseStatus(HttpStatus.OK)
      @RequestMapping(method = RequestMethod.GET)
      public String getNotifications(Model model){
          return "admin/notifications/notifications";
      }
  }
  </code></pre>