Boa tarde pessoal, estou tentando chamar outra pagina com o comando action do jsf, porém a outra pagina não abre.
segue o meu código:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:p="http://primefaces.org/ui">
<h:body> <h:form> <h:commandButton value="Ir para proxima pagina" action="#{estudanteRegistrarBean.irParaIndex2()}" /> </h:form> </h:body> </html>
e aqui a minha classe:
@Named
public class EstudanteRegistrarBean implements Serializable {
public String irParaIndex2() {
System.out.println(“entrou”);
return “index2”;
}
}
eu coloquei um System.out.println para ver no console se ele estava chamando a classe, e está, mas nao está abrindo a index2