title: My Tomcat logs say I've successfully authenticated, but still get a 404. Does this rule out Tomcat as the cause?
body: <p>I'm working on adding Form-based authentication to an existing Jersey webapp.  I was able to quickly get Basic authentication working successfully against my LDAP realm.  However, once I switched to Form and supplied a login/error page, the application does not present the page (gives a 404) after authentication.  </p>
  
  <p>When I setting up the web.xml with Basic Authentication I got the  username/password dropdown (supplied by the web browser), signed in, and the Jersey app presented all the pages like it did before any authentication was set up.</p>
  
  <p>After switching to Form, I monitored my tomcat logs during a login and can see it appears to be authenticating successfully.  </p>
  
  <pre><code>01-May-2019 16:09:26.603 FINE [http-nio-8080-exec-7] org.apache.catalina.realm.RealmBase.hasRole Username [me@awesome.com] has role [app-user]
  01-May-2019 16:09:26.603 FINE [http-nio-8080-exec-7] org.apache.catalina.realm.RealmBase.hasResourcePermission Role found:  app-user
  01-May-2019 16:09:26.604 FINE [http-nio-8080-exec-7] org.apache.catalina.authenticator.AuthenticatorBase.invoke  Successfully passed all security constraints
  </code></pre>
  
  <p>I would suspect I can rule out my tomcat security setup being the problem, since the logs indicate I'm authenticating successfully.  My assumption is that there is something different about Basic and Form authentication where the Jersey webapp I was given needs to change.  </p>
  
  <p>Given the logs, should I focus my attention on the Jersey application?  </p>