code: public boolean setPassword(final String _name,
                                 final String _newpasswd,
                                 final String _oldpasswd)
          throws LoginException
      {
          boolean ret = false;
  
          final LoginContext login = new LoginContext(
                  this.application,
                  new SetPasswordCallbackHandler(ActionCallback.Mode.SET_PASSWORD, _name, _newpasswd, _oldpasswd));
          login.login();
          ret = true;
          return ret;
      }
docs: Set the password.
  @param _name         Username
  @param _newpasswd    new passowrd
  @param _oldpasswd    old passowrd
  @return true if successful
  @throws LoginException on error