Samples and applications

Several example applications are available for WebSphere Application Server. You can use these samples to familiarize yourself with the product and to help you develop your own applications.

The Samples Gallery

The WebSphere Application Server samples gallery provides a set of small, generic samples that show how to perform common enterprise application tasks. The samples demonstrate the use of session and entity enterprise beans, JDBC access, connection pooling, Java Mail, message driven beans, and other Web techniques and reusable componentry. The samples are installed in the profile_root/samples/src directory, where profile_root is the path specified for the profilePath option when the profile was created. The default value for profilePath is /QIBM/UserData/WebSphere/AppServer/V6/edition/profiles/profile_name.

Note: You can build or modify the samples' source code to support your project.

The Samples Gallery includes the following materials:

Install and access the Samples Gallery

Follow these steps to install the samples in the WebSphere Application Server samples gallery that are included with the WebSphere Application Server on your iSeries server.

  1. Create a standalone application server profile, as described in wasprofile command, or use the default application server profile.
    By default, only the Samples Gallery and the Plants by WebSphere application are installed on the application server. They are installed in the /QIBM/UserData/WebSphere/AppServer/V6/edition/profiles/profile_name/installedApps/cell_name directory, where edition is Base for WebSphere Application Server Express and WebSphere Application Server, and ND for WebSphere Application Server Network Deployment; profile_name is the name of your application server profile; and cell_name is the name of your WebSphere Application Server cell.

    Note: If you are using WebSphere Application Server-Express, the default profile does not have the samples installed. In addition, if you use a unique template to create a profile that does not include SamplesGallery, the samples application is not installed. For information on installing the WebSphere Application Server 6.0 Samples Gallery, refer to the Samples TechNote.

  2. (Network Deployment only) To run the samples in a distributed WebSphere Application Server Network Deployment environment, install and configure the samples in a standalone application server profile installation, and then use the addNode script to federate the node into the deployment manager cell. When you run the addNode script, use the dmgr_host argument, and -includeapps and -includebuses options:
    addNode dmgr_hostname -includeapps -includebuses

    where dmgr_hostname is the name of the machine that hosts your deployment manager profile. For more information about the addNode script, see The addNode command.

  3. Start the application server.

  4. Access the samples gallery at this URL:
    http://your.server.name:port/WSsamples

    where your.server.name is the name of your iSeries server and port is the port number for the application server's internal HTTP transport.

  5. (Optional) Install additional samples.
    Additional samples are initially listed as installable samples in the Samples Gallery. For further instructions on installing each sample, refer to the Installable Samples section of the Samples Gallery in your Web browser, from Step 4.

    Note: To installing additional samples on non-default profiles, specify the -server myServer parameter. Additional information about -server parameter and other script values can be found in Installable Samples, Samples install help section.

Troubleshooting the Samples Gallery

If you are unable to access the Samples Gallery, verify the following items:

Additional samples applications

Limitations of the samples