title: Custom .formLogin() Spring Security
body: <p>I am trying to use my page created to authenticate, it is the login.jsf. I use in .loginPage <code>/ login.jsf</code> with 2 inputs and 1 button to authenticate. However, by filling in the logins and password fields, and clicking the button, nothing happens. Unlike Spring Security own <code>.formLogin()</code> itself, which already does all the processing by clicking the button. </p>
  
  <p><strong>My method</strong></p>
  
  <pre><code>@Override
  protected void configure(HttpSecurity http) throws Exception {
      http
        .authorizeRequests()
        .antMatchers("/login.jsf").anonymous()
        .anyRequest().authenticated()
        .and()
        .formLogin()
        .loginPage("/login.jsf")
        .defaultSuccessUrl("/homepage.jsf")
        .failureUrl("/login.jsf?error=true")
        .and()
        .logout().logoutSuccessUrl("/login.jsf");
  }
  </code></pre>
  
  <p>Anyone have any suggestions?</p>
  
  <p>Print screen default .formLogin()</p>
  
  <p><a href="https://i.stack.imgur.com/zfeuD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zfeuD.png" alt="enter image description here"></a></p>