Error Pages
When the Portal application serves up an HTTP error page - such as when it sends an
HTTP
404 response when a piece of content does not exist - the application will dynamically
determine
which template to use for the error.
When an HTTP response in the 400 or 500 range is sent, the application will use
/pages/errors/{code}.ftl
, if it exists, and
/pages/error.ftl
if it does not. For example, when sending a 404
response, /pages/errors/404.ftl
will be used if it exists, and the
fallback /pages/error.ftl
. (The default portal theme's 404 and 500 error
pages simply <#include ../error.ftl/>
.)
Page Variables
Unlike most pages, error pages do not include the common variables. Error pages are limited to the following data:
portal
- A complex object containing the properties of the portal itself. See .
request
- The
HttpServletRequest
object for the current request. errorCode
- An integer with the HTTP error code.
stackTrace
- If applicable, the Java exception stack trace that caused the error page.