@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String user_name = request.getParameter("user_name");
String password = request.getParameter("password");
System.out.println(user_name+" "+password);
Cookie unCk = null;
boolean isCredRight = User_CRUD.isCredRight(user_name,password);
HttpSession session = request.getSession(true);
RequestDispatcher rd= null;
if (isCredRight) {
unCk = new Cookie("username",user_name);
response.addCookie(unCk);
response.sendRedirect("PMT_Welcome_Admin.jsp");
} else {
request.setAttribute("credError","<font color='red'>Invalid Username or Password</font>");
rd = request.getRequestDispatcher("PMT_Login_Admin.jsp");
rd.forward(request, response);
}
}