This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Help with Simple Java EE Facelets Composite Application  RSS feed

 
Ranch Hand
Posts: 34
Android Chrome Python
  • Mark post as helpful
  • send pies
  • 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:

FaceletsCompositeExample
 |
  - 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.

Regards,

Kim Gordon

FaceletsCompositeExample-1-3-2018-11-59-02-AM.png
[Thumbnail for FaceletsCompositeExample-1-3-2018-11-59-02-AM.png]
Screenshot of FaceletsCompositeExample Project
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
Enterprise Java integration with Delphi and Free Pascal applications - new release 2019.02
https://coderanch.com/t/705708/Enterprise-Java-integration-Delphi-Free
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!