title: j_security_check not working when <Context path="">
body: <p>I use <code>j_security_check</code> as part of JAAS mechanism on a tomcat/tomEE server.</p>
  
  <p>I currently have a context called "admin", that has the login process as a separate page (login.html), and that login page has a form similar to this: <code>&lt;form action="j_security_check" method="post"&gt;</code> with the proper inputs sending j_username &amp; j_password properties.</p>
  
  <p>It all works just fine there.</p>
  
  <p>For clarification, My app is accessible at e.g. "www.myapp.com/admin"</p>
  
  <p>Now I've been asked to add another webapp in the root of the domain, "www.myapp.com", so i add this in my <code>conf/server.xml</code>:</p>
  
  <pre><code>`&lt;Context 
    docBase="ROOT" 
    path="" 
    reloadable="true" 
  /&gt;`
  </code></pre>
  
  <p><code>ROOT.war</code> contains the webapp that needs to be in the <code>www.myapp.com/</code> domain path.</p>
  
  <p>What I'm trying to do is add the <code>j_security_check</code> mechanism to that context as well (it should be done in <code>AJAX</code> instead of a <code>&lt;form&gt;</code> for UX reasons).</p>
  
  <p>Note that i've managed to have cookies on both contexts, but when I make a <code>www.myapp.com/j_security_check</code> call, I always get a <code>408 Request Timeout</code> response.</p>
  
  <p>How can I perform a <code>j_security_check</code> call from my app's root context path? (without an external login page please)</p>