Example usage for org.apache.wicket.settings ExceptionSettings SHOW_INTERNAL_ERROR_PAGE

List of usage examples for org.apache.wicket.settings ExceptionSettings SHOW_INTERNAL_ERROR_PAGE

Introduction

In this page you can find the example usage for org.apache.wicket.settings ExceptionSettings SHOW_INTERNAL_ERROR_PAGE.

Prototype

UnexpectedExceptionDisplay SHOW_INTERNAL_ERROR_PAGE

To view the source code for org.apache.wicket.settings ExceptionSettings SHOW_INTERNAL_ERROR_PAGE.

Click Source Link

Document

Indicates a generic internal error page should be shown when an unexpected exception is thrown.

Usage

From source file:de.alpharogroup.wicket.base.util.application.ApplicationExtensions.java

License:Apache License

/**
 * Sets the deployment exception settings for the given application.
 *
 * @param application/*  w w w.j a  va 2 s .  c  om*/
 *            the application
 * @param applicationRequestCycleListener
 *            the application request cycle listener
 */
public static void setExceptionSettingsForDeployment(final Application application,
        final AbstractRequestCycleListener applicationRequestCycleListener) {
    // show the exception page from us...
    application.getExceptionSettings()
            .setUnexpectedExceptionDisplay(ExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
    // In case of unhandled exception redirect it to a custom page
    application.getRequestCycleListeners().add(applicationRequestCycleListener);
}