This plugin provides additional result types.
This plugin can be used with the Apache Struts versions 2.5.x .
These result types are made to support redirecting under the https protocol while being behind a SSL offloading proxy.
This Result Type should replace the redirect
Result Type.
It takes into account 2 ways of detecting the offloading:
X-Forwarded-Proto
header (de-facto standard header)proto
attribute of theForwarded
header ( RFC7239 )
This Result Type should replace the redirectAction
Result Type.
It takes into account 2 ways of detecting the offloading:
X-Forwarded-Proto
header (de-facto standard header)proto
attribute of theForwarded
header ( RFC7239 )
Only thing this package does is defining the result types so that they can be used.
Merely combines the struts-default
package and the ssl-offload
package.
The requirement for using these Result Types is that they are defined.
This could be done in a couple ways:
Defining the types manualy in your own package
The Result Types can be registered in your own package as follows:
<package name="myPackage" extends="struts-default">
<result-types>
<result-type name="sslOffloadRedirect" class="org.apache.struts2.result.SslOffloadAwareServletRedirectResult"/>
<result-type name="sslOffloadRedirectAction" class="org.apache.struts2.result.SslOffloadAwareServletActionRedirectResult"/>
</result-types>
...
</package>
Using the ssl-offload package as a parent
You can also just specify the ssl-offload
package as a parent your package extends from.
<package name="myPackage" extends="struts-default, ssl-offload">
...
</package>
Using the ssl-offload-default as a parent
You can also just specify the ssl-offload-default
package as a parent your package extends from. This should have the same effect as extending both struts-default
and ssl-offload
<package name="myPackage" extends="ssl-offload-default">
...
</package>