In this lesson, you will learn to create a Web project that is
configured for Web 2.0 application development by enabling specific project
facets.
To create a dynamic Web project that is configured for Web 2.0 application
development:
- In the main menu, click . The New Dynamic Web Project wizard opens.
- In the Project name field, type web2Project.
- In the Target Runtime list, select WebSphere Application
Server v7.0.
- In the Configuration section, click Modify to
enable the Web 2.0 project facets. The Project Facets dialog
opens.
- Expand Web 2.0 then select Dojo
Toolkit and Server-side technologies. Click OK.
By enabling the server-side
technologies facet, your Web project is configured for both development and
runtime support for the WebSphere® Application Server Feature Pack for Web
2.0. All of the required JAR files are added to the Java™ Build
Path for your project and the deployment descriptor.
By enabling the
Dojo Toolkit facet, your Web project is configured to develop Dojo Web applications.
The Dojo Toolkit included in the WebSphere Application Server Feature Pack for Web
2.0 includes the open source Dojo
toolkit and additional IBM® extensions to the base Dojo Toolkit,
including libraries for ATOM (ATOM Syndication Format) data access, analog
and bar gauges, and simplified access for SOAP Web services.
A
project facet is a specific unit of functionality that you can add to a project
when that functionality is required. When a project facet is added to a project,
it can add natures, builders, classpath entries, and resources to a project,
depending on the characteristics of the particular project. Web 2.0 facets
define the characteristics of your Web 2.0 enabled Web application. The Web
2.0 facets specify the requirements and constraints that apply to your Web
2.0 project.
Table 1. Web 2.0 facets| Facet name |
Description |
| Web 2.0 |
Enables support for the runtime components in the WebSphere Feature
Pack for Web 2.0, including AJAX Proxy, Dojo Toolkit, and Server-side technologies |
| Ajax Proxy |
Enables support for the WebSphere AJAX Proxy. |
| Dojo Toolkit |
Enables Dojo capabilities. |
| Server-side technologies |
Adds the libraries for server-side technologies such
as Feed support, Web remoting, Web messaging, and JSON4J to your Web project.
|
- In the New Dynamic Web Project wizard, ensure Add
project to an EAR is selected, then click Finish to
create the Web 2.0 enabled Web project.
Your Web project, web2Project, is created.
The Dojo widget libraries are imported into the WebContent folder.
The required JAR files, such as RPCAdapter.jar and JSON4J.jar,
are imported into the JavaResources\Libraries\WebSphere Application
Server v7.0 folder.
In the Enterprise Explorer view of the
Web perspective, your web2Project Web project looks
like the following:
Right-click web2ProjectEAR and
select . The Deployment Descriptor
opens in the editor. The Shared Library section of the Deployment tab includes
the Feature Pack for Web 2.0 Library:
Tip: If you are using WebSphere Application Server v6.0 or 6.1, to view
the shared libraries in the deployment descriptor, expand web2ProjectEAR and
double click Deployment Descriptor: web2ProjectEAR.