Creating Dojo enabled Web projects
Dojo enabled Web projects hold all of the Web resources that are created and used when developing a Dojo Web application.
Install the WebSphere® Application Server Feature Pack for Web 2.0.
To create a Dojo enabled dynamic Web project:
- In the Enterprise Explorer view, right-click and select
New | Other | Dynamic Web Project | Next. The New Dynamic Web Project wizard opens.
- In the
Project name field, enter the name of your Web project.
- Select a Target Runtime from the drop down list.
Note: This field will be disabled if a target runtime had been previously set. To enable this field, you can do one of the following:
- Specify a new EAR Project Name then select a
Target Runtime.
- Select an existing EAR project from the list that uses the target runtime that you want to use.
- Click the
Modify button beside the Configurations drop down list.
- On the Project Facets page, select the
Web 2.0 | Dojo Toolkit check box and click OK to apply the Dojo facet.
- Click Next. Click Next again.
- The
Importing or sharing Dojo Toolkit page of the wizard enables you to determine how you want to use the Dojo Toolkit in your Web project. Specify the location of the Dojo Toolkit resources in the Source field:
Click
- Target Runtime
- Sets the Dojo Toolkit source to the Dojo distribution included in the runtime. This is the default option.
- Workspace
- Sets the Dojo Toolkit source to a Dojo distribution in your Workspace.
- File System
- Sets the Dojo Toolkit source to a Dojo distribution on your File system.
- External link
- Sets the Dojo Toolkit source to a remote location. To set the Source field to a remote location, type the URL.
Copy to current project to import the specified Dojo Toolkit into your Web project.
- Click Finish.
In the Enterprise Explorer view, a dojo folder is created under the WebContents folder. When you create a Web page, the Palette opens with four Dojo drawers. The Dojo components in the drawers are supplied by IBM® at design time. At runtime the JavaScript™, that corresponds to the Dojo resources that you specified on project creation, is executed.