I am trying to use the new Java EE 8 security.
It is working if I don't use JSF in the login page. If I use JSF, nothing is displayed because the form is inside a <h:form> tag (a JSF tag). The EL expressions of the page outside of the form are displayed "#{bean.property}" and not with the value of the property.
If I type directly the URL of the login page in the browser, the page is correctly displayed. It is not displayed correctly if the page is displayed when I try to access a protected page.
I tried with Chrome and Firefox. I had to add an exception because of the "https" added by Java EE for the URL of the login page. Is it the problem?
The application uses Payara 5.182.
The code of the page:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="/formations/templateBase.xhtml">
<ui:define name="title">
<h:outputText value="#{bundle.Login_Titre}"></h:outputText>
</ui:define>
<ui:define name="content">
#{'HELLO!'} <!-- JUST TO TEST -->
<h:form id="form">
<p><h:outputText value="#{bundle.Login_Message}"/></p>
<h:outputText value="#{bundle.identifiant}"/>
<h:inputText id="login" value="#{loginBean.name}"/>
<h:outputText value="#{bundle.password}"/>
<h:inputSecret id="password"
value="#{loginBean.password}"/>
<p><h:commandButton value="#{bundle.Login_Login}" action="#{loginBean.login}"/></p>
</h:form>
</ui:define>
</ui:composition>
</html>