title: Tomcat uses BASIC auth instead of FORM auth
body: <p>I've run into a very weird problem with Tomcat: My Webapp running on Tomcat 6 works just fine with BASIC auth. However I would like to switch to FORM based auth. But when I change my web.xml from:</p>
  
  <pre><code>&lt;login-config&gt;
      &lt;auth-method&gt;BASIC&lt;/auth-method&gt;
      &lt;realm-name&gt;my realm&lt;/realm-name&gt;
  &lt;/login-config&gt;
  </code></pre>
  
  <p>to this here</p>
  
  <pre><code>&lt;login-config&gt;
      &lt;auth-method&gt;FORM&lt;/auth-method&gt;
      &lt;form-login-config&gt;
        &lt;form-login-page&gt;/login.html&lt;/form-login-page&gt;
        &lt;form-error-page&gt;/loginfail.html&lt;/form-error-page&gt;
      &lt;/form-login-config&gt;
      &lt;realm-name&gt;my realm&lt;/realm-name&gt;
  &lt;/login-config&gt;
  </code></pre>
  
  <p>Tomcat still uses BASIC auth.</p>
  
  <ul>
  <li>Both login files exist.</li>
  <li>There are no errors in catalina.err/out.</li>
  <li>Leaving out the realm element makes the browser show "Authentication
  required" instead of the realm name (still uses BASIC)</li>
  </ul>
  
  <p>Are there any conditions under which FORM based auth is not being used?</p>