Probably you are forwarding the request outside the FacesServlet, so that the raw xhtml is being copied back directly instead of being digested and used by FacesServlet to construct the View.
You'll probably be more successful if you use a ServletListener to do your routing to the login rather than attempt to do it in JSF code. Plus, it will be more secure that way.
An IDE is no substitute for an Intelligent Developer.
posted 3 years ago
As I said in my post when I remove the code it generates p:messages and there is no redirect to main page, but without removing the code then it doesn't generate p:messages but redirects to main page,
Can you give me sample of how to use ServletListener from a web site ?
He was expelled for perverse baking experiments. This tiny ad is a model student: