public String saveBranchMaster( String schoolID, String sname, String shortName, String address, String city, String country, String br_state, String br_cperson, String bemail, String br_mobile, String br_landline, String isactive) { BranchMasterDAO bMasterDao = null; try { bMasterDao = (BranchMasterDAO) ServiceFinder.getContext(request).getBean("BranchMasterHibernateDao"); BranchMaster br = new BranchMaster(); System.out.println(isactive + "--isactive"); isactive = isactive.equalsIgnoreCase("true") ? "Y" : "N"; br.setActive(isactive); br.setLandline(br_landline); br.setMobile(br_mobile); br.setStateId(Long.parseLong(br_state)); br.setImId((String) session.getAttribute("IM_ID")); br.setSmId(Long.parseLong(schoolID)); br.setBranchName(sname); br.setShortName(shortName); br.setAddress(address); br.setCity(city); br.setStateId(new Long(br_state)); br.setContactPerson(br_cperson); br.setEmailId(bemail); bMasterDao.save(br); return "saved"; } catch (BeansException e) { // TODO Auto-generated catch block e.printStackTrace(); return "error"; } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); return "error"; } }