This is related to
If you use the method DefaultUrlHelper().buildUrl() and set forceAddSchemeHostAndPort to true Struts2 does not always add the port. This is a problem if you intend to use the output as a parameter.
The resulting parameter appended to backUrl does not have the port, even with setting forceAddSchemeHostAndPort to true.
My current workaround is to use:
This gives Struts2 the same scheme that is currently used but makes it think that there could be a change. Result is that the port in the parameter URL is appended.
My environment is Struts2 2.3.33 but I didn't see a code change in that area between 2.3 and 2.5, nonetheless I only selected the version I actually tested this on.