There is a page with a login form, after filling the correct pair login-password go to the main page of the website, and display an informational message that the authorization was successful. It should be noted that the transition to the main page redirect is happening in a query (how to redirect
it does not matter).
The message is placed in
FacesContext facesContext = FacesContext.getCurrentInstance(); FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_INFO, message, null); facesContext.addMessage(null, facesMessage);
is that after redirect
shows an information message. At the same time, if the redirection is not done, but limited to one POST request, then an informational message is displayed.
Tried to activate
but this mechanism helps to display the message only on the current page, even if we will return later, but on another page (another url)
can't get the message.
Accordingly, the question
is how to display an informational message after redirect?
Maybe somewhere, you need to specify the correct scope for
?The project to spin on Glassfish 3, Java EE 6, JSF 2.