When there is a dot (.) in the context path of a portet, the Pluto driver throws an NPE that points to a logging call in PortletModeAnchorTag.isPortletModeAllowed() (line 161) because the window parameter is null. The cause of this null parameter is because ResourceConfig.getPortletWindow() cannot find the portlet application because the call to getContextFromPortletId() returns an incorrect context.
The solution appears to be to change the indexOf() call in getContextFromPortletId() to lastIndexOf() (line 239). This assumes that the portlet name (portlet-name in portlet.xml) also does not have a dot in its name. The 'dot check' in the portlet name should be done at deploy time (via ant, maven or admin portlet). In addition the getPortletNameFromPortletId() method should also change the indexOf() call to lastIndexOf() on line 252.
In other words, ResourceConfig (and other places, I'm sure) assume the portlet Id is the context path and portlet name appended together with a dot.
We should also do a null check prior to the logging call in PortletModeAnchorTag.isPortletModeAllowed().
This is my best guess as to the cause of the problem at this moment. I will try to apply the 'lastIndexOf' fixes and the null check in PortletModeAnchorTag when I get a chance, but anyone else is welcome to do the same.