Setting the value for jsf InputSecret during page load from the managed bean

前端 未结 2 1509
野的像风
野的像风 2020-12-16 14:50

I am creating a database setting jsf page which shows the value from the properties file during the page load. The users then updates the page and press submit and the valu

相关标签:
2条回答
  • 2020-12-16 15:29

    The <h:inputSecret> indeed doesn't redisplay passwords by default due to security reasons. You can however turn it on by setting redisplay="true".

    <h:inputSecret value="#{bean.password}" redisplay="true" />
    

    See also its TLD document:

    redisplay

    Flag indicating that any existing value in this field should be rendered when the form is created. Because this is a potential security risk, password values are not displayed by default.

    0 讨论(0)
  • 2020-12-16 15:30

    Update:

    I Apologize :

    The only thing needed to add is redisplay="true" as password is not diplayed for security reason


    0 讨论(0)
提交回复
热议问题