public String updatePosting(){
		System.out.println("Id in update="+Id);
		System.out.println("type in update="+type);
		
		String resource = "orm/configuration.xml";
		Reader reader = null;
		try {
			reader = Resources.getResourceAsReader(resource);
		} catch (IOException e) {
			e.printStackTrace();
		}
		SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);
		SqlSession session = sessionFactory.openSession();
		
		try{
			
			if(type.equals("whole")){
				listofPosting=session.selectList("selectwholepostingById",Id);

			}else if(type.equals("share")){
				listofPosting=session.selectList("selectsharedpostingById",Id);

			}else{
				listofPosting=session.selectList("selectsubletpostingById",Id);

			}
			posting=listofPosting.get(0);
			System.out.println(posting.getApt());
			laundry=posting.getLaundry();
			sqft=posting.getSqft();
			rent=posting.getRent();
			phone_contact=posting.getPhone_contact();
			phone_contact_type=posting.getPhone_contact_type();
			email_contact=posting.getEmail_contact();
			available_date=posting.getAvailable_date();
			end_date=posting.getEnd_date();
			rooms=posting.getRooms();
			baths=posting.getBaths();
			type=posting.getType();
			parking=posting.getParking();
			cats=posting.getCats();
			dogs=posting.getDogs();
			smoking=posting.getSmoking();
			street=posting.getStreet();
			apt=posting.getApt();
			description=posting.getDescription();
			city=posting.getCity();
			state=posting.getState();
			continuelease=posting.getContinuelease();
			img1=posting.getImg1();
			img2=posting.getImg2();
			email_poster=posting.getEmail_poster();
			create_time=posting.getCreate_time();
			ActionContext.getContext().getSession().put("updatedpostingtype", type);
			ActionContext.getContext().getSession().put("updatedpostingid",Id );
			System.out.println("type="+type);
			System.out.println("dogs="+dogs);
			System.out.println("laundry="+laundry);
			System.out.println("parking="+parking);
			
			
		/*	if(type.equals("whole")){
				
				
			}else if(type.equals("share")){
				
			}else{
				
			}*/
			
			return "updatedok";
		}finally{
			session.close();
		}
		
		
	}