Testing artifacts on a server

You can use the server tools to test one or more application artifacts on an application server.

  1. In the Project Explorer view from the J2EE perspective, expand the project that contains the file you want to test.
  2. Right-click the artifact that you want to test. Examples of artifacts include the Web project or a file within the Web project (such as a JSP file, servlet, or HTML file), or an enterprise bean1.
  3. Select Run > Run on Server. The Server selection wizard appears.
  4. Use the radio buttons to specify how you want to select the server. Select from the following options:
    Option Description
    Choose an existing server This option uses an existing server that is defined in your workbench.
    Manually define a server This option creates a new server.
  5. Under the Select the server that you want to use list, select a server you want to run your application. The list of available servers, under the Select the server that you want to use list, depends on the J2EE specification level you defined for the artifact and the supported servers for this product.
  6. (Optional) Click Next to configure additional settings, such as configuring settings specific to the server, and adding or removing projects configured on the server.
  7. Click Finish. The server tools automatically complete the following tasks for you:
    • If the Create server resources in workspace check box on the Server preferences page (Windows >Preferences > Server) is enabled, the server tools creates a server project with Servers as the default name.
    • Creates the server and adds it to the Servers View.
    • Adds your project to the server.
    • Starts the server. (This may take time depending on the server settings.)
    • If the Automatically publish before starting servers check box on the Server preferences page (Window > Preferences > Server) is selected, the server tools check to see if your project and files on the server are synchronized. If they are not, the project and the files are automatically updated on the remote machine when the server is restarted.
    • If testing enterprise beans, the server tools display the enterprise bean in the Universal Test Client.
    • If testing Web artifacts, the server tools adds the EAR project containing your Web project to the server. And display the file in the Web Browser.
  8. For testing EJB projects, you can now test your beans in the Universal Test Client.
Related concepts
Application testing and publishing
Which test server will start
When the test server requires restarting
The WebSphere test environment
Related tasks
Managing servers
Related reference
CHKW2503E error when running Web project in the WebSphere v5.1 test environment
Servers view

Related information

Creating a server

1 For WebSphere® Application Server Toolkit and IBM® Rational® Web Developer, tooling support for development of EJB projects is not available. However, you can import EJB projects into the development environment as binary (compiled) projects.
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.