@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String personId = request.getParameter("id");
PersonManager personManager = SessionUtil.getInstance().getPersonManager();
Person person = personManager.getPerson(personId);
if (person != null) {
person.setNames(request.getParameter("names"));
person.setTown(request.getParameter("town"));
person.setSchool(request.getParameter("school"));
person.setSchoolYear(Integer.parseInt(request.getParameter("schoolYear")));
personManager.update(person);
}
response.sendRedirect("persons");
}