title: Set default home page via <welcome-file> in JSF project
body: <p>I am unable to set a default page that loads in the browser when I start a Java EE project using Tomcat 8.0 from Eclipse.
  I am trying to learn JSF, so I followed <a href="http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jst.jsf.doc.user%2Fhtml%2Fgettingstarted%2Ftutorial%2FJSFTools_tutorial_JSF20.html" rel="noreferrer">this tutorial</a></p>
  
  <p>Everything works fine, but I can only see the created pages when I right click on the <code>login.xhtml</code> or <code>welcome.xhtml</code> file and choose "Run As/Run on Server".</p>
  
  <p>So far, all the other web applications I have created loaded default page when I started the entire project. The default behavior is to load <code>index.html</code> page (or maybe index.jsp if there is some). So I added <code>index.html</code> and <code>index.xhtml</code> pages into my <code>WEB-INF</code> folder in the project, hoping that at least one of them will be shown. However, nothing happens. The browser always shows just the page on <code>localhost:8080/JSFFaceletsTutorial/</code> URL, but the page is white clean, not even an error message. I think I have been getting error 404 in the process of solving this issue along the way, however, I am no longer able to reproduce this error and I don't remember what caused it.</p>
  
  <p>I found that it's possible to <a href="http://wiki.apache.org/tomcat/HowTo#How_do_I_override_the_default_home_page_loaded_by_Tomcat.3F" rel="noreferrer">change the default starting page</a></p>
  
  <p>However, it doesn't work for me either. Regardless if I edit the <code>web.xml</code> file or not, I am getting the same result.</p>
  
  <p>What is even more puzzling, is that when I tried to change the web browser: "Window/Web Browser/..." it acted for a while differently in the external web browsers than in the internal Eclipse web browser. The internal had always blank page - but the external web browsers once managed to show the <code>index.html</code> page - but it was some outdated version. Despite I made absolutely sure that I edited it, saved the changes, restarted the server... and still, it showed me the outdated version of the page.
  And even in this case, it still ignored the changes made in the <code>web.xml</code> file.
  But when I am trying it now, it again shows blank white page in all browsers. I am not aware of any change I made except for editing <code>web.xml</code> file...</p>
  
  <p>My guess is that the problem is in the JSF technology I don't fully grasp yet. It's because when I choose to run the <code>login.xhtml</code> and <code>welcome.xhtml</code> pages using right click "Run As/Run on Server", the URL of those pages are on <code>localhost:8080:</code> with path <code>/JSFFaceletsTutorial/faces/login.xhtml</code> and <code>/JSFFaceletsTutorial/faces/welcome.xhtml</code>. That is weird, because I don't have any directory "faces" in my project.
  Typing all possible permutations of:</p>
  
  <pre><code>&lt;welcome-file-list&gt;
      &lt;welcome-file&gt;faces/index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;faces/index.xhtm&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  </code></pre>
  
  <p>in the <code>web.xml</code> didn't help either. It didn't help when I typed the full address there either.</p>
  
  <p>Here are warnings I am getting in the console (I skipped the INFO log entries):</p>
  
  <blockquote>
    <p>"Dec 19, 2014 9:39:55 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:JSFFaceletsTutorial' did not find a matching property.
    ...
    WARNING: JSF1074: Managed bean named 'loginBean' has already been registered.  Replacing existing managed bean class type com.tutorial.LoginBean with com.tutorial.LoginBean.
    Dec 19, 2014 9:39:57 AM org.apache.coyote.AbstractProtocol start"</p>
  </blockquote>
  
  <p>I am not sure this is helpful though.
  I am out of ideas now.</p>