Setting up a Developer Environment for Content Manager related Web Application Development

Abstract

In this document, we discuss how you can setup your development environment for Content Manager related Web application development.

Contents


To develop a Content Manager Web application using Information Integrator for Content, you need to set up a proper Web development environment. In this documentation, we assume you will use the WebSphere® Studio Application Developer software to develop your application. We address how you can setup this environment for your Content Manager related Web application development.

Before you start

You need to make sure that Content Manager is installed correctly, and that your Client for Windows™ and eClient work properly. This can be done by importing sample data, searching for some documents, importing additional documents, and searching against the newly ingested documents.

If you do not have the software, you can obtain a trial version from the following URL:
http://www.ibm.com/software/awdtools/studioappdev

Although a newer version is available now, we use Version 5.1.1 to setup the development environment. If you are new to WebSphere Studio Application Developer and need to select a version to install, we recommend using Version 5.1.1 to more easily follow the steps we provided here. Once you are familiar with the software, you can always upgrade it to a later version.

Setting up a development directory and environment

You need to designate a directory for Web application development. We recommend creating a new directory specific for Content Manager related Web application development. This allows you to have a clean independent development environment, which does not interfere with any other development work that you may be doing.

To set up a separate development environment, follow these steps:
  1. Create a dedicate file system directory, <DEV_DIR>. For example: c:\cm_app.
  2. Create a new WebSphere Studio Application Developer shortcut to start with the following command:
    "
    <WSAD_HOME>\wsappdev.exe" -data <DEV_DIR>
    Where
    <WSAD_HOME> is the directory where you installed the WebSphere Studio Application Developer software. Note that if you did not create the directory, when you first start the WebSphere Studio Application Developer with this command, a corresponding <DEV_DIR> directory will be created for you.
    <DEV_DIR> is the dedicate file system directory you created in step one. For example c:\cm_app.
  3. Rename the shortcut to distinguish it from the generic WebSphere Studio Application Developer software. For example: Rename the short cut to cm_dev.
  4. Start the WebSphere Studio Application Developer using the short cut.

If you made the configuration as described in the above steps, when you launch the short cut, your workplace should be empty.

Setting up a new Web project

Before writing any code, you must create and configure a new Web project in the WebSphere Studio Application Developer environment.

There are several steps that you need to perform to accomplish this:
  1. Create a new Web project.
  2. Add JAR files to the Java™ build path:
    - From the
    <CMBROOT> directory, cmb81.jar, cmbsdk81.jar, cmbview81.jar, and log4j.jar.
    - From the
    <DB2_HOME>\java directory, db2java.zip file.

To create a new Web project, perform the following steps:
  1. Start WebSphere Studio Application Developer using the new shortcut. Remember to create a new shortcut that uses a dedicated directory for your application development.
  2. Select File -> New -> Project.
  3. From the New Project window, select Web from the left panel, and select Dynamic Web Project from the right panel. Click Next.New Web project window
  4. From the New Web Project window, enter a project name (for example: cm_app). Check the Configure advanced options. Click Next.
  5. From the J2EE™ Settings Page window, enter a EAR project name (for example: cm_app_ear). Select 1.3 or higher for J2EE level field, and click Finish.
  6. If the system prompts you to confirm the switch to the Web perspective, click Yes.

Now, you should see two folders under the Project Navigator window, your Web project and your EAR project (for example: cm_app, cm_app_ear).

