October 23, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

JBoss Tools 3 Developer Guide

  • June 3, 2009
  • By Anghel Leonard
  • Send Email »
  • More Articles »

Creating a JSF Project Stub

In this section you will see how to create a JSF project stub with JSF Tools. This is a straightforward task that is based on the following steps:
  1. From the File menu, select New | Project option. In the New Project window, expand the JBoss Tools Web node and select the JSF Project option (as shown in Figure 3). After that, click the Next button.



    Click here for larger image

    Figure 3: Create a JSF Project

  2. In the next window, it is mandatory to specify a name for the new project (Project Name field), a location (Location field—only if you don't use the default path), a JSF implementation (JSF Environment field), and a template (Template field). As you can see, JSF Tools offers a set of predefined templates as follows:
    • JSFBlankWithLibs – This is a blank JSF project with complete JSF support.
    • JSFKickStartWithLibs – This is a demo JSF project with complete JSF support.
    • JSFKickStartWithoutLibs – This is a demo JSF project without JSF support. In this case, the JSF libraries are missing for avoiding the potential conflicts with the servers that already offer JSF support.
    • JSFBlankWithoutLibs – This is a blank JSF project without JSF support. In this case, the JSF libraries are missing for avoiding the potential conflicts with the servers that already offer JSF support (for example, JBoss AS includes JSF support).

    Figure 4 is an example of how to configure your JSF project at this step. At the end, just click the Next button:



    Click here for larger image

    Figure 4: Configure Your JSF Project

    This step allows you to set the servlet version (Servlet Version field), the runtime (Runtime field) used for building and compiling the application, and the server where the application will be deployed (Target Server field). Note that this server is in direct relationship with the selected runtime. Figure 5 shows an example of how to complete this step (click on the Finish button):



    Click here for larger image

    Figure 5: Set the Servlet Version, the Runtime, and the Server

After a few seconds, the new JSF project stub is created and ready to take shape! You can see the new project in the Package Explorer view.

JSF Project Verification

Before starting to develop a JSF application, you can take advantage of an important facility of JSF Tools: the ability to verify and report any dysfunction that may affect the application flow. This facility, known as the JSF Project Verification, will verify the application when it is saved and help you to easily identify errors. For this, you can follow these steps:
  1. From the Window main menu, select the Preferences option.
  2. In the Preferences window, expand the JBoss Tools | Web | Verification node from the left panel.
  3. Select the desired checkboxes and click on Apply and OK (it is recommended to select all of them).

JSF Application Configuration File

A very useful facility of JSF Tools is an editor especially designed for managing everything that is related to the JSF main configuration file (faces-config.xml). You can start this editor like this:
  1. Place the cursor in the Package Explorer view on your project node.
  2. Expand your JSF project node: registerJSF | WebContent| WEB-INF.
  3. Double-click on the faces-config.xml file.

When the editor is available, it will appear as in Figure 6.



Click here for larger image

Figure 6: JSF Tools Editor for Managing faces-config.xml





Page 2 of 5



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel