Configuring the shopping cart project takes approximately
20 minutes.
Before you begin
Prerequisites are as follows:
- Your product installation includes Tools for WebSphere® Application Server.
- You installed the equivalent level of the application server.
About this task
This sample uses a Derby database that is accessed from an
Enterprise Application Resource (EAR) project. You can download the
sample and database only if you are running the help locally and not
from a public web site.
Procedure
- Import the sample project into your workspace by clicking
the Get the Sample link on the EGL shopping cart page.
- Download the shopping-cart database and extract it to a
folder on your computer. Later steps assume that you place the database
in C:\databases. You can get the
database in the following way, but only if you are viewing this page
in your product help system and not in an Information Center on the
web:
- Click the following link and download the file to C:\databases:
Sample
database
- Right-click the RedBookP1 project
and select Properties. The Properties for RedBookP1
pane is displayed.
- Click EGL Runtime Data Source ,
select Load values from a data tools connection,
and click New. The Connection Parameters page
is displayed.
- Click Derby. In the Connection
Name field, type Shopping Cart Connection.
In the Database location field, identify the
database by using the Browse mechanism or by
typing the location: C:\databases\eglredbkdb.
- For both the user name and password, type admin.
Check Save password.
- Click Finish. The Properties for
RedBookP1 page is available again.
- If you are accessing WebSphere Application
Server, do as follows:
- Click Java Build Path. The Java
Build Path pane is displayed.
- Click the Libraries tab.
- Click JRE System Library and
then click Edit. The JRE System
Library page is displayed.
- Click Alternate JRE and then
expand the list box.
- Select the appropriate JRE.
- Click Finish. The Properties
for RedBookP1 page is available again.
- Click OK.
- A message is displayed to update options in the default
build descriptor. Click Yes.
- In the Project Explorer, expand .
- Double-click the RedBookP1.eglbld build
file and inspect the values of the build descriptor options. If you
are accessing WebSphere Application
Server, do as follows:
- Click the serverType option,
click again at the right of that row, and select the appropriate entry.
- Save and close the build file.
- Generate the RedBookP1 project by right-clicking it and
then clicking Generate.
- In the Project Explorer view, expand , which is toward the
end of the project files.
- Right-click menu.jsp and then select . If a single server is already configured, click Console to
see the progress of your request. Alternatively, select an instance
of WebSphere Application Server from
a list, or create a new instance.
Results
The home page for the application opens in the internal
web browser. From here, you can browse the pages and use the sample
application. For a description of each page, look for the Help link
at the bottom of the page.