TemplateDispatchResolver

Component Name

/com/escenic/servlet/TemplateDispatchResolver

Description

This processor inspects the request scope attribute com.escenic.context.path to see whether or not the request has been successfully parsed by the preceding processors:

  • If com.escenic.context.path is empty, then the request was successfully parsed, so the processor then checks whether or not the requested object exists/is accessible and:

    • If it exists and is available, dispatches the request to /template/common.jsp or the handler defined with the page property.

    • If it does not exist, returns an HTTP 404 response (Not Found).

    • If it exists but is unavailable, returns an appropriate HTTP response.

  • If com.escenic.context.path contains anything at all, then the request was not parsed successfully. However, the request will still be dispatched to the web application, allowing it to determine how to deal with the invalid request.

Configuration

The following property can be defined in WEB-INF/localconfig/com/escenic/servlet/TemplateDispatchResolver.properties:

page

The JSP template or other handler to which the request is to be forwarded. If not set, a default value of /template/common.jsp is used. This property can also be set by adding a forward-to-page parameter to /WEB-INF/localconfig/defaults.properties (see The default.properties File for details).

Input Request Scope Attributes
com.escenic.context.path

Request Scope Attributes

This processor sets no request scope attributes.