|
|
|
|
Testing artifacts on a server
You can use the workbench to test one or
more application artifacts on a server.
-
In the Project Explorer view from the Java EE
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 bean.
-
Select Run As > 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 Java EE specification
level you defined for the artifact and the supported servers on this workbench.
-
(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 this is the first time you are creating the server
on the workspace and if the server generates server configuration files, the
workbench creates a server project with Servers as
the default name to hold the generated server configuration files.
-
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 ()
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.
|
|
|