if (requestDispatcher == null) {
throw new IllegalArgumentException("No PortletDelegationDispatcher exists for portlet window id: " + portletWindowId);
}
this.logger.debug("Found delegation dispatcher for portlet window id {} - {}", portletWindowId, requestDispatcher);
final DelegationResponse delegationResponse;
final String phase = (String)request.getAttribute(PortletRequest.LIFECYCLE_PHASE);
if (PortletRequest.RENDER_PHASE.equals(phase)){
final PortletOutputHandler portletOutputHandler = (PortletOutputHandler)model.get(DELEGATE_RENDER_OUTPUT_HANDLER);
if (portletOutputHandler != null) {
this.logger.debug("Delegating RenderRequest with custom Writer and {}", delegationRequest);