protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String username = req.getParameter("username");
String password = req.getParameter("password");
YFEmployee employee = employeeService.getEmployee(username, password);
if (employee != null) {
req.getSession().setAttribute("user", employee);
if (employee.getJob().equals(YFJob.ADMINISTRATOR)) {
resp.sendRedirect(req.getContextPath() + "/administrator/index");
//} else if (employee.getJob().equals(YFJob.BARTENDER)) {
// resp.sendRedirect(req.getContextPath() + "/bartender/index");
} else if (employee.getJob().equals(YFJob.COOK)) {
resp.sendRedirect(req.getContextPath() + "/cook/index");
} else if (employee.getJob().equals(YFJob.WAITER)) {
resp.sendRedirect(req.getContextPath() + "/waiter/index");
} else {
req.getSession().invalidate();
resp.sendRedirect(req.getContextPath());
}