title: Java Forms login doesn't work when RBAC enabled
body: <p>Following the documentation on <a href="https://docs.oracle.com/cd/E19226-01/820-7627/bncby/index.html" rel="nofollow noreferrer">https://docs.oracle.com/cd/E19226-01/820-7627/bncby/index.html</a> I got forms login working. </p>
  
  <p>I tried the variations: Firstly, a form with <code>action="j_security_check"</code>. Second, using this in JSP:</p>
  
  <pre><code>&lt;%
  if(request.getRemoteUser() == null ){
      try{
          request.login("hussain", "mypassword");
          out.println( "Logged in" );
      }catch(Exception e){
          out.println( "Error: " + e.getMessage() );
      }   
  }else{
      out.println( request.getRemoteUser() + " is already logged in");
  }
  %&gt;
  </code></pre>
  
  <p>I am using WildFly 12 on Windows.</p>
  
  <p>I added users using add-user.bat. The users get added to \standalone\configuration\application-users.properties. I secured a page in web.xml:</p>
  
  <pre><code>    &lt;security-constraint&gt;
          &lt;display-name&gt;SecurityConstraint&lt;/display-name&gt;
          &lt;web-resource-collection&gt;
              &lt;web-resource-name&gt;WRCollection&lt;/web-resource-name&gt;
              &lt;url-pattern&gt;/test.jsp&lt;/url-pattern&gt;
              &lt;http-method&gt;GET&lt;/http-method&gt;
              &lt;http-method&gt;POST&lt;/http-method&gt;
          &lt;/web-resource-collection&gt;
          &lt;auth-constraint&gt;
              &lt;description&gt;AuthConstraint&lt;/description&gt;
              &lt;role-name&gt;TutorialUser&lt;/role-name&gt;
          &lt;/auth-constraint&gt;
          &lt;user-data-constraint&gt;
              &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;
          &lt;/user-data-constraint&gt;
      &lt;/security-constraint&gt;
  
      &lt;login-config&gt;
          &lt;auth-method&gt;FORM&lt;/auth-method&gt;
          &lt;form-login-config&gt;
              &lt;form-login-page&gt;/login&lt;/form-login-page&gt;
              &lt;form-error-page&gt;/loginerror&lt;/form-error-page&gt;
          &lt;/form-login-config&gt;
      &lt;/login-config&gt;
  
      &lt;security-role&gt;
          &lt;role-name&gt;TutorialUser&lt;/role-name&gt;
      &lt;/security-role&gt;
  </code></pre>
  
  <p>The /test.jsp doesn't show unless I login. So, everything is good.</p>
  
  <p>Next, I enabled role based authentication using:</p>
  
  <pre><code>cd /core-service=management/access=authorization
  :write-attribute(name=provider, value=rbac)
  </code></pre>
  
  <p>Stuck at this point. Login stops working.</p>
  
  <p>Help?</p>