You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Alvar Lumberg (JIRA)" <ji...@apache.org> on 2010/07/07 14:55:49 UTC
[jira] Created: (PLUTO-595) Empty web context path doesn't work
Empty web context path doesn't work
-----------------------------------
Key: PLUTO-595
URL: https://issues.apache.org/jira/browse/PLUTO-595
Project: Pluto
Issue Type: Bug
Components: portal driver
Affects Versions: 2.0.2
Environment: Jetty, Java 6 (not important)
Reporter: Alvar Lumberg
When Pluto is configured as a root webapp (with empty webapp context), portlets cannot be run properly (display NPE):
java.lang.NullPointerException
at org.apache.pluto.container.impl.PortletContainerImpl.doRender(PortletContainerImpl.java:141)
at org.apache.pluto.driver.tags.PortletTag.doStartTag(PortletTag.java:165)
at org.apache.jsp.WEB_002dINF.themes.portlet_002dskin_jsp._jspx_meth_pluto_005fportlet_005f0(portlet_002dskin_jsp.java:98)
This can be fixed by not adding a double slash in PortletContextManager (line 214):
Broken:
DriverPortletConfig ipc = portletConfigs.get(applicationName + "/" + portletName);
Fixed:
DriverPortletConfig ipc = portletConfigs.get(("/".equals(applicationName) ? "" : applicationName) + "/" + portletName);
This fix is able to display portlets correctly, however problems occur when PageAdminPortlet adds a new portlet to a page:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:686)
at org.apache.pluto.driver.services.portal.PortletWindowConfig.createPortletId(PortletWindowConfig.java:112)
at org.apache.pluto.driver.services.portal.PageConfig.addPortlet(PageConfig.java:61)
Which is clearly a bug in PortletWindowConfig, line 112:
Broken:
if (contextPath.charAt(0) == '/')
Fixed:
if (contextPath.length() > 1 && contextPath.charAt(0) == '/')
After this two fixes are applied, pluto works very fine with empty web context. This problem is also described in some forums on the web, so it might be a good idea to fix it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.