String newPassword = personForm.getNewPassword();
if (StringUtils.isNotEmpty(newPassword)) {
LoginModule loginModule = AuthenticatorImpl.getLoginModule(request);
if (loginModule != null) {
try {
loginModule.changePassword(personForm.getUserId(), personForm.getNewPassword());
} catch (AuthenticationException e) {
throw new ServletException(e);
}
}
}