title: Glassfish inteliji index.html not found
body: <p>i got a project with modules</p>
  
  <p>APP - project
  modules:
  -business
  -dao
  -model
  -webapp</p>
  
  <p>i'm trying to deploay only webapp on glassfish server ( it's jsf project ) but every time i try to create artifact i have server error 404 , not found index.xhtml or HTTP Status 404 - /index.xhtml Not Found in ExternalContext as a Resource</p>
  
  <p>pom.xml ( webapp module )</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;parent&gt;
          &lt;artifactId&gt;app&lt;/artifactId&gt;
          &lt;groupId&gt;com.mbucko.auctions&lt;/groupId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;artifactId&gt;webapp&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;webXml&gt;web\WEB-INF\web.xml&lt;/webXml&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
              &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
              &lt;version&gt;2.2.14&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
              &lt;version&gt;2.5&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/javax.faces/jsf-api --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.faces&lt;/groupId&gt;
              &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
              &lt;version&gt;2.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.primefaces/primefaces --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
              &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
              &lt;version&gt;5.3&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
           id="WebApp_ID" version="2.5"&gt;
  
      &lt;display-name&gt;PrimeFaces Web Application&lt;/display-name&gt;
  
      &lt;!-- Change to "Production" when you are ready to deploy --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
          &lt;param-value&gt;Development&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;!-- Welcome page --&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.xhtml&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  
      &lt;!-- JSF mapping --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;!-- Map these files with JSF --&gt;
      &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;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &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;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.xhtml&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Screen with structure
  <a href="https://i.stack.imgur.com/yzytU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yzytU.png" alt="enter image description here"></a></p>
  
  <p>Thanks for any help !!</p>