title: Preferred way to set up a JSF start page?
body: <p>I'm using JSF 2.0 to build a website. Eclipse generated the following web.xml file</p>
  
  <pre><code>...
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  ...
  </code></pre>
  
  <p>So to view my application i have to visit "localhost/myApp/<strong>faces</strong>/index.xhtml". I would prefer to view it directly by visiting "localhost/myApp/index.xhtml"</p>
  
  <p>I see two options for this:</p>
  
  <p>Changing the web.xml to the following</p>
  
  <pre><code>...
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  ...
  </code></pre>
  
  <p>Or setting up an index.xhtml in my base dir that does a javascript/meta direct to faces/index.xhtml.</p>
  
  <p>Which do you think is better ? Or is there another way how you would do it?</p>