public void comAccount(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
String b = req.getParameter("balance");
NewCustomer customer = new NewCustomer();
DAOFactory daoFactory = DAOFactory.getDAOFactory(DAOFactory.ORACLE);
NewCustomerDAO newcustomerDao = daoFactory.getCustomerDAO();
newcustomerDao.heZhangJiSuan(customer);
String a = customer.getBalance();
System.out.println("a=="+a);
java.util.Vector error = new java.util.Vector();
int x,y;
x = Integer.parseInt(b); [color=red]//程序执行到这里报异常
//java.lang.NumberFormatException: For input string: "200.00"[/color] y = Integer.parseInt(a);
if( x>y )
{
int c = x - y;
error.add("已扣除费用"+c+"RMB");
req.setAttribute("errorss", error);
}else{
error.add("账户余额不足,请充值!");
req.setAttribute("errors", error);
}
String address = "/page/comAccount.jsp";
req.getRequestDispatcher(address).forward(req, resp);
}