To add the necessary JAR files to the Java build path for your Web project, perform the following steps:
  1. Right-click your Web project (for example: cm_app), and select Properties from the context menu.
  2. Select Java Build Path from the left panel, and then select the Libraries tab.
    Java Build Path window
  3. Add Information Integrator for Content JAR files to the Java build path:
    a. Click
    Add External JARs....
    b. Navigate to the directory
    <CMBROOT>\lib.
    Where
    <CMBROOT> is the location where Information Integrator for Content is installed. By default, it is in C:\CMBROOT.
    c. Multi-select the following JAR files by holding down the
    Ctrl key on your keyboard: cmb81.jar, cmbsdk81.jar, cmbview81.jar, and log4j.jar.
    d. Click
    Open.
  4. Add the DB2 Java JAR file to the Java build path:
    a. While on the Java Build Settings, Libraries tab, click
    Add External JARs...
    b. Navigate to the directory
    <DB2_HOME>\java.
    Where
    <DB2_HOME> is the location where DB2 is installed. By default, it is in C:\Program Files\IBM\SQLLIB.
    c. Select db2java.zip file. Click
    Open.
  5. The selected JAR files are now added to the build path. Click OK.

Setting up a new server project to run your Content Manager Web application

To test your application within the application development environment, you need to create and configure a new server project. There are several steps that we need to perform to accomplish this:
  1. Create a new server project.
  2. Add the JAR files for the runtime environment:
    - From the
    <CMBROOT> directory, cmb81.jar, cmbsdk81.jar, cmbview81.jar, log4j.jar, and xerces.jar.
    - From the
    <DB2_HOME>\java directory, db2java.zip file.
  3. Add the folder where cmbicmenv.properties is to the class path.
  4. Add your EAR project to the server configuration.

To create a new server project, perform the following steps:
  1. Within WebSphere Studio Application Developer, select File -> New -> Other.
  2. Select Server from the left panel and select Server and Server Configuration from the right panel. Click Next.
    Create and configure server window
  3. Enter a server name and a folder name (for example, use cm_server for both fields).
  4. For Server type field, expand WebSphere version 5.0, and select Test Environment. Click Next.
  5. Enter 9080 for Use default port numbers field. Click Finish.
  6. If prompted regarding whether you want to create a new server project with the newly created server, click Yes.

To add the JAR files for runtime environment, perform the following steps:
  1. From the file menu, select Window -> Open Perspective -> Server.
  2. In the lower left of the window, you should see Server Configuration panel. There should be a Servers folder. Expand the Servers folder, right-click your newly created server and select Open from the context menu.
  3. Click the Environment tab from the right panel.
  4. Add Information Integrator for Content JAR files to the Java build path:
    a. Click
    Add External JARs...
    b. Navigate to the directory
    <CMBROOT>\lib.
    c. Multi-select the following JAR files by holding down the
    Ctrl key on your keyboard: cmb81.jar, cmbsdk81.jar, cmbview81.jar, log4j.jar, and xerces.jar.
    d. Click
    Open.
  5. Add the DB2 Java JAR file to the Java build path:
    a. While on the Java Build Settings, Libraries tab, click
    Add External JARs...
    b. Navigate to the directory
    <DB2_HOME>\java.
    c. Select db2java.zip file. Click Open.
  6. The selected JAR files are added to the build path. Click OK.
  7. Going back to the Environment tab of the Server Configuration, select File -> Save or press Ctrl S to save the changes.
  8. If prompted with "Do you want to load the changes", click Yes to confirm.

We need to set the folder that contains the cmbicmenv.properties file in the class path. To add this folder to the class path, perform the following steps:
  1. Within the Environment tab of the Server Configuration, click Add External Folder...
  2. Navigate to the <CMGMT_DIR> folder.
    Where
    <CMGMT_DIR> is the location where the common files of Content Manager and Information Integrator for Content are installed. By default, it is in C:\Cmgmt.
  3. Select the folder and click OK.
  4. Select File -> Save or press Ctrl S to save the changes to the server instances.
  5. Select File -> Close or click X on your server tab to close the panel.

Finally, we need to add your EAR project to the server configuration as follows:
  1. In Server Configuration panel, expand the Servers folder if it is not already expanded, and right-click your server.
  2. Select Add or remove projects....
  3. Select your EAR project from the Available projects, and click Add.

The development environment is now ready for you to develop Content Manager related Web applications.

Special Notices

This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.

Profile

Publish Date
09 November 2004


Rating: Not yet rated


Author(s)

IBM Form Number
TIPS0459