Olá
to tomando um pau pra resolver um erro q deve ser minimo , mais nao to vendo
erro:
javax.servlet.ServletException: #{ControllerUsuario.fazNada}: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can’t instantiate class: ‘controller.ControllerUsuario’… controller.ControllerUsuario
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<body>
<f:view>
<h:form id="loginForm">
<h:commandButton id="login" action="#{ControllerUsuario.fazNada}"
value="Testar" />
</h:form>
</f:view>
</body>
package controller;
import model.Usuario;
/**
* @author christianes
*
*/
public class ControllerUsuario {
private Usuario usuario;
public Usuario getUsuario() {
return usuario;
}
public void setUsuario(Usuario usuario) {
this.usuario = usuario;
}
public ControllerUsuario(){
System.out.println("Bean Controller Usuario criado!");
}
public String fazNada(){
this.usuario.setNome("Christiane");
System.out.println("testando...");
System.out.println(usuario.getNome());
return "sucesso";
}
}
<faces-config>
<managed-bean>
<managed-bean-name>ControllerUsuario</managed-bean-name>
<managed-bean-class>
controller.ControllerUsuario
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/commons/login.jsp</from-view-id>
<navigation-case>
<from-outcome>sucesso</from-outcome>
<to-view-id>
/pages/commons/login.jsp
</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>falha</from-outcome>
<to-view-id>
/pages/acesso/principal.jsp
</to-view-id>
</navigation-case>
</navigation-rule>
alguem poderia me ajudar?
Obrigada