When a user resets a password or changes the user ID in Service Provider, the results of the operation are displayed to the user. Instead of creating a separate JSP for each successful operation, it is desirable to have a generic OperationResult page that contains the following:
The title and subtitle of the page
The appropriate information that indicates the user’s change was successfully applied to the directory
The page (URL) should the user go to after acknowledging the “success” message.
The title and subtitle strings are inserted into the page $WSHOME/spe/user/OperationResult.jsp . We would also like to be able to pass a key from the tile definition to look up the appropriate action forward for the user’s final destination.
<put name="forward_id" value="ResetPasswordSuccess" />
When the .page.ResetPasswordSuccess tile is rendered, the forward_id parameter is added to the form as a hidden field with name dispatch.
When the user acknowledges the result by clicking the OK button, the following action is executed:
<!-- Set action forward mapping to final destination forward --> <action path="/spe/user/OperationResult" name="resultForm" type="com.sun.idm.idmx.web.RelayAction" scope="request" validate="false"> <forward name="ForgotUsernameSuccess" path="/spe/user/Login.do?newView=true" redirect="true"/> <forward name="PasswordEmailed" path="/spe/user/Login.do?newView=true" redirect="true"/> <forward name="ResetPasswordSuccess" path="/spe/user/Login.do?newView=true" redirect="true"/> <forward name="ProfileLocked" path="/spe/user/Login.do?newView=true" redirect="true"/> <forward name="ProfileHasBeenLocked" path="/spe/user/Login.do?newView=true" redirect="true"/> <forward name="EnrollSuccess" path="/spe/user/Login.do?newView=true" redirect="true"/> </action>
The com.sun.idm.idmx.web.RelayAction class looks up the dispatch request parameter value in the above definition and forwards to the associated URI. In our case, ResetPasswordSuccess maps to the URI ”/.m”/spe/user/Login.do?newView=true”.