This tutorial demonstrates how to expose
a server-side method to an AJAX-enabled client application. You will use the WebSphere® Application
Server Feature Pack for Web 2.0, RPC Adapter technology to expose a method
in a Java™ class
that returns a list of movie data. You will use the Dojo Toolkit, included
in the WebSphere Application
Server Feature Pack for Web 2.0, to create the Web page that will display
the movie data.
Learning objectives
The purpose of this
tutorial is to teach you how you can use the RPC Adapter to create a command-based
service to an AJAX-based user interface. In this tutorial you will learn how
to :
- Create a Web 2.0 enabled Web application to contain all of the resources
required by your application.
- Create the RPC Adapter service that returns a JSON response.
- Create the Java objects that contain the data for your application.
- Create a Web page that is Dojo enabled.
- Write JavaScript™ and HTML code to create the AJAX-based
user interface for your application
Time required
This tutorial should take
approximately 60 minutes to finish. If you explore other concepts related
to this tutorial, it could take longer to complete.
Prerequisite
Install WebSphere Application Server Version
7.0:
- Open the IBM® Installation
Manager.
- Click Install. The Install Packages page opens.
- In the package list, select IBM WebSphere Application Server
Version 7.0 Test Environment, then click Next.
- Read the license agreements. Accept the license agreements then click Next.
- Follow the instructions in the Installation Manager to install WebSphere Application
Server Version 7.0.
- In the Features list, ensure that you select IBM WebSphere
Application Server Version 7.0 Feature Packs. These feature packs
include the WebSphere Application Server Feature Pack for Web
2.0.
Tip: You can also run this tutorial using WebSphere Application
Server Versions 6.0 and 6.1. If you use WebSphere Application Server Version
6.0 or 6.1, ensure that you also install the feature packs. The instructions
in this tutorial assume that you are using WebSphere Application Server Version
7.0. The instructions will vary if you use a different test environment.