Account Transaction
request.getParameter("command")
TellerAccessor teller = new TellerAccessor();
int accountId = Integer.parseInt(request.getParameter("id"));
double amount = new Double(request.getParameter("amount")).doubleValue();
String command = request.getParameter("command");
try {
if (command.equals("Deposit")) {
teller.deposit(accountId, amount);
}
else {
teller.withdraw(accountId, amount);
}
}
catch (BankException ex) {
out.println(ex.toString());
}
Account account = teller.getAccount(accountId);
id=account.getId()
balance=account.getBalance()
home