The content returned to the client browser can take several forms: JSP, XML, or JSON. The request-handling architecture for an Assembler-driven JSP page looks like this:

In this diagram, the following happens:

  1. The application server receives a request.

  2. The application server passes the request to the ATG request handling pipeline.

  3. The ATG request handling pipeline does some preliminary work, such as setting up the profile and determining which site the request is for. At the appropriate point, the pipeline invokes the /atg/endeca/assembler/AssemblerPipelineServlet.

  4. The AssemblerPipelineServlet determines if the request is for a page or a content collection in Experience Manager and creates an appropriate request ContentItem. Then, AssemblerPipelineServlet calls the invokeAssembler() method on the /atg/endeca/assembler/AssemblerTools component and passes it the request ContentItem.

  5. The AssemblerTools component invokes the createAssembler() method on the /atg/endeca/assembler/NucleusAssemblerFactory component.

  6. The NucleusAssemblerFactory component returns an atg.endeca.assembler.NucleusAssembler instance.

  7. The AssemblerTools component invokes the assemble() method on the NucleusAssembler instance and passes it the request ContentItem.

  8. The NucleusAssembler instance assembles the correct content for the request. Content, in Endeca terms, corresponds to a set of cartridges and their associated data. The NucleusAssembler instance starts with the data in the Endeca Experience Manager cartridge configuration files and then modifies that data with information stored in the Endeca Content Repository (that is, changes made and saved via the Experience Manager UI). The assembled content takes the form of a response ContentItem that consists of a root ContentItem which may have sub-ContentItem objects as attributes. This ContentItem hierarchy corresponds to the root cartridge and any sub-cartridges that were used to create the returned content.

  9. The NucleusAssembler instance recursively calls the NucleusAssembler.getCartridgehandler() method, passing in the ContentItem type, to retrieve the correct cartridge handlers for the root ContentItem and any of its sub-items.

  10. The cartridge handlers get resolved and executed for the root ContentItem and its sub-items. The resulting root ContentItem is passed back to the NucleusAssembler Instance.

    Note: If a cartridge handler doesn’t exist for a ContentItem, the initial version of the item, created in step 8, is returned.

  11. The NucleusAssembler instance returns the root ContentItem to AssemblerTools.

  12. The AssemblerTools component returns the root ContentItem to AssemblerPipelineServlet.

  13. The AssemblerPipelineServlet component calls the /atg/endeca/assembler/cartridge/renderer/ContentItemToRendererPath component to get the path to the renderer (in this case, a JSP file) for the root ContentItem. The ContentItemToRendererPath component uses pattern matching to match the ContentItem type to a JSP file; for example, in Commerce Reference Store, if the ContentItem type is Breadcrumbs, the JSP file is /cartridges/Breadcrumbs/Breadcrumbs.jsp.

    Note: See ContentItemToRendererPath for more details on how the renderer path is calculated.

  14. The AssemblerPipelineServlet component sets the assembled ContentItem as a contentItem parameter on the HttpServletRequest, then forwards the request to the JSP determined by the ContentItemToRendererPath component

  15. The JSP for the root ContentItem may also have to render sub-ContentItems. In this case, the JSP must include dsp:renderContentItem tags for the sub-ContentItems.

  16. dsp:renderContentItem invokes ContentItemToRendererPath to retrieve the JSP renderer for the specified ContentItem. This process happens recursively until all sub-ContentItems are rendered.

    The dsp:renderContentItem tag also sets the contentItem attribute on the HttpServletRequest, thereby making the current ContentItem available to the renderers; however, this value lasts only for the duration of the include so that after the include is done, the contentItem attribute’s value returns to the root ContentItem.

  17. The JSPs returned by the ContentItemToRendererPath component are included in the response.

  18. The response is returned to the browser.

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices