Purpose

This tool mentor provides instructions on how to deploy a Web application to a WebSphere application server.

It relates to the following RUP information:

Overview

Before a Web application can be deployed, it must first be assembled into an archive file (J2EE Module or J2EE Application). Deployment then simply consists of installing the archive file on the server using WebSphere's administrative tools. The following steps are performed in this tool mentor:

 

Create an archive file for the application

To top of page

If your Web application was developed in RAD 6.0, follow the steps described in Tool Mentor: Assembling J2EE Modules and Applications using RAD 6.0 to package it into an archive file. Otherwise, you can use the Assembly toolkit included with WebSphere Application Server to create an archive as follows:

  1. Start the Assembly Toolkit.

    1. For Windows, select Start > Programs > IBM > ASTK > ASTK.
    2. In the Application Server Toolkit window, specify a workspace name and click OK.
  2. To create an Enterprise Application Archive (EAR) file:

    1. In the J2EE perspective, select File > New > Enterprise Application Project.
    2. Use the New Enterprise Application Project wizard to select the J2EE level to support, specify the name and location of the EAR file and select the existing modules (Web, EJB, Application Client or Connector) to include in the EAR file.
  3. To create a Web Archive (WAR) file:

    1. In the J2EE perspective, select File > New > Dynamic Web Project.
    2. Use the New Web Project wizard to specify the name and location of the WAR file, associate it with an EAR file and customize the Web project options.
    3. After the new Web project is created, you can import your application's Web content using the Import wizard available from the File menu.
  4. To create an EJB JAR file:

    1. In the J2EE perspective, select File > New > EJB Project.
    2. Use the New EJB Project wizard to select the EJB specification version to use, specify the name and location of the JAR file, associate it with an EAR file and define any module and JAR file dependencies.
    3. After the new EJB project is created, you can import your Enterprise JavaBeans and related code artifacts using the Import wizard available from the File menu.
  5. To create an Application Client JAR file:

    1. In the J2EE perspective, select File > New > Application Client Project.
    2. Use the Application Client Project Creation wizard to select the J2EE level to use, specify the name and location of the JAR file, associate it with an EAR file and define any module and JAR file dependencies.
  6. To create a Resource Adapter Archive (RAR) file:

    1. In the J2EE perspective, select File > New > Connector Project.
    2. Use the New Connector Project wizard to specify the name and location of the JAR file, associate it with an EAR file and define any module and JAR file dependencies.
  7. Edit the deployment descriptors for enterprise applications, Web, EJB or Application Client modules as needed.

    1. In the J2EE Hierarchy view, right-click the module and select Open With > Deployment Descriptor Editor.
    2. Select the appropriate tab at the bottom of the editor view to edit specific deployment descriptor values.
  8. Generate deployment code for EJB modules.

    1. In the J2EE Hierarchy view, right-click the module and select Generate > Deployment and RMIC Code.
    2. Make sure that no problems are reported during the generation process.
  9. Generate deployment code for Web Services-enabled modules.

    1. In the J2EE Hierarchy view, right-click the module and select Web Services > Deploy Web Service.
    2. Make sure that no problems are reported during the generation process.

 

Install the archive file in WebSphere Application Server

To top of page

After assembling your application, use WebSphere's Administration tools to deploy the EAR, WAR or JAR files into the application server. For a GUI or script-based interface, use the Administrative Console or the wsadmin tool, respectively. To use the Administrative Console:

  1. Start the application server (use the startServer command on a command line).
  2. Start the Administrative Console by opening a Web browser and entering: http:// your_server_name:9090/admin.
  3. Login to the Console.
  4. Follow the steps for installing a new application.

Rational Unified Process  

2003.06.13