Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.1.2
-
None
Description
I upgrade my application from 2.1.8 to 2.3.1.2, then find that <s:url> can't geneate proper result when I don't assign namespace value in the <s:url> tag. e.g, <s:url value="aaaa/">, in the old version, I got "http://xxx/xxxx&struts.portlet.action=/somenamespace/aaaa", but in the new version, I got "http://xxx/xxxx&struts.portlet.action=/aaaa", the namespace is missing.
I check source code between 2.1.8 and 2.3.1.2, and find in org.apache.struts2.components.PortletUrlRenderer
public void renderUrl(Writer writer, UrlProvider urlComponent) { ... urlComponent.setNamespace(urlComponent.determineNamespace(urlComponent.getNamespace(), urlComponent.getStack(),urlComponent.getHttpServletRequest())); // Line 78, in 2.1.8 ... }
This statement is missing in 2.3.1.2, which cause struts can't find namespace by action name. I think it's losing feature.