Security restrictions protect the URL pattern, but in this case, because of the setup of the welcome file, your default URL will change to something like http: //: port / webcontext / and welcome.xhtml. If, according to the URL pattern, the secure URL must have a URL, for example, http: //: port / webcontext / GISPages / welcome.xhtml Since the URL pattern does not match the application server, display the contents of the page.
The only solution that worked for me is to check UserPrincipal in the prerender event
<f:event type="preRenderComponent" listener="#{bean.forwardToLoginIfNotLoggedIn}" />
and redirect to login.xhtml if UserPrincipal returns null.
Sorry for opening the old thread. I recently ran into a similar problem, so I thought it might be useful for some.
source share