private void updateBookUI(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); Book b = bs.findBookById(Integer.parseInt(id)); List<Category> list = bs.getAllCategories(); request.setAttribute("b", b); request.setAttribute("list", list); request.getRequestDispatcher("/WEB-INF/jsp/updatebook.jsp").forward(request, response); }
private void addBookUI(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Category> list = bs.getAllCategories(); request.setAttribute("list", list); request.getRequestDispatcher("/WEB-INF/jsp/addbook.jsp").forward(request, response); }