The Portal Filter Chain is a sequence of servlet filters that accept the incoming HttpServletRequest and HttpServletResponse objects, modify them with Portal-specific attributes, and dispatch them for servicing. Servlet filters are a standard element in Java Servlets 2.3.

The Portal Filter Chain is configured in the Web application’s deployment descriptor file, which is found in WEB-INF/web.xml. A standard Portal Filter Chain is defined in the deployment descriptor for the default Portal, located at <ATG9dir>/Portal/paf/paf-dar/portal/WEB-INF/web.xml. For many Portal applications, the standard Portal Filter Chain will work as-is and can be copied into your Web application’s deployment descriptor. However, the Portal Filter Chain is open, and the elements of the standard Portal Filter Chain can be replaced, removed, or supplemented, depending on the needs of your application.

The deployment descriptor file uses the standard DTD for J2EE Web applications, http://java.sun.com/dtd/web-app_2_3.dtd . A portal filter is configured in a <filter> tag, with various parameters configured in <init-param> tags. For example, the first filter in the Portal Filter Chain is configured like this:

<filter>
    <filter-name>PortalServerFilter</filter-name>
    <display-name>PortalServerFilter</display-name>
    <description>Responsible for wrapping the HttpServletRequest and
 HttpServletResponse objects.</description>
    <filter-class>atg.portal.servlet.PortalServerFilter</filter-class>
    <init-param>
      <param-name>loggingDebug</param-name>
      <param-value>false</param-value>
    </init-param>
    <init-param>
      <param-name>loggingWarning</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>loggingError</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>loggingInfo</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>portalServletRequestFactory</param-name>
      <param-value>ctx:dynamo:/atg/portal/servlet/PortalServletFactory
      </param-value>
    </init-param>
    <init-param>
      <param-name>portalServletResponseFactory</param-name>
      <param-value>ctx:dynamo:/atg/portal/servlet/PortalServletFactory
      </param-value>
    </init-param>
    <init-param>
      <param-name>wrapping</param-name>
      <param-value>false</param-value>
    </init-param>
    <init-param>
      <param-name>initD5StyleAttributes</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>portalServletRequestName</param-name>
      <param-value>PortalServletRequest</param-value>
    </init-param>
  </filter>

Each Portal filter has logging parameters that correspond to the logging levels of Nucleus components:

loggingDebug
loggingWarning
loggingError
loggingInfo

The other parameters of the Portal filters are described in the Portal Filter Chain Elements section.

Filters are assigned a filter mapping in the deployment descriptor, which maps the filter to a URL pattern in the request. Each element of the standard Portal Filter Chain has a URL pattern of /*, which means that each request is passed to each element of the chain in the order they are listed in the deployment descriptor. Your Web application may need to be customized with other filter mappings.

 
loading table of contents...