understand new concepts or capabilities of JavaServer Pages to implement the remaining features. Before you delve into the code, let s take a look at the structure of the database that contains the customer, portfolio, and security information used by the application. The Application Data Defined The database for our application consists of four tables. Even though you don t need all four tables to implement the three features mentioned in the previous section, you can describe the tables to provide a more complete view of the application. The four tables containing the data are described below. . CustomerInfo: Contains the usual customer information (name, address, credit card info, and so on), an account ID (primary key), and a password. The customer must supply the correct password to gain access to the application. . CustomerPortfolio: Contains an account ID (primary key), a stock ticker symbol, and a number representing how much of this security the customer holds. . SecurityInfo: Contains a stock ticker symbol, a trade date, and the selling price of the security on the trade date. This table uses a compound key consisting of the stock ticker symbol and the trade date. . TransactionHistory: Contains an account ID, a transaction date and type, a stock ticker symbol, and the number of shares traded on the transaction date. This table uses a compound key of the account ID, transaction date, stock ticker symbol, and the transaction type (buy or sell). The preceding four tables have primary and foreign key relationships to ensure referential and data integrity. For sake of simplicity, the JSP and Java code in this sample application does not have code to capture errors arising from referential integrity constraint violations. The Client Scenario With the application data described, we can now look at a common client scenario. The application will allow a client to proceed through the following steps: 1. The client requests access to the application by entering an account ID and a password. 2. Once the application receives a matching account ID and password combination, the application displays a list of choices. 3. The client requests a listing of his or her transaction history; the application displays the list. Without further delay, let s look at the implementation of this scenario in the Make Money application. Logging on to the Make Money Application The customer enters a URL that identifies the JSP that handles the interactions necessary to grant access to the client. Figure 10-1 shows the client logon screen.
Hosting services offered by our company comes with free domain name if you pay at yearly basis. Find out more at New Orleans Web Hosting services.