Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.2
-
None
Description
http://struts.apache.org/2.x/docs/portlet-configuration.html , sample for portlet.xml states:
<init-param>
<!-- Portlet namespace -->
<name>portletNamespace</name>
<value>/portletA</value>
</init-param>
<init-param>
<!-- The base namespace of the view portlet mode -->
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<init-param>
<!-- The default action to invoke in view mode -->
<name>defaultViewAction</name>
<value>index</value>
</init-param>
but actually this will not work.
Paths are calculated in
org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher
starting in line 250 (method parseModeConfig)
The problem is that the calculated path from the above example will have double slash:
/portletA//view/index
and this will not work.
I believe the code should be fixed and the wiki description is correct.
In addition to that such code may be corrected:
fullPath.append(namespace + "/");
to
fullPath.append(namespace).append("/");