Better way or alternative to renderResponse.createActionURL()??
648328Jul 10 2008 — edited Jul 18 2008In a Java class I am trying to display content from a node given it's path... the catch is that it can be different types so we are using createActionURL from the renderResponse object... The issue is that depending on the portlet we are calling it from (some jsr168, some not) renderReponse is not available... Is there an alternative or better way to do this in JAVA?
##Current Code##
PortletURL contentUrl = renderResponse.createActionURL();
contentUrl.setParameter("ACTION", "displayContent");
contentUrl.setParameter("path", getNodePath(node.getProperty("contentPath").getValue().getStringValue().replaceAll("\\\\","/")) );
contentUrl.setParameter("displayImage", "true");
url = contentUrl.toString();