}
@RequestMapping(headers={"org.jasig.portal.url.UrlType=ACTION"})
public void actionRequest(HttpServletRequest request, HttpServletResponse response) throws IOException {
final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
final IPortletRequestInfo portletRequestInfo = portalRequestInfo.getTargetedPortletRequestInfo();
final IPortalUrlBuilder actionRedirectUrl;
if (portletRequestInfo != null) {
final IPortletWindowId targetWindowId = portletRequestInfo.getPortletWindowId();
actionRedirectUrl = this.portalUrlProvider.getPortalUrlBuilderByPortletWindow(request, targetWindowId, UrlType.RENDER);
}
else {
final String targetedLayoutNodeId = portalRequestInfo.getTargetedLayoutNodeId();
if (targetedLayoutNodeId != null) {
actionRedirectUrl = this.portalUrlProvider.getPortalUrlBuilderByLayoutNode(request, targetedLayoutNodeId, UrlType.RENDER);
}
else {
actionRedirectUrl = this.portalUrlProvider.getDefaultUrl(request);
}
}
//Stuff the action-redirect URL builder into the request so other code can use it during request processing
this.portalUrlProvider.convertToPortalActionUrlBuilder(request, actionRedirectUrl);
if (portletRequestInfo != null) {
final IPortletWindowId targetWindowId = portletRequestInfo.getPortletWindowId();
try {
this.portletExecutionManager.doPortletAction(targetWindowId, request, response);
}