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:

    OptionDescription
    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. Depending on the artifact you are running and the available servers for this products2, the following is a list of servers that might be available under Select the server that you want to use list. For details on how to create one of these servers follow the links in these topics.

  6. 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.

  7. For testing EJB projects, you can now test your beans in the Universal Test Client.

 

Parent topic

Testing applications on a server

 

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
Adding MIME type mappings to a server
Enabling URL rewriting or cookies on 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.

2 WebSphere Application Server v5.x test environments and