When you are ready to publish your Web application, you will need
a server that will host it so users can access the Web site through the Internet;
however, to test your Web site, you can use a test environment.
In this lesson, you will run a JSP in a test environment to simulate
what a page will look like when it is actually published. You will also learn
how to start and stop a server. At any time during your Web site development,
you can open a page in Page Designer and use the
Preview tab
to see how your design will look in a browser. However, the Preview view does
not allow you to see the dynamic aspects of your page (such as database connections)
as they would display running from a server.
Tip: Once you have
started the server, you must stop it before you can continue working with
the site.
To test the Web site on a server:
- In the Enterprise Explorer view, right-click all_records.jsp file,
then select click . The Run On Server window
opens.
- You must use the same server as the one you chose to be the target
server in Lesson 1.1. Using a different server in this step will create errors.
- If you want to test the Web site on a previously defined server configuration:
- Select Choose an existing server.
- Select the server that you want to use from the list available.
- If you want to test the Web site on a new server configuration:
- Select Manually define a new server.
- Select the server type that you want to use from the list available.
- Click Finish.
The server tools create the new server, start it, and open the
page in the workbench internal Web browser. This may take a moment. In the
Console view, you can watch the messages as the server tools start the server.
Once
this process is complete, you can preview how the site will look and work
once it is actually published to a Web server. Click the links, enter data
in the forms, and see any dynamically generated content in the site that may
not appear in Preview view. Also, if you wish to see your page in different
Web browsers, you can copy the URL from the workbench Web browser into the
browser of your choice.
You must stop the server before you can continue with the tutorial.
If you leave the server running, you will see error messages when you continue
with the tutorial. These errors appear because the server is connected to
the sample database, preventing you from connecting to the database to change
the information shown on the Web site.
To stop the server:
- Open the Servers view. This view is usually located at the bottom center
of the workbench. If you are not able to find the Servers view, click from the main menu.
- Select the server that you want to stop. Notice that the server status
is listed as Started.
- Click the Stop the server button
at the top right of the Servers view. The server Status changes
to Stopping. You will see messages in the Console view while the server
shuts down. When the server Status in the Servers view changes to Stopped,
the server is stopped and you can continue working on the Web site.
Tip: You can test your Web site on the server at any time,
but remember to stop the server when you are finished.