Adding Dojo widgets to existing Java EE Web pages
To add a Dojo widget to an existing Java™ EE Web page:
- In Enterprise Explorer, right-click your Web project and select
Properties.
- In the Properties list, select
Project Facets.
- In the Project Facets list, select the
Web 2.0 check box and click OK.
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.
By enabling the server-side technologies facet, your Web project is configured for both development and runtime support for the WAS 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 WAS 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.
By enabling the Ajax proxy facet, your Web project is configured to broker client requests from multiple domains while using Ajax. The Ajax proxy included in the WAS Feature Pack for Web 2.0 eliminates browser security concerns with cross-domain scripting when combining internal and external services.
- Add a Dojo widget to your Web page.
Related concepts