Use the J2EE Preview server when you want to quickly
compile, test and run resources in a J2EE Web project. The J2EE Web projects
you can test on a J2EE Preview server are static Web projects, dynamic Web
projects and utility projects. Hereafter, the term J2EE Web project refers
to any of these previously mentioned projects.
About this task
The J2EE Preview server is an embedded application server
that is integrated with the workbench. It is intended for preliminary testing
and saves you the time to download, install, and set up an application server.
However, as your J2EE Web project progresses through its development cycle
you are encourage to test and run on an external application server. You
can use the J2EE Preview server as a convenient way to check for errors before
you do a final test on an external application server.
To create and test
on a J2EE Preview server for previewing your resources in a J2EE Web project,
complete the following steps:
Procedure
- In the Servers view, right-click and select New > Server.
The Define a New Server wizard opens.
- Under the Select the server type list, expand
the Basic folder and select J2EE Preview. Click Next.
- The Add and Remove page opens. Under the
Available projects list, select the J2EE Web project and click the Add button.
Click Finish. The J2EE Preview server is
created in the Servers view.
- In the Project Explorer view, navigate to your J2EE Web project
and right-click your resource you want to test.
- Select . The Run on Server wizard opens.
- Verify the Choose an existing server radio
button is enabled.
- Under the Select the server that you want to use list,
select the recently created J2EE Preview server. Click Next.
- The Add and Remove page opens. Verify the
J2EE Web project you are testing is listed under the Configured
projects. Click Finish.
Results
The internal Web browser opens and displays the Web content.