Redirecting users to a particular URL upon successful or failed authentication can be configured in a number of ways.
To set the redirection URL globally or per realm, see Configuring the Core Authentication Service.
To set the redirection URL as a login URL parameter, see Accessing the Authentication Service User Interface with a Login URL.
To set the redirection URL for a specific user, see Chapter 5, Creating Subjects.
Information on how the precedence of redirection URLs is determined is in Initiating the Authentication Type.