ActionMessages errors = new ActionMessages();
ActionForward forward = new ActionForward();
MortgageBean formBean = (MortgageBean) form;
MortgageData mortgage = null;
String monthlyInstallment = null;
String propertyValueStr = ((MortgageAppBean)request.getSession().
getAttribute("appBean")).getPropertyValue();
double propertyValue = 0;
int downpayPercent = 0;
try {
propertyValue = Double.parseDouble(propertyValueStr.trim());
mortgage = formBean.getMortgage();
String downpayPercentStr = mortgage.getPercent();
downpayPercentStr = downpayPercentStr.replaceAll(" ", "");
downpayPercent = Integer.parseInt(downpayPercentStr);
monthlyInstallment = getMortgagePayment(mortgage,
propertyValue);