Because templates are not pages in themselves, we don't want them to be accessible as a page. In order to do this, we need to create it in the WEB-INF
folder.
Note
The JEE7 standard stipulates that the WEB-INF
folder and all of its contents must be inaccessible on a browser for users.
We need to keep things organized and place things such as template files separate from configuration files such as web.xml
. So, we will create a folder named resources
in the WEB-INF
folder and then create another folder in the resources
folder named templates
. Perform the following steps to create a Facelets Template:
In the Projects navigator, open the
WEB-INF
folder and then select it. You should see something similar to the following screenshot:Right-click on the
WEB-INF
folder, move the mouse over the New item, and select Folder..., as shown in the following screenshot:Name the new folder
resources
. Next, create a new folder and name ittemplates
. TheWEB-INF
folder should look...