This directory contains the files that implement the example in "Section 4.2: A 'thick-client' banking example." This application was implemented using the Apache Tomcat JSP-container and the MySQL relational database. This application accesses a database called "accounts" containing the single table "accounts". The table used for testing purposes is as follows: mysql> describe accounts; +--------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+-------------+------+-----+---------+-------+ | account_id | int(11) | | PRI | 0 | | | user_id | int(11) | YES | | NULL | | | account_name | varchar(32) | YES | | NULL | | | balance | int(11) | YES | | NULL | | +--------------+-------------+------+-----+---------+-------+ 4 rows in set (0.00 sec) mysql> select * from accoutns; ERROR 1146: Table 'accounts.accoutns' doesn't exist mysql> select * from accounts; +------------+---------+--------------+---------+ | account_id | user_id | account_name | balance | +------------+---------+--------------+---------+ | 1 | 1 | checking | 2505 | | 2 | 1 | savings | 1042405 | | 3 | 2 | checking | 5322 | | 4 | 3 | checking | 1513 | | 5 | 3 | savings | 824580 | | 6 | 3 | money-market | 1042325 | +------------+---------+--------------+---------+ 6 rows in set (0.00 sec) Files: ------ * BankingApp.jsp - The first VoiceXML page to be visited in this application. Note: There is nothing dynamic about this page. The .jsp extension is simply a way to prevent caching this document. * login.jsp - A JSP that accepts HTTP-parameters "bankingCardNumber" and "pin". If values can be authenticated, this sets a cookie to be used by subsequent VoiceXML page requests during this session. Produces a trivial VoiceXML subdialog (i.e. does nothing in VoiceXML). * getAccounts.jsp - A JSP that checks the cookie set by login.jsp, and produces an ECMAScript response defining objects that represent the caller's bank account information. * transferFunds.jsp - A JSP that implements the transfer of money from one account to another. This JSP is meant to be called from a VoiceXML document. * TransferFundsDialog.jsp - A VoiceXML document that defines the user-interface for the "transfer funds" process. Note: There is nothing dynamic about this JSP. The JSP extension is used to prevent this document from being cached. * CheckBalance.jsp - A VoiceXML document that defines the user-interface for the "check balance" process. Note: There is nothing dynamic about this JSP. The JSP extension is used to prevent this document from being cached. * getMenuGrammar.jsp - A JSP that dynamically generates a grammar to recognize the caller's bank-account names. This is generated dynamically based on the cookie set by login.jsp. * BankSchema.js - A static EcmaScript file that defines some objects and variable used throughout the application. BankingService Files - ---------------------- The following are Java source files for the example objects used to implement the banking business objects. For a minimal deployment, these need to be compiled into .class files (e.g. using javac) then copied into this web-application's WEB-INF/classes/com/banking directory. * Account.java - A Java class used to represent a bank account. * BankingException.java - An exception thrown when a banking transaction goes awry. * BankService.java - A class that implements banking operations like retrieving account information, transfer funds, etc.