Displaying Error Messages in JSF
Hi all,
Im new to JSF. I am not able to display the errors i got in the BackEnd bean
i added the errors in the bean like
public String validate(){
if(userName.equals(password))
return"success";
FacesContext context = FacesContext.getCurrentInstance();
context.addMessage("loginError",new FacesMessage("LoginError","UserName Password Doesnt Match"));
return"failure";
}
is there any mistake in the code?
and
in the JSP i used
<h:message id="loginError" errorClass="loginError" for="loginError" style="color: red" showSummary="true" showDetail="true"/>
how to show the errors?
please can any one help me?
waiting for reply
thanx in advance....
By
Thirupathi B

