HTML and CSS Reference
As shown, the project root contains two main subfolders ( src and target ) and the ( pom.xml ) file. The src
directory contains the source code of the application and the target directory contains the generated artifacts. The
src directory has a number of subdirectories; each one of these directories has a specific purpose:
• src/main/java: It contains the Java source code of the application.
• src/main/resources: It contains the resources that the application needs such as the
• src/main/filters: It includes the resource filters.
• src/main/config: It includes the configuration files.
• src/main/webapp: It includes the files of the JEE web application project.
• src/test: It includes the unit tests of the application.
• src/site: It includes the files used to generate the website of the Maven project.
Adding to the Apache Maven 3 software, all of the examples of this topic use Oracle jdk1.6.0_27 (which can be
downloaded from www.oracle.com/technetwork/java/javase/downloads/index.html ) , and the examples can run
on any JSF 2.1 (and JSF 2.2 for the JSF 2.2 examples) capable runtime environment.
■ oracle GlassFish v3.1 (or later) and apache tomcat 7 are capable to run JSF 2.1 applications. I will show you
how to run the firstApplication , which is based on JSF 2.1 on both Java web containers.
Developing the firstApplication
The firstApplication contains two pages. In the first page, you can enter your name and password as shown
in Figure 1-4 .
Figure 1-4. The login page