title: How to auto direct to "my web application" from "root (/)" context in JBoss?
body: <p>I am using JBoss 6.0 .</p>
  
  <p>I have deployed my web application: <strong>myApp.ear</strong> under the web-context: "<strong>/test</strong>".
  So in browser-url if I type "<strong><em><a href="http://localhost:8080/test/" rel="noreferrer">http://localhost:8080/test/</a></em></strong>", I do get my login page (myLogin.jsp).</p>
  
  <p>Since my WAR exists inside a EAR file, I have specified the context root in the <strong>application.xml</strong> file using a <strong>context-root</strong> element inside of the web module - i.e.</p>
  
  <pre><code>&lt;module&gt;
      &lt;web&gt;
          &lt;web-uri&gt;myWeb.war&lt;/web-uri&gt;
          &lt;context-root&gt;/test&lt;/context-root&gt;
      &lt;/web&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>My question is how to <strong>auto direct</strong> user to my web-app  from "root context"?</p>
  
  <p>I mean if user types "<strong><a href="http://localhost:8080/" rel="noreferrer">http://localhost:8080/</a></strong>", I would expect my web-application's login page to load (instead of JBoss's default ROOT.war's index.html page).</p>
  
  <p>I deleted existing <strong>index.html</strong> from <strong>{JBOSS}\server\default\deploy\ROOT.war</strong> and created a login.jsp there. Now I can see that "login.jsp" is getting invoked when I type <a href="http://localhost:8080/" rel="noreferrer">http://localhost:8080/</a>.  But I can not redirect user-request to my web-app's login page.</p>
  
  <p>In that login.jsp, I have tried with:
   <code>&lt;jsp:forward page="/test" /&gt;</code>, but I get error: "HTTP Status 404 - /test".</p>
  
  <p>If I invoke like <code>&lt;jsp:forward page="/test/myLogin.jsp" /&gt;</code> I still get the same 404 error.</p>
  
  <p>Can any one suggest how to achieve the auto-direct to my web-app from root-context?</p>