The /atg/endeca/assembler/AssemblerPipelineServlet component is part of Oracle Commerce Core Platform request handling pipeline and it is of class atg.endeca.assembler.AssemblerPipelineServlet. AssemblerPipelineServlet’s primary task is to invoke the Assembler, passing in a ContentInclude (for a page request) or a ContentSlotConfig (for a content folder request). AssemblerPipelineServlet is started when the Oracle Commerce Platform server is started. The /Initial.properties file under DAF.Endeca.Assembler configures this behavior by adding AssemblerPipelineServlet to its initial services.

initialServices+=\
  /atg/endeca/assembler/AssemblerPipelineServlet

On invocation of the AssemblerPipelineServlet.service() method, several items are checked to determine whether or not the servlet should execute:

If all of the above checks pass, AssemblerPipelineServlet executes. Its first task is to determine whether the request is a page request or a content folder request. AssemblerPipelineServlet makes this determination based on the URL, as described in the following sections.

Content Folder Request Identification and Handling

The URL for a content folder request has some additional requirements that the URL for a page request does not have. Specifically, the URL for a content folder must have an /assembler sub-path and an assemblerContentCollection request parameter. For example:

/crs/storeus/assembler/?assemblerContentCollection=Search Box Auto Suggest Content

The /assembler sub-path can take any of these forms:

The assemblerContentCollection request parameter must specify the name of a content folder. If these content folder URL conditions are met, AssemblerPipelineServlet creates a ContentSlotConfig object and passes it to the Assembler:

contentItem = new ContentSlotConfig(content, ruleLimit);

A content folder URL may also include the optional assemblerRuleLimit request parameter. This is an integer value that is used as an argument to the ContentSlotConfig constructor. It determines the number of items to return from the content folder. If assemblerRuleLimit is not set or is an invalid value, then the default value of 1 is used.

/crs/storeus/assembler/?assemblerContentCollection=Search Box Auto Suggest Content&assemblerRuleLimit=3

If the content folder does not exist, the Assembler returns a content item whose contents value is empty. For example, this URL:

http://localhost:8080/assembler/assembler?assemblerContentCollection=/content/BrowsePageCollection&format=json

Results in this data:

{"@type":"ContentSlot","contents":[],"ruleLimit":1,"contentCollection":"\/content\/BrowsePageCollection"}
Page Request Identification and Handling

If the URL does not fit the requirements for a content folder request, the AssemblerPipelineServlet component assumes that this is a page request. A page request URL must be transformed into a URI that matches one of the pages defined Experience Manager. See the Calculating the Content Path from the Page Request URL section for details on how the URI is calculated.

Bypassing or Invoking the Assembler Based On MIME Type

By default, the AssemblerPipelineServlet limits its Assembler invocation to request paths that do not match a known MIME type. It does this via a reference to the /atg/dynamo/servlet/pipeline/MimeTyper component, which is part of the Oracle Commerce Core Platform system that routes and executes requests based on matching MIME types. This configuration prevents the AssemblerPipelineServlet from intercepting requests for JSP, CSS, HTML, and JavaScript files, among others.

You can add allowed MIME types or disable Assembler invocation for unknown MIME types using the following AssemblerPipelineServlet configurable properties:

# Whether to invoke the Assembler for a potential match on a request
# that doesn't match a known MIME type (typically a directory).
#
# assembleUnknownMimeTypes=true

# A String array of allowed MIME types. Defaults to null, but
# can be set to a MIME type if you want to pass certain extensions to
# the Assembler (for example, ".asm" or ".endeca").
#
# allowedMimeTypes=

See the Platform Programming Guide for more information on the MimeTyper component.


Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices