JSF Development in NetBeans

Developing A JSF web application requires creating a project in an IDE and can involve the creation of numerous types of files. This web presentation shows how JSF projects and common types of files can be created in NetBeans.

Creating Files

Files can be created in NetBeans in two useful ways:

After you have done this NetBeans will bring up a two step wizard:

  1. Choose File Type (omitted if already selected)
  2. Name and Location

Choose File Type

For the "Choose File Type" step the new file wizard looks like the one below.

File Types

NetBeans Type NetBeans Category Project Location
Folder Other Web Pages
JSF Page JavaServer Pages or Web Web Pages
JSF Faces Configuration JavaServer Pages or Web Web Pages/WEB-INF
Cascading Style Sheet Web or Other Web Pages/resources/css
JavaScript File Web or Other Web Pages/resources/javascript
Java Package Java Source Packages
JSF Managed Bean JavaServer Pages or Web Source Packages
Java Class Java Source Packages
Java Interface Java Source Packages
Properties File Other Source Packages
SQL File Other Source Packages

Note: A JSF managed bean can be created as a NetBeans "Java Class" file by adding your own @Name annotation and a scope annotation. It is easier to use the NetBeans "JSF Managed Bean" type.

Name and Location

Check the "Project" field to make sure you are in the right project. If not, start over.

In most cases you will need to provide a name for the new file. You may have editable fields for specifying the location. Some file types, such as "JSF Managed Bean" will have addition fields for initial configuration of the file.