Testing on a Web Preview Server
Use the Web Preview Server when you want to compile, test, and run resources quickly in an Ajax application. For example, you can test a Dojo-enabled web project on a Web Preview Server.
Before you begin
About this task
You can use the Web Preview Server as a convenient way to check for errors before you do a final test on an external application server. The server supports incremental publishing and hot deployment. You can change existing artifacts or add new artifacts to a running server without stopping and restarting the application server. If you change the Java™ source files in a referenced project, the server automatically restarts and loads the changes.
A Web Preview Server is automatically created for you when you open a new or existing workspace. If you want to create a Web Preview Server for previewing your resources in a web project, complete the following steps:
Procedure
- In the Servers view, right-click and select New > Server.
- Under the Select the server type list, expand the IBM folder and select Web Preview Server. Click Next.
- In the Add and Remove page, under the Available projects list, select the web project and click Add. Click Finish. The Web Preview Server is created in the Servers view.
- In the Project Explorer view, navigate to your web project and right-click your resource you want to test.
- Select .
- In the Run on Server wizard, verify that Choose an existing server is selected.
- Under the Select the server that you want to use list, select the recently created Web Preview Server. Click Next.
- The Add and Remove page opens. Verify the web project that you are testing is listed under the Configured list. Click Finish.
Results
The resources in the web project you are testing must be located under the directory that serves as the context root of the project.