Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2.4
-
None
-
Operating System: other
Platform: All
-
32134
Description
The new forward configuration encourages using the "module" element instead of
the deprecated "contextRelative" element. However, it fails in this case
where we want to switch to the default module:
<forward name="HomePage" path="/HomePage.do" module="/" redirect="true" />
The calculated URL ends up //HomePage.do instead of /HomePage.do (double '/').
The workaround is to configure the "old" way:
<forward name="HomePage" path="/HomePage.do" contextRelative="true"
redirect="true" />
My proposed fix is to change the "forwardURL" method in RequestUtils like this:
if(forward.getModule() != null) {
prefix = forward.getModule();
if ("/".equals(prefix)
// new line
}
This works for my situation, but should be verified by someone who knows the
entire code base better.