* @throws PortletException
* @throws IOException
*/
protected void executeRenderResult(final String finalLocation) throws PortletException, IOException {
LOG.debug("Executing result in Render phase");
PortletConfig cfg = PortletActionContext.getPortletConfig();
RenderRequest req = PortletActionContext.getRenderRequest();
RenderResponse res = PortletActionContext.getRenderResponse();
LOG.debug("PortletConfig: " + cfg);
LOG.debug("RenderRequest: " + req);
LOG.debug("RenderResponse: " + res);
res.setContentType(contentType);
if (TextUtils.stringSet(title)) {
res.setTitle(title);
}
LOG.debug("Location: " + finalLocation);
PortletRequestDispatcher preparator = cfg.getPortletContext()
.getNamedDispatcher("preparator");
if(preparator == null) {
throw new PortletException("Cannot look up 'preparator' servlet. Make sure that you" +
"have configured it correctly in the web.xml file.");
}
new IncludeTemplate() {
protected void when(PortletException e) {
LOG.error("PortletException while dispatching to 'preparator' servlet", e);
}
protected void when(IOException e) {
LOG.error("IOException while dispatching to 'preparator' servlet", e);
}
}.include(preparator, req, res);
PortletRequestDispatcher dispatcher = cfg.getPortletContext().getRequestDispatcher(finalLocation);
if(dispatcher == null) {
throw new PortletException("Could not locate dispatcher for '" + finalLocation + "'");
}
new IncludeTemplate() {
protected void when(PortletException e) {