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:
The application server receives a request.
The application server passes the request to the ATG request handling pipeline.
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.The
AssemblerPipelineServletdetermines if the request is for a page or a content collection in Experience Manager and creates an appropriate requestContentItem. Then,AssemblerPipelineServletcalls theinvokeAssembler()method on the/atg/endeca/assembler/AssemblerToolscomponent and passes it the requestContentItem.The
AssemblerToolscomponent invokes thecreateAssembler()method on the/atg/endeca/assembler/NucleusAssemblerFactorycomponent.The
NucleusAssemblerFactorycomponent returns anatg.endeca.assembler.NucleusAssemblerinstance.The
AssemblerToolscomponent invokes theassemble()method on theNucleusAssemblerinstance and passes it the requestContentItem.The
NucleusAssemblerinstance assembles the correct content for the request. Content, in Endeca terms, corresponds to a set of cartridges and their associated data. TheNucleusAssemblerinstance 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 responseContentItemthat consists of a rootContentItemwhich may have sub-ContentItemobjects as attributes. ThisContentItemhierarchy corresponds to the root cartridge and any sub-cartridges that were used to create the returned content.The
NucleusAssemblerinstance recursively calls theNucleusAssembler.getCartridgehandler()method, passing in theContentItemtype, to retrieve the correct cartridge handlers for the rootContentItemand any of its sub-items.The cartridge handlers get resolved and executed for the root
ContentItemand its sub-items. The resulting rootContentItemis passed back to theNucleusAssemblerInstance.Note: If a cartridge handler doesn’t exist for a
ContentItem, the initial version of the item, created in step 8, is returned.The
NucleusAssemblerinstance returns the rootContentItemtoAssemblerTools.The
AssemblerToolscomponent returns the rootContentItemtoAssemblerPipelineServlet.The
AssemblerPipelineServletcomponent calls the/atg/endeca/assembler/cartridge/renderer/ContentItemToRendererPathcomponent to get the path to the renderer (in this case, a JSP file) for the rootContentItem. TheContentItemToRendererPathcomponent uses pattern matching to match theContentItemtype to a JSP file; for example, in Commerce Reference Store, if theContentItemtype isBreadcrumbs, the JSP file is/cartridges/Breadcrumbs/Breadcrumbs.jsp.Note: See ContentItemToRendererPath for more details on how the renderer path is calculated.
The
AssemblerPipelineServletcomponent sets the assembledContentItemas acontentItemparameter on theHttpServletRequest, then forwards the request to the JSP determined by theContentItemToRendererPathcomponentThe JSP for the root
ContentItemmay also have to render sub-ContentItems. In this case, the JSP must includedsp:renderContentItemtags for the sub-ContentItems.dsp:renderContentIteminvokesContentItemToRendererPathto retrieve the JSP renderer for the specifiedContentItem. This process happens recursively until all sub-ContentItemsare rendered.The
dsp:renderContentItemtag also sets thecontentItemattribute on theHttpServletRequest, thereby making the currentContentItemavailable to the renderers; however, this value lasts only for the duration of theincludeso that after theincludeis done, thecontentItemattribute’s value returns to the rootContentItem.The JSPs returned by the
ContentItemToRendererPathcomponent are included in the response.The response is returned to the browser.

