"portlet:render?param1=value1&param2=value2";
FacesContext ctx = FacesContext.getCurrentInstance();
ExternalContext extCtx = ctx.getExternalContext();
RenderResponse response = (RenderResponse) extCtx.getResponse();
PortletURL portletURL = response.createRenderURL();
portletURL.setParameter("param1", "value1");
portletURL.setParameter("param2", "value2");
String portletEncoded = portletURL.toString();
// PortletContainers can return "URLs" with strict XML encoding -- as the bridge
// encoding depends on what is past in to it -- make sure we send in a string
// with the same encoding as compare string.
String bridgeEncoded = null;