@RequestMapping(value = "/feeSubmit.htm", method = RequestMethod.POST) public ModelAndView feeSubmission(@ModelAttribute("feeFormBeam") FeeFormBean feeFormBean) { StudentFeeBean feeBean = new StudentFeeBean(); SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); Date date = null; try { date = sdf.parse(sdf.format(new Date())); } catch (ParseException e) { e.printStackTrace(); } feeBean.setBranchCode("s002"); feeBean.setRegNo(Long.parseLong(feeFormBean.getRegNo())); feeBean.setFeeDaposited(feeFormBean.getFeeDaposited()); feeBean.setFine(feeFormBean.getFine()); feeBean.setRollno(Long.parseLong(feeFormBean.getRegNo())); feeBean.setStudentClass(feeFormBean.getStudentClass()); feeBean.setDepDate(date.toString()); objExpService.feeSubmit(feeBean); ModelAndView mv = new ModelAndView(); mv.setViewName("accountPanel"); return mv; }