[ACCEPTED]-FacesContext.getCurrentInstance().getExternalContext().redirect does not redirect immediately-redirect
Accepted answer
Yes, simply return
from the method:
FacesContext.getCurrentInstance()
.getExternalContext().redirect("DisplayList.jsf");
return;
When you invoke 4 redirect(..)
the only thing that happens is that a special 3 header (Location
) is set in the response object. But 2 the flow of the invoking method continues, unless 1 you return
from it after you call redirect.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.