@Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setCharacterEncoding("UTF-8"); Author author = new Author(req.getParameter("author_name")); AuthorManager authorManager = Managers.getAuthorManager(); try { authorManager.saveNewAuthor(author); } catch (DuplicateException e) { status = notOk; } resp.sendRedirect(status); }