In Below code i am displaying message by throwing an Exception but my requirement is displaying the same message but without throwing that exception.Is there any other way to display the message in visual web JSF page without throwing exception.
public void uname_validate(FacesContext context, UIComponent component, Object value)
{
if(true)
{
throw new ValidatorException(new FacesMessage("Hello");
}
}