My Oracle Support Banner

Redirect to a Specific Error Page Based on the Exception Type (Doc ID 1051869.1)

Last updated on FEBRUARY 01, 2024

Applies to:

Oracle WebLogic Server - Version 9.2 and later
Information in this document applies to any platform.

Goal

How can we redirect to a specific error page based on the exception type in a custom Identity Asserter? For example, we developed a custom identity asserter with the implementation of the method CallbackHandler.assertIdentity(String type, Object token, ContextHandler handler) throws IdentityAssertionException and in some specific conditions it is throwing an exception of the type 'IdentityAssertionException.' We tried to redirect this exception to our specified error page by adding the following to web.xml:

The intention is that whenever an exception of type weblogic.security.spi.IdentityAssertionException is encountered, it should be redirected to /error.jsp to display the proper message to the user.

But this approach of mapping a specific error message to an error page did not work as expected, instead getting Error-401 Unauthorized. So, how can we redirect to a specific error page based on the exception type?

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.