Testing artifacts on a server

You can use the workbench to test one or more application artifacts on a server.

About this task

To test artifacts on a server:

Procedure

  1. In the Enterprise Explorer view from the Java™ EE 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 bean.
  3. Select Run As > 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 Java EE specification level you defined for the artifact and the supported servers on this workbench.
  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:
    • 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 when starting servers check box on the Server preferences page (Window > Preferences > Server > Launching) is selected, the workbench checks to see if your project and files on the server are synchronized. If they are not, the project and the files are automatically updated when the server is restarted.
    • Depending on the artifact you are testing, the output of running your artifact may display in the Console view or in a Web browser that automatically opens.
    • If you are testing enterprise beans, the workbench displays the enterprise bean in the Universal Test Client. For more details on testing using the Universal Test Client. Refer to the Testing enterprise beans in the universal test client link on the bottom of this page.

Feedback