protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {

		String author = request.getParameter("author");
		String title = request.getParameter("title");
		String numberPage = request.getParameter("numberPage");
		String imprintDate = request.getParameter("imprintDate");
		String price = request.getParameter("price");
		String rating = request.getParameter("rating");
		String discounts = request.getParameter("discounts");
		String status = request.getParameter("status");

		if (!author.isEmpty() && !title.isEmpty()) {

			IBookDAO bookDAO = new BookDAO();
			Book book = new BookEntity();
			book.setAuthor(author);

			if (discounts != "") {
				book.setDiscounts(Integer.parseInt(discounts));
			}
			if (price != "") {
				book.setPrice(Integer.parseInt(price));
			}
			if (rating != "") {
				book.setRating(Integer.parseInt(rating));
			}
			if (status != "") {
				book.setStatus(Boolean.valueOf(status));
			}
			if (numberPage != "") {
				book.setNumberPage(Integer.parseInt(numberPage));
			}
			if (imprintDate != "") {
				SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");

				try {
					book.setImprintDate(dateFormat.parse(imprintDate));
				} catch (ParseException e) {
					e.printStackTrace();
				}
			}
			bookDAO.save(book);

			RequestDispatcher requestDispatcher = request
					.getRequestDispatcher(SUCCESS_PAGE);
			requestDispatcher.forward(request, response);

		} else {
			RequestDispatcher requestDispatcher = request
					.getRequestDispatcher(BOOK_SAVE_PAGE);
			requestDispatcher.forward(request, response);
		}
	}