@SuppressWarnings("unchecked")
	public String addCartItem() throws Exception {
		Map session = ActionContext.getContext().getSession();
		
		orderDetails = (List<OrderDetail>)session.get("orderDetails");
		
		if(orderDetails == null) {
			orderDetails = new ArrayList<OrderDetail>();
		}
		
		Book book = bookManager.getBookById(bookId);
		if(book != null) {
			
			boolean isExistTheBook = false;
			
			for(OrderDetail orderDetail:orderDetails) {
				if(book.getBookId().equals(orderDetail.getBookId())) {
					orderDetail.setCount(orderDetail.getCount() + 1);
					isExistTheBook = true;
					break;
				}
			}
			
			if(!isExistTheBook){
				OrderDetail orderDetail = new OrderDetail();
				orderDetail.setBookId(bookId);
				orderDetail.setBookName(book.getBookName());
				orderDetail.setCount(1);
				orderDetail.setPrice(book.getPrice());
				orderDetail.setRebate(book.getRebate());
				orderDetails.add(orderDetail);			
			}

		}
		
		session.put("orderDetails", orderDetails);
		
		return SUCCESS;
	}