• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Help with Simple Java EE Facelets Composite Application

Ranch Hand
Posts: 34
Android Python Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy Ranchers,

I am trying to stay awake following the tutorial/documentation located here: https://javaee.github.io/tutorial/jsf-facelets005.html

I created the Web project for this in NetBeans IDE 8.2. My directory structure can be seen here: https://imgur.com/a/w42P6

The directory structure for the web application is as follows:

  - Web Pages
     - WEB-INF
     - resources
     .    |
     . - emcomp
     .     |- email.xhtml
     .     |- emuserpage.xhtml
     . index.xhtml
     - Source Packages
     - Libraries
     - Configuration Files    

The source code for the email.xhtml file is as follows:

The source code for emuserpage.xhtml is as follows:

There is also a default index.xhtml page that NetBeans creates. The code for this is as follows:

The index.xhtml page is the only thing that shows when deploying this application to glassfish.

If I enter the URL suggested in the tutorial: http://localhost:8080/application-name/emuserpage.xhtml I receive a 404 error.
When I go to http://localhost:8080/FaceletsCompositeExample/ I see the index.xhtml page.

The web.xml, deployment descriptor, for this project is as follows:

Is there a problem with the <servlet-mapping> section of the deployment descriptor? From my understanding the current mapping says to display things that are in the "faces" directory or something. I am not sure how the index.xhtml file is in the "faces" directory because in the project structure this file is under "Web Pages". Maybe the <welcome-file>faces/index.html</welcome-file> creates some imaginary (looking for a better word) directory structure and this is why the index.xhtml page shows up?

Does anyone know where I went wrong with this example?

Thank-you for reading this.


Kim Gordon

[Thumbnail for FaceletsCompositeExample-1-3-2018-11-59-02-AM.png]
Screenshot of FaceletsCompositeExample Project
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic