9.4. Using JSP™ to Handle Errors

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:

Table 9.3. 

Attribute Name Attribute Description Attribute Value
org.jboss.portal.control.ERROR_TYPE the error type possible values are ACCESS_DENIED, UNAVAILABLE, ERROR, INTERNAL_ERROR, and NOT_FOUND
org.jboss.portal.control.CAUSE a cause which is thrown, that can be null the object is a subclass of java.lang.Throwable
org.jboss.portal.control.MESSAGE an error message that can be null text

JSP™ Location

The JavaServer Pages must be located in the jboss-portal.sar/portal-core.war/ web application.