JSF Quickstart With MyEclipse---2
天下维客,你可以修改的网络知识库
|
JSF编辑 相关文档:
其他资源: |
New Project Setup & Structure
To organize our development artifacts, we will need to create a new Web Module Project in MyEclipse that has JSF Capabilities added to it. You can create a web project using the wizard located at File > New > Other > Project > J2EE > Web Project, as shown in Figure 1, below.
Figure 1 - Web Project Wizard Dialog
The wizard will allow you to customize your project settings by entering your preferences into the dialog fields, as demonstrated in Figure 2.
Note: It is popular when developing JSF applications to also use the JSTL libraries, so selecting add "JSTL Support" during project creation is recommended. However, it is also possible to add the JSTL libraries later, via the "Add JSTL Libraries" context menu. In this example, we will add JSTL, but not make use of it explicitly during this brief tutorial.
Figure 2 - Web Project Settings
Once the Web Project is created, we need to add JSF Capabilities to it. This is done by right clicking on the root of our project in the Package Explorer View, and selecting MyEclipse > Add JSF Capabilities, as shown in Figure 3.
Figure 3 - Adding JSF Capabilities to a Web Project
The default values for the JSF dialog are fine for the purposes of this tutorial. Advanced users may perform additional configuration by changing the default settings in the dialog, as shown in Figure 4.
Figure 4 - Configuring JSF Capabilities
After the wizard completes, the project structure will look like that shown in Figure 5.
Figure 5 - Project Layout After Configuration
Now that the project has been created, we can begin building our web content by adding JFaces-based JSP pages, as illustrated in the next section.







