You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by sd...@apache.org on 2017/03/29 09:57:05 UTC

[16/16] struts-extras git commit: added information on how to register the Result Types

added information on how to register the Result Types


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/c056b516
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/c056b516
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/c056b516

Branch: refs/heads/master
Commit: c056b516acdd518ea4e1fa8b66d950e20299dcee
Parents: d74f9cc
Author: Stefaan Dutry <st...@gmail.com>
Authored: Tue Mar 28 21:45:04 2017 +0200
Committer: Stefaan Dutry <st...@gmail.com>
Committed: Tue Mar 28 21:45:04 2017 +0200

----------------------------------------------------------------------
 struts2-custom-results-plugin/README.md | 39 ++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/c056b516/struts2-custom-results-plugin/README.md
----------------------------------------------------------------------
diff --git a/struts2-custom-results-plugin/README.md b/struts2-custom-results-plugin/README.md
index f19f2fb..bf1e147 100644
--- a/struts2-custom-results-plugin/README.md
+++ b/struts2-custom-results-plugin/README.md
@@ -40,3 +40,42 @@ Only thing this package does is defining the result types so that they can be us
 
 Merely combines the `struts-default` package and the `ssl-offload` package.
 
+#### How to use
+
+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:
+
+```xml
+    <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.
+
+```xml
+    <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`
+
+```xml
+    <package name="myPackage" extends="ssl-offload-default">
+        ...
+    </package>
+```