}
}
JahiaContextRequest jahiaContextRequest = new JahiaContextRequest(jahiaUser, httpServletRequest, workspaceName);
jahiaContextRequest.setEntryPointInstance(entryPointInstance);
PortalRequestContext portalContext = new PortalRequestContext(servletContext, jahiaContextRequest, httpServletResponse);
final String defName = entryPointInstance.getDefName();
PortletWindowConfig windowConfig = PortletWindowConfig.fromId((defName.startsWith(".") ? "/" : "") + defName + "!" + windowID);
windowConfig.setContextPath(entryPointInstance.getContextName());
if (logger.isDebugEnabled()) {
logger.debug("Rendering Portlet Window: " + windowConfig);
}
// Retrieve the current portal URL.
PortalRequestContext portalEnv = PortalRequestContext.getContext(jahiaContextRequest);
PortalURL portalURL = portalEnv.getRequestedPortalURL();
// Retrieve the portlet container from servlet context.
PortletContainer container = (PortletContainer) servletContext.getAttribute(AttributeKeys.PORTLET_CONTAINER);
// Create the portlet window to render.