Approach
using Tridion custom tags
i. Use Dynamic Component Template
i. Use Dynamic Component Template
ii.
Generated
code:
<tridion:ComponentPresentation pageURI="tcm:83-3246-64" componentURI="tcm:83-3235" templateURI="tcm:83-3245-32"/>
<tridion:ComponentPresentation pageURI="tcm:83-3246-64" componentURI="tcm:83-3235" templateURI="tcm:83-3245-32"/>
iii.
Change
Output Format to JSP Scripting
iv.
Change
cd_storage_conf.xml to publish under Tomcat temporary webroot
v.
Add
JSP directives to Dynamic CT
<%@ page contentType="text/html; charset=UTF8" %>
<%@ page contentType="text/html; charset=UTF8" %>
<%@ taglib
uri="cd_tags" prefix="tridion"
%>
Approach
using Java API
i.
Use
the ComponentPresentationAssembler
JSPPage jspPage = new JSPPage(pageContext, "tcm:83-3246-64");
ComponentPresentationAssembler cpAssembler = new
ComponentPresentationAssembler(jspPage);
out.println(cpAssembler.getContent(3235, 3245));
Comments