protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		String username=request.getParameter("username");
		String password=request.getParameter("password");

		System.out.println(username+" "+password);
		try{
		Connection con=DBConnection.getConnection();
		if(con==null)
			System.out.println("con is null");
		Statement stmt=con.createStatement();
		
		ResultSet rs=stmt.executeQuery("select loginid,role,changepwd,accesslevel from login where username='" +username+"' and password='"+password+"'");
		
		if(rs.next()){
			HttpSession session=request.getSession();
			//session.setMaxInactiveInterval(180);
	
			session.setAttribute("userid",rs.getString(1));
			session.setAttribute("name",username);
			session.setAttribute("role",rs.getString(2));
			session.setAttribute("accesslevel",rs.getString(4));
			if(rs.getInt(3)==1){
				//response.sendRedirect("Other/ChangePassword.jsp");
				RequestDispatcher rd=request.getRequestDispatcher("Other/ChangePassword.jsp");
				rd.include(request, response);
				response.getWriter().println("<div class=\"left\"><font color='red'>Your Password Expired Change Immediately</font></div>");
			}
			else
				response.sendRedirect("WelcomeJSP/"+rs.getString(2)+".jsp");
			System.out.println(rs.getString(1));
		}
		else{
			System.out.println("Login Mismatch");
			RequestDispatcher rd=request.getRequestDispatcher("/WelcomeJSP/Login.jsp");
			rd.include(request, response);
			response.getWriter().println("<font color='red'>Login Failed Check USERNAME/PASSWORD</font>");
			
			
		}
		con.close();
		}catch(SQLException ex){
			ex.printStackTrace();
		}
	}