JBoss.orgCommunity Documentation

Chapter 9. Error Handling Configuration

9.1. Error Types
9.2. Control Policies
9.2.1. Policy Delegation and Cascading
9.2.2. Default Policy
9.2.3. Portal Policy
9.2.4. Page Policy
9.3. Configuration using XML Descriptors
9.3.1. Portal Policy Properties
9.3.2. Page Policy Properties
9.4. Using JSP™ to Handle Errors
9.5. Configuration using the Portal Management Application

The JBoss Portal request pipeline allows fine-grained, dynamic configuration of how JBoss Portal behaves when errors occur during runtime.

There are several types of errors that can occur during a request:

If an error occurs, the request control-flow changes according to the configuration. This configuration is known as the control policy.

Different policies are configured using portal object properties, allowing the error-handling policy for objects to be configured in XML descriptors -- the *-object.xml files -- for a portal deployment.

A set of properties configure the behavior of the page policy. These properties are only taken into account for objects that use the portal type. The following table represents possible page-policy properties:


The following page configuration demonstrates the use of page-policy properties:

<page>
   <page-name>MyPortal</page-name>
   ...
   <properties>
      <property>
         <name>control.page.access_denied</name>
         <value>hide</value>
      </property>
      <property>
         <name>control.page.unavailable</name>
         <value>hide</value>
      </property>
      <property>
         <name>control.page.not_found</name>
         <value>hide</value>
      </property>
      <property>
         <name>control.page.internal_error</name>
         <value>jsp</value>
      </property>
      <property>
         <name>control.page.error</name>
         <value>jsp</value>
      </property>
      <property>
         <name>control.page.resource_uri</name>
         <value>/WEB-INF/jsp/error/page.jsp</value>
      </property>
      ...
   </properties>
   ...
</page>

As described in previous sections, error handling can be redirected to a JSP™ page. Two pages can be created to handle errors: one for the portal level, and the other for the page level. Portal level error-handling requires a page that produces a full page, and page-level handling requires a page that produces markup, but only for a window. When the page is invoked, a set of request attributes are passed. The following table represents possible request attributes:


The error handling policy can be configured via the portal management application. To access the portal management application:

  1. Use a Web browser to navigate to http://localhost:8080/portal.

  2. Click the Login button on the top right-hand of the welcome page, and log in as the admin user.

  3. Click the Admin tab on the top right-hand of the welcome page. Four tabs will appear on the left-hand side of the page.

  4. Click the Admin tab to open the portal management application, and then click the Portal Objects tab to display available portals.

Configuration options are available as part of the properties for each configuration level. You can specify the default error handling policy (at the root of the portal object hierarchy) for each portal, or each page, by clicking on the Properties button for each page or portal:

As well, you can specify how dashboards should behave with respect to error handling, by clicking on the Dashboards tab in the portal management application:

The page specified with On error redirect to this resource is used when the Redirect to the specified resource action is selected for an error type, such as When access to the page is denied. After making changes, click the Update button for settings to take effect.