Execute the product arrangement sample program by performing the following procedure.
- Enter the following URL into the browser:
http://localhost/ArrangementClientWeb/index.html
The HelloProductArrangement sample program is started.
- Select the product name and quantity.
![[Figure]](figure/zs991500.gif)
- Click the Arrangement button.
The following is displayed:
- Normal response (arrangement completed)
- A message indicating that arrangement is completed appears. The product name, quantity, and delivery number are also displayed.
![[Figure]](figure/zs991600.gif)
- Normal response (out of stock)
- A message indicating that there is no stock appears. The product name and quantity are also displayed.
![[Figure]](figure/zs991700.gif)
- If an error occurred
- Details about the error are displayed.
![[Figure]](figure/zs991800.gif)
- How to reset the quantity of product stock to the initial value
- For the HelloProductArrangement sample program, the total quantity of stock for each product is 10. If arrangements are completed, the quantity is reduced for the number of products arranged. If there is no stock, restart the server or redeploy the J2EE project. The quantity of stock returns to 10. The following describes how to restart the server and how to redeploy the J2EE project.
- How to restart the server
- From the Eclipse menu, select Window, Open Perspective, and then Other.
The Open Perspective dialog box appears.
- Select Java EE (default), and then click OK.
The Java EE perspective appears.
- In the Servers view, right-click MyServer at localhost, and then select Restart.
- How to redeploy the J2EE project
- From the Eclipse menu, select Window, Open Perspective, and then Other.
The Open Perspective dialog box appears.
- Select Java EE (default), and then click OK.
The Java EE perspective appears.
- In the Servers view, right-click MyServer at localhost, and then select Add and Remove.
The Add and Remove dialog box appears.
Undeploy the J2EE project, and then deploy it again. For details about undeployment, see 6.1.1(1) Undeploying web projects. For details about deployment, see 3.5.6 Deploying the web project.