Preserve passwords after validation errors

By default, Struts2 does not fill in password fields after validation errors occur. The solution isn't very obvious. You have to add two attributes, value and showPassword:

    <s:password name="password" value="%{password}" showPassword="true"/>

Reference this JIRA ticket:

Struts2PreservePasswords (last edited 2008-07-09 06:22:01 by localhost)