# Testing on a J2EE Preview server

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.

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:

1. In the Servers view, right-click and select New > Server. The Define a New Server wizard opens.
2. Under the Select the server type list, expand the Basic folder and select J2EE Preview. Click Next.
3. 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.
4. In the Project Explorer view, navigate to your J2EE Web project and right-click your resource you want to test.
5. Select Run As > Run on Server. The Run on Server wizard opens.
6. Verify the Choose an existing server radio button is enabled.
7. Under the Select the server that you want to use list, select the recently created J2EE Preview server. Click Next.
8. The Add and Remove page opens. Verify the J2EE Web project you are testing is listed under the Configured projects. Click Finish.

The internal Web browser opens and displays the Web content.