WFLY-11764 Make return value of HttpServletRequest.getServletPath/getRequestURI/getRequestURL configurable (DeploymentInfo.setPreservePathOnForward)
This feature is to support a backwards compatible behavior of
HttpServletRequest.getServletPath in Undertow.
In an Struts2 application deployed to EAP6, this method returns the action name, but in EAP7 it returns the forwarded jsp name.
DeploymentInfo API was updated to support that behavior (via
and now we need to make that behavior configurable in EAP7.
Notice that, for consistency reasons, the returned value of
HttpServletRequest.getRequestURL are also affected by the same configuration, making them return the URI/URL with
the action name if
DeploymentInfo.preservePathOnForward is set to
[ ] QE
Affected Projects or Components
WildFly, Undertow component
Other Interested Projects
This will be implemented as an additional attribute under the
This will be a simple boolean attribute called
preserve-path-on-forward that marks the path to be preserved or not.
The default value must be
false to keep backwards compatibility to Undertow’s previous versions and to keep
compatibility with the default in the tech preview, i.e, in
A new test will be added to verify that
HttpServletRequest.getRequestURL all return a preserved path on forward if
preserve-path-on-forward is set to
Update the WildFly documentation to document the new attribute, and the affected behavior.