// copy jahia attibutes nested by the portlet
JahiaPortletUtil.copyJahiaAttributes(entryPointInstance, httpServletRequest, window, portalRequest, false, workspaceName);
// wrappe in a portal response
PortalServletResponse portalResponse = new JahiaPortalServletResponse(httpServletResponse);
// Render the portlet and cache the response.
try {
Map<String, Object> map = JahiaPortletUtil.filterJahiaAttributes(portalRequest);
container.doRender(window, portalRequest, portalResponse);
JahiaPortletUtil.setJahiaAttributes(portalRequest, map);
} catch (Exception th) {
logger.error("Error while rendering portlet", th);
}
final String portletRendering = portalResponse.getInternalBuffer().getBuffer().toString();
if (cacheKey != null) {
// cacheInstance.writeToContainerCache(null, jParams, portletRendering, cacheKey, new HashSet(), entryPointInstance.getExpirationTime());
}
return portletRendering;
}