I am trying to send an error message from back bean class to view but it shows for a second and then went away. I don't know the reason please let me know what I am doing wrong. For scope, I am using ManagedBean and RequestScoped
String msg = "Without 'Sample Id/Experiment Id' Keys file cannot proceed";
FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, ""));
In my view, I am trying to get these error and these containers
<rich:messages globalOnly="true" />
<rich:messages for="gv" />
It shows these messages but doesn't stay there and vanish. Thank you in advance