try {
String username = request.getParameter("txtUsername");
String password = request.getParameter("txtPassword");
EntityManagerFactory emf = Persistence.createEntityManagerFactory("SisInfPengambilanCutiPU");
EntityManager em = emf.createEntityManager();
Tbladmin loginAdmin = new Tbladmin();
loginAdmin.setUsername(username);
loginAdmin.setPassword(password);
AdminDAO adminDao = new AdminDAOImpl(em);
if (adminDao.loginAdmin(loginAdmin)) {
//LOGIN AS ADMIN
HttpSession session = request.getSession(true);
session.setAttribute("loginAdmin", "Administrator");