JSF 2.2: Blank Starting-Point Project

This is the home page. You should access this page as http://localhost/jsf-blank/index.jsf, not as http://localhost/jsf-blank/index.xhtml. For this file only, you can also use http://localhost/jsf-blank/. If the following looks like an input form, and pressing the button navigates to Page B, it shows that you have correctly installed JSF 2.2. Use this project as the starting point for your own JSF 2.2 projects, as described in the Getting Started section of the tutorial. See the "samples" folder for some template files.

JSF Test Form
Some random data:

If the tags like h:form and h:commandButton are totally ignored, it probably means that you don't have the JSF JAR file in WEB-INF/lib, that you haven't mapped the FacesServlet in web.xml, or that you used the wrong URL (i.e, ending in page-a.xhtml instead of page-a.jsf).

Note: when making your own facelets pages (i.e., JSF .xhtml pages) in a project based on this jsf-blank project, copy the template files from the "samples" folder to the top-level WebContent folder, then rename the files. Do NOT use this page directly, since this page has many extraneous entries.


All code from the coreservlets.com J2EE tutorials: JSF 2.2, PrimeFaces, Java 7 programming, Java 8 lambdas and streams, Hadoop, Ajax with jQuery, GWT, Spring, Hibernate, JPA, SOAP-based and RESTful Web Services, Android development, servlets, and JSP. There are also live instructor-led training courses on the same Java EE topics: JSF 2.2, PrimeFaces, Java 7 programming, Java 8 lambdas and streams, Hadoop, Ajax with jQuery, GWT, Spring, Hibernate, JPA, SOAP-based and RESTful Web Services, Android development, servlets, and JSP. Email info@coreservlets.com to inquire about customized versions of these courses taught onsite at your organization or for consulting/development support from Marty Hall. Also see the JSF 2.2 tutorial, the PrimeFaces tutorial, and information about Marty Hall, the training course instructor.