Author: hfnukal
Date: 2011-06-09 06:58:06 -0400 (Thu, 09 Jun 2011)
New Revision: 6618
Modified:
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java
Log:
JBEPP-854 Portlet's context-root cannot contain slashes
Modified:
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java 2011-06-09
10:25:15 UTC (rev 6617)
+++
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java 2011-06-09
10:58:06 UTC (rev 6618)
@@ -125,9 +125,9 @@
@Override
public PortletContext getProducerOfferedPortletContext(String applicationState)
{
- String[] chunks = Utils.split("/", applicationState);
- String appName = chunks[0];
- String portletName = chunks[1];
+ int indexOfSeparator = applicationState.lastIndexOf("/");
+ String appName = applicationState.substring(0, indexOfSeparator);
+ String portletName = applicationState.substring(indexOfSeparator + 1);
return
PortletContext.createPortletContext(PortletInvoker.LOCAL_PORTLET_INVOKER_ID +
"./" + appName + "."
+ portletName);
}
Show replies by date