JSF Chrome Save Password on Login form

怎甘沉沦 提交于 2019-12-22 10:39:28

问题


How do I get my JSF login page to prompt Chrome to save password?

    <h:form id="login-form" class="form login-form">

                <h:outputLabel for="j_username" value="Email:" />
                <p:inputText value="#{loginBean.j_username}" id="j_username"
                    required="true">
                </p:inputText>

                <h:outputLabel for="j_password" value="Password:" />
                <h:inputSecret value="#{loginBean.j_password}" id="j_password"
                    required="true">

            <p:commandButton id="loginButton"
                value="Login"  action="#{loginBean.login}" />

        </h:form>

回答1:


Turn off ajax by ajax="false" on the <p:commandButton>. For security reasons, Chrome won't save passwords of ajax login forms.

If that also doesn't help, then go to Settings > Show advanced settings > Manage saved passwords (or go to chrome://settings/passwords in Chrome) and scroll to the very bottom of the list to see if the site in question isn't accidently covered by "Never saved" list.



来源:https://stackoverflow.com/questions/16604099/jsf-chrome-save-password-on-login-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!