protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		String nom = "";
		
		String password = "";
		
		if (request.getParameter("user") != null){
		
		nom = request.getParameter("user");
		}
		if (request.getParameter("password") != null){
		
		password = request.getParameter("password");
		
		}
		
			AlumneDao alum = new AlumneDao();
		
			if(alum.buscarAlumne(nom)!=null){
				
				AlumneVo a=alum.buscarAlumne(nom);
				
				HttpSession sesionOk = request.getSession();
				
				sesionOk.setAttribute("nom",a.getNomUser());
				
			
				
				response.sendRedirect("pagUsuari.jsp?ID="+a.getNomUser());
			}
			else{
				response.sendRedirect("index.jsp");
				
			}
	}