You can use the server tools to test one or more application artifacts
on an application server.
In the Project Explorer view from the J2EE perspective, expand
the project that contains the file you want to test.
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.
Select Run > Run on Server. The Server
selection wizard appears.
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.
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.
(Optional) Click Next to configure additional
settings, such as configuring settings specific to the server, and adding
or removing projects configured on the server.
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.
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.