Modified:
websites/production/struts/content/docs/how-do-we-get-access-to-the-session.html
==============================================================================
---
websites/production/struts/content/docs/how-do-we-get-access-to-the-session.html
(original)
+++
websites/production/struts/content/docs/how-do-we-get-access-to-the-session.html
Tue Aug 25 07:18:20 2015
@@ -138,39 +138,10 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent">
-<p>You can obtain the session attributes by asking the ActionContext or
implementing SessionAware. Implementing SessionAware is preferred.</p>
-
-<h2 id="Howdowegetaccesstothesession-AsktheActionContext">Ask the
ActionContext</h2>
-
-<p>The session attributes are available on the ActionContext instance, which
is made available via ThreadLocal.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
-Map attibutes = ActionContext.getContext().getSession();
-</pre>
-</div></div>
-
-<h2 id="Howdowegetaccesstothesession-ImplementSessionAware">Implement
SessionAware</h2>
-
-<p><img class="emoticon emoticon-yellow-star"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/star_yellow.png"
data-emoticon-name="yellow-star" alt="(star)"> Preferred</p>
-<ul><li>Ensure that <code>servletConfig</code> Interceptor is included in the
Action's stack.
- <ul><li><img class="emoticon emoticon-information"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/information.png"
data-emoticon-name="information" alt="(info)"> <em>The default stack already
includes</em> <code>_ servletConfig_</code><em>.</em></li></ul>
- </li><li>Edit the Action so that it implements the SessionAware
interface.
- <ul><li>The SessionAware interface expects a <code>setSession</code>
method. You may wish to include a companion <code>getSession</code>
method.</li></ul>
- </li><li>At runtime, call <code>getSession</code> to obtain a Map
representing the session attributes.</li><li>Any changes made to the session
Map are reflected in the actual HttpSessionRequest. You may insert and remove
session attributes as needed.</li></ul>
-
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
-Map parameters = this.getSession();
+ <div id="ConfluenceContent"><p>You can obtain the session
attributes by implementing <code>SessionAware</code> or getting them from
the <code>ActionContext</code>.</p><h2
id="Howdowegetaccesstothesession-ImplementingSessionAware">Implementing <code>SessionAware</code></h2><p><img
class="emoticon emoticon-yellow-star"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/star_yellow.png"
data-emoticon-name="yellow-star" alt="(star)"> This is the preferred
mechanism: it makes unit testing easier by allowing simple injection of session
attributes instead of having to mock the action context or go through an entire
request process.</p><ul><li>Ensure that the action's stack includes
the <code>servletConfig</code> interceptor.<ul><li><img
class="emoticon emoticon-information"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons
/emoticons/information.png" data-emoticon-name="information"
alt="(info)"> <em>The default stack
includes</em> <code>servletConfig</code><em>.</em></li></ul></li><li>Ensure
the action implements the
<code>SessionAware</code> interface.<ul><li><img class="emoticon
emoticon-information"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/information.png"
data-emoticon-name="information"
alt="(info)"> The <code>SessionAware</code> interface defines
a <code>setSession</code> method that sets the session attributes
into the action.</li></ul></li><li>Changes to the action's session map are
reflected in the underlying <code style="line-height:
1.4285715;">HttpSession</code>. You may query, insert, and remove session
attributes as needed.</li></ul><p> </p><div
class="confluence-information-macro
confluence-information-macro-information"><span class="aui-icon aui-icon-small
aui-iconfont-info confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>The <code>servletConfig</code>
interceptor looks for actions implementing <code>SessionAware</code> during
request processing. When it finds them it passes the map of session attributes
using the action's <code>setSession</code> method.</p></div></div><div
class="confluence-information-macro confluence-information-macro-tip"><span
class="aui-icon aui-icon-small aui-iconfont-approve
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>To unit test a
<code>SessionAware</code> Action, create your own <code>Map</code> with the
pertinent session attributes and call <code>setSession</code> as part of the
test's <span>setup </span>method.</p></div></div><h2
id="Howdowegetaccesstothesession-AsktheActionContext">Ask the
ActionContext</h2><p>Session attributes are available from the
<code>ActionContext</code> instance, a <code>ThreadLocal</
code>.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">Map attibutes = ActionContext.getContext().getSession();
</pre>
-</div></div>
-<div class="confluence-information-macro
confluence-information-macro-information"><span class="aui-icon aui-icon-small
aui-iconfont-info confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>When the
<code>servletConfig</code> Interceptor sees that an Action implements
ParameterAware, it passes a Map of the session attributes to the Action's
<code>setParameters</code> method. Changes made to the Map are reflected in the
runtime HttpSessionRequest.</p></div></div>
-<div class="confluence-information-macro
confluence-information-macro-tip"><span class="aui-icon aui-icon-small
aui-iconfont-approve confluence-information-macro-icon"></span><div
class="confluence-information-macro-body">
-<p>To unit test a SessionAware Action, create your own Map with the pertinent
session attributes and call <code>setSession</code> as part of the test's
<code>setUp</code> method.</p></div></div>
-<p>@see <a shape="rect"
href="struts-defaultxml.html">struts-default.xml</a><br clear="none">
-@see org.apache.struts.acton2.interceptor.SessionAware<br clear="none">
-@see org.apache.struts.acton2.interceptor.<a shape="rect"
href="servlet-config-interceptor.html">Servlet Config Interceptor</a></p></div>
+</div></div><p><span style="font-size: 14.0px;line-height: 1.4285715;">@see
</span><a shape="rect"
href="struts-defaultxml.html">struts-default.xml</a></p><p>@see
org.apache.struts.acton2.interceptor.SessionAware</p><p>@see <a shape="rect"
href="servlet-config-interceptor.html">org.apache.struts.acton2.interceptor.ServletConfigInterceptor</a></p></div>
</div>
Modified: websites/production/struts/content/docs/i18n-interceptor.html
==============================================================================
--- websites/production/struts/content/docs/i18n-interceptor.html (original)
+++ websites/production/struts/content/docs/i18n-interceptor.html Tue Aug 25
07:18:20 2015
@@ -138,19 +138,49 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><div class="error"><span
class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+ <div id="ConfluenceContent"><p>
+An interceptor that handles setting the locale specified in a session as the
locale for the current action request.
+In addition, this interceptor will look for a specific HTTP request parameter
and set the locale to whatever value is
+provided. This means that this interceptor can be used to allow for your
application to dynamically change the locale
+for the user's session or, alternatively, only for the current request (since
XWork 2.1.3).
+This is very useful for applications that require multi-lingual support and
want the user to
+be able to set his or her language preference at any point. The locale
parameter is removed during the execution of
+this interceptor, ensuring that properties aren't set on an action (such as
request_locale) that have no typical
+corresponding setter in your action.
+</p>
+
+<p></p><p>
+For example, using the default parameter name, a request to
<b>foo.action?request_locale=en_US</b>, then the
+locale for US English is saved in the user's session and will be used for all
future requests.
+If there is no locale set (for example with the first visit), the interceptor
uses the browser locale.
+</p>
+
<h2 id="I18nInterceptor-Parameters">Parameters</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+
+<p></p><ul><li>parameterName (optional) - the name of the HTTP request
parameter that dictates the locale to switch to and save
+in the session. By default this is
<b>request_locale</b></li><li>requestOnlyParameterName (optional) - the name of
the HTTP request parameter that dictates the locale to switch to
+for the current request only, without saving it in the session. By default
this is <b>request_only_locale</b></li><li>attributeName (optional) - the name
of the session key to store the selected locale. By default this is
+<b>WW_TRANS_I18N_LOCALE</b></li></ul>
<h2 id="I18nInterceptor-ExtendingtheInterceptor">Extending the Interceptor</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p></p><p>
+There are no known extensions points for this interceptor.
+</p>
<h2 id="I18nInterceptor-Examples">Examples</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+<action name="someAction"
class="com.examples.SomeAction">
+ <interceptor-ref name="i18n"/>
+ <interceptor-ref name="basicStack"/>
+ <result name="success">good_result.ftl</result>
+</action>
+]]></script>
+</div></div></div>
</div>
Modified: websites/production/struts/content/docs/inputconfig-annotation.html
==============================================================================
--- websites/production/struts/content/docs/inputconfig-annotation.html
(original)
+++ websites/production/struts/content/docs/inputconfig-annotation.html Tue Aug
25 07:18:20 2015
@@ -140,19 +140,39 @@ under the License.
<div class="wiki-content">
<div id="ConfluenceContent"><h1
id="InputConfigAnnotation-InputConfigAnnotation">InputConfig Annotation</h1>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p>Marks a action method that if it's not validated by ValidationInterceptor
then execute input method or input result.</p>
<h2 id="InputConfigAnnotation-Usage">Usage</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p>The InputConfig annotation can be applied at method level.</p>
+
<h2 id="InputConfigAnnotation-Parameters">Parameters</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p><table class="confluenceTable" summary=""><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Parameter </th><th colspan="1" rowspan="1"
class="confluenceTh"> Required </th><th colspan="1" rowspan="1"
class="confluenceTh"> Default </th><th colspan="1" rowspan="1"
class="confluenceTh"> Notes </th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">methodName</td><td colspan="1" rowspan="1"
class="confluenceTd">no</td><td colspan="1" rowspan="1"
class="confluenceTd"></td><td colspan="1" rowspan="1"
class="confluenceTd">execute this method if specific</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">resultName</td><td colspan="1"
rowspan="1" class="confluenceTd">no</td><td colspan="1" rowspan="1"
class="confluenceTd"></td><td colspan="1" rowspan="1"
class="confluenceTd">return this result if methodName not
specific</td></tr></table></p>
<h2 id="InputConfigAnnotation-Examples">Examples</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+public class SampleAction extends ActionSupport {
+
+ public void isValid() throws ValidationException {
+ // validate model object, throw exception if failed
+ }
+
+ @InputConfig(methodName="input")
+ public String execute() {
+ // perform action
+ return SUCCESS;
+ }
+ public String input() {
+ // perform some data filling
+ return INPUT;
+ }
+}
+]]></script>
+</div></div></div>
</div>
Modified: websites/production/struts/content/docs/int-validator.html
==============================================================================
--- websites/production/struts/content/docs/int-validator.html (original)
+++ websites/production/struts/content/docs/int-validator.html Tue Aug 25
07:18:20 2015
@@ -139,16 +139,49 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
<div id="ConfluenceContent"><h1
id="intvalidator-Description">Description</h1>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p>Field Validator that checks if the integer specified is within a certain
range.</p>
<h1 id="intvalidator-Parameters">Parameters</h1>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p></p><ul><li>fieldName - The field name this validator is validating.
Required if using Plain-Validator Syntax otherwise not required</li><li>min -
the minimum value (if none is specified, it will not be checked) </li><li>max -
the maximum value (if none is specified, it will not be checked) </li><li>parse
- if set to true, minExpression and maxExpression will be evaluated to find
min/max</li><li>minExpression - expression to calculate the minimum value (if
none is specified, it will not be checked) </li><li>maxExpression - expression
to calculate the maximum value (if none is specified, it will not be checked)
</li></ul>
+
+<p>You can either use the min / max value or minExpression / maxExpression
(when parse is set to true) -
+using expression can be slightly slower, see the example below.</p>
<div class="confluence-information-macro
confluence-information-macro-warning"><p class="title">Warning</p><span
class="aui-icon aui-icon-small aui-iconfont-error
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body">
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span>
</div></div></div>
+<p>Do not use ${minExpression} and ${maxExpression} as an expression as this
will turn into infinitive loop!</p></div></div>
<h1 id="intvalidator-Examples">Examples</h1>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+<validators>
+ <!-- Plain Validator Syntax -->
+ <validator type="int">
+ <param name="fieldName">age</param>
+ <param name="min">20</param>
+ <param name="max">50</param>
+ <message>Age needs to be between ${min} and
${max}</message>
+ </validator>
+
+ <!-- Field Validator Syntax -->
+ <field name="age">
+ <field-validator type="int">
+ <param name="min">20</param>
+ <param name="max">50</param>
+ <message>Age needs to be between ${min} and
${max}</message>
+ </field-validator>
+ </field>
+
+ <!-- Field Validator Syntax with expression -->
+ <field name="age">
+ <field-validator type="int">
+ <param
name="minExpression">${minValue}</param> <!-- will be
evaluated as: Integer getMinValue() -->
+ <param
name="maxExpression">${maxValue}</param> <!-- will be
evaluated as: Integer getMaxValue() -->
+ <message>Age needs to be between ${min} and
${max}</message>
+ </field-validator>
+ </field>
+</validators>
+]]></script>
+</div></div></div>
</div>
Modified: websites/production/struts/content/docs/interceptors.html
==============================================================================
--- websites/production/struts/content/docs/interceptors.html (original)
+++ websites/production/struts/content/docs/interceptors.html Tue Aug 25
07:18:20 2015
@@ -139,11 +139,11 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
<div id="ConfluenceContent"><div
class="confluence-information-macro confluence-information-macro-tip"><span
class="aui-icon aui-icon-small aui-iconfont-approve
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>The default Interceptor stack is
designed to serve the needs of most applications. Most applications will
<strong>not</strong> need to add Interceptors or change the Interceptor
stack.</p></div></div><p>Many Actions share common concerns. Some Actions need
input validated. Other Actions may need a file upload to be pre-processed.
Another Action might need protection from a double submit. Many Actions need
drop-down lists and other controls pre-populated before the page
displays.</p><p>The framework makes it easy to share solutions to these
concerns using an "Interceptor" strategy. When you request a resource that maps
to an "action", the framework invokes the Action object. But, before the Action
is executed, the invocatio
n can be intercepted by another object. After the Action executes, the
invocation could be intercepted again. Unsurprisingly, we call these objects
"Interceptors."</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1438273799898 {padding: 0px;}
-div.rbtoc1438273799898 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1438273799898 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440485997157 {padding: 0px;}
+div.rbtoc1440485997157 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1440485997157 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1438273799898">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440485997157">
<ul class="toc-indentation"><li><a shape="rect"
href="#Interceptors-UnderstandingInterceptors">Understanding
Interceptors</a></li><li><a shape="rect"
href="#Interceptors-ConfiguringInterceptors">Configuring
Interceptors</a></li><li><a shape="rect"
href="#Interceptors-StackingInterceptors">Stacking Interceptors</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#Interceptors-TheDefaultConfiguration">The Default
Configuration</a></li></ul>
</li><li><a shape="rect" href="#Interceptors-FrameworkInterceptors">Framework
Interceptors</a>
@@ -555,7 +555,30 @@ div.rbtoc1438273799898 li {margin-left:
</struts>
]]></script>
-</div></div><p>Since the <code>struts-default.xml</code> is included in the
application's configuration by default, all of the predefined interceptors and
stacks are available "out of the box".</p><h2
id="Interceptors-FrameworkInterceptors">Framework
Interceptors</h2><p>Interceptor classes are also defined using a key-value pair
specified in the Struts configuration file. The names specified below come
specified in <a shape="rect"
href="struts-defaultxml.html">struts-default.xml</a>. If you extend the
<code>struts-default</code> package, then you can use the names below.
Otherwise, they must be defined in your package with a name-class pair
specified in the <interceptors> tag.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Interceptor</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" ro
wspan="1" class="confluenceTd"><p><a shape="rect"
href="alias-interceptor.html">Alias Interceptor</a></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>alias</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Converts similar parameters that may be named
differently between requests.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="chaining-interceptor.html">Chaining Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>chain</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Makes the previous Action's properties
available to the current Action. Commonly used together with <result
type="chain"> (in the previous Action).</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect"
href="checkbox-interceptor.html">Checkbox Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>checkbox</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><
p>Adds automatic checkbox handling code that detect an unchecked checkbox and
add it as a parameter with a default (usually 'false') value. Uses a specially
named hidden field to detect unsubmitted checkboxes. The default unchecked
value is overridable for non-boolean value'd checkboxes.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
href="cookie-interceptor.html">Cookie Interceptor</a></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>cookie</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Inject cookie with a certain configurable name / value
into action. (Since 2.0.7.)</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="cookieprovider-interceptor.html">CookieProvider
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>cookieProvider</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Transfer cookies from action to response (Since
2.3.15.)</p></td></tr
><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
>href="conversion-error-interceptor.html">Conversion Error
>Interceptor</a></p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>conversionError</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Adds conversion errors from the ActionContext to the
>Action's field errors</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><a shape="rect"
>href="create-session-interceptor.html">Create Session
>Interceptor</a></p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>createSession</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Create an HttpSession automatically, useful with
>certain Interceptors that require a HttpSession to work properly (like the
>TokenInterceptor)</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><a shape="rect"
>href="debugginginterceptor.html">DebuggingInterceptor</a></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p>debug
ging</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Provides
several different debugging screens to provide insight into the data behind the
page.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect"
href="deprecationinterceptor.html">DeprecationInterceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>deprecation</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>When devMode is on, logs all
unknown or deprecated settings</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="execute-and-wait-interceptor.html">Execute and Wait
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>execAndWait</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Executes the Action in the background and then sends
the user off to an intermediate waiting page.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect" href="exception-interce
ptor.html">Exception Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>exception</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Maps exceptions to a result.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
href="file-upload-interceptor.html">File Upload Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>fileUpload</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>An Interceptor that adds easy
access to file upload support.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="i18n-interceptor.html">I18n
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>i18n</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Remembers the locale selected for a user's
session.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="logger-interceptor.html">Logger
Interceptor</a></p></td><
td colspan="1" rowspan="1" class="confluenceTd"><p>logger</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Outputs the name of the
Action.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="message-store-interceptor.html">Message Store
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>store</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Store and retrieve action messages / errors / field
errors for action that implements ValidationAware interface into
session.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="model-driven-interceptor.html">Model Driven Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>modelDriven</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If the Action implements
ModelDriven, pushes the <code>getModel</code> Result onto the Value
Stack.</p></td></tr><tr><td colspan="1" rowspan="1" class="conflue
nceTd"><p><a shape="rect" href="scoped-model-driven-interceptor.html">Scoped
Model Driven Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>scopedModelDriven</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>If the Action implements ScopedModelDriven, the
interceptor retrieves and stores the model from a scope and sets it on the
action calling <code>setModel</code>.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect"
href="parameters-interceptor.html">Parameters Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>params</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Sets the request parameters onto the
Action.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="prepare-interceptor.html">Prepare
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>prepare</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>If t
he Action implements Preparable, calls its <code>prepare</code>
method.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="scope-interceptor.html">Scope Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>scope</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Simple mechanism for storing Action state
in the session or application scope.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect"
href="servlet-config-interceptor.html">Servlet Config
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>servletConfig</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Provide access to Maps representing HttpServletRequest
and HttpServletResponse.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="static-parameters-interceptor.html">Static Parameters
Interceptor</a></p></td><td colspan="1" rowspan="1" class="confluence
Td"><p>staticParams</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Sets the <code>struts.xml</code> defined parameters
onto the action. These are the <param> tags that are direct children of
the <action> tag.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="roles-interceptor.html">Roles
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>roles</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Action will only be executed if the user has the
correct JAAS role.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="timer-interceptor.html">Timer
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>timer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Outputs how long the Action takes to execute (including
nested Interceptors and View)</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect
" href="token-interceptor.html">Token Interceptor</a></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>token</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Checks for valid token presence in Action, prevents
duplicate form submission.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="token-session-interceptor.html">Token Session Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>tokenSession</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Same as Token Interceptor, but
stores the submitted data in session when handed an invalid
token</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="validation-interceptor.html">Validation
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>validation</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Performs validation using the validators defined in
<em>action</em>-validatio
n.xml</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="default-workflow-interceptor.html">Default Workflow
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>workflow</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Calls the <code>validate</code> method in your Action
class. If Action errors are created then it returns the <code>INPUT</code>
view.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="parameter-filter-interceptor.html">Parameter Filter
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>N/A</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Removes parameters from the list of those available to
Actions</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="profiling-interceptor.html">Profiling
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>profiling</p></td
><td colspan="1" rowspan="1" class="confluenceTd"><p>Activate profiling
>through parameter</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><a shape="rect"
>href="multiselect-interceptor.html">Multiselect Interceptor</a></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p>multiselect</p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p>Like the checkbox interceptor
>detects that no value was selected for a field with multiple values (like a
>select) and adds an empty parameter</p></td></tr></tbody></table></div><div
>class="confluence-information-macro
>confluence-information-macro-warning"><span class="aui-icon aui-icon-small
>aui-iconfont-error confluence-information-macro-icon"></span><div
>class="confluence-information-macro-body"><p>Since 2.0.7, Interceptors and
>Results with hyphenated names were converted to camelCase. (The former
>model-driven is now modelDriven.) The original hyphenated names are retained
>as "aliases" until Struts 2.1.0. For clarity
, the hyphenated versions are not listed here, but might be referenced in
prior versions of the documentation.</p></div></div><h3
id="Interceptors-MethodFiltering">Method Filtering</h3><div class="error"><span
class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div><h3
id="Interceptors-InterceptorParameterOverriding">Interceptor Parameter
Overriding</h3><p>Interceptor's parameter could be overridden through the
following ways :</p><p><strong>Method 1</strong>:</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Since the <code>struts-default.xml</code> is included in the
application's configuration by default, all of the predefined interceptors and
stacks are available "out of the box".</p><h2
id="Interceptors-FrameworkInterceptors">Framework
Interceptors</h2><p>Interceptor classes are also defined using a key-value pair
specified in the Struts configuration file. The names specified below come
specified in <a shape="rect"
href="struts-defaultxml.html">struts-default.xml</a>. If you extend the
<code>struts-default</code> package, then you can use the names below.
Otherwise, they must be defined in your package with a name-class pair
specified in the <interceptors> tag.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Interceptor</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" ro
wspan="1" class="confluenceTd"><p><a shape="rect"
href="alias-interceptor.html">Alias Interceptor</a></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>alias</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Converts similar parameters that may be named
differently between requests.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="chaining-interceptor.html">Chaining Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>chain</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Makes the previous Action's properties
available to the current Action. Commonly used together with <result
type="chain"> (in the previous Action).</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect"
href="checkbox-interceptor.html">Checkbox Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>checkbox</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><
p>Adds automatic checkbox handling code that detect an unchecked checkbox and
add it as a parameter with a default (usually 'false') value. Uses a specially
named hidden field to detect unsubmitted checkboxes. The default unchecked
value is overridable for non-boolean value'd checkboxes.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
href="cookie-interceptor.html">Cookie Interceptor</a></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>cookie</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Inject cookie with a certain configurable name / value
into action. (Since 2.0.7.)</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="cookieprovider-interceptor.html">CookieProvider
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>cookieProvider</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Transfer cookies from action to response (Since
2.3.15.)</p></td></tr
><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
>href="conversion-error-interceptor.html">Conversion Error
>Interceptor</a></p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>conversionError</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Adds conversion errors from the ActionContext to the
>Action's field errors</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><a shape="rect"
>href="create-session-interceptor.html">Create Session
>Interceptor</a></p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>createSession</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Create an HttpSession automatically, useful with
>certain Interceptors that require a HttpSession to work properly (like the
>TokenInterceptor)</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><a shape="rect"
>href="debugginginterceptor.html">DebuggingInterceptor</a></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p>debug
ging</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Provides
several different debugging screens to provide insight into the data behind the
page.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect"
href="deprecationinterceptor.html">DeprecationInterceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>deprecation</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>When devMode is on, logs all
unknown or deprecated settings</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="execute-and-wait-interceptor.html">Execute and Wait
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>execAndWait</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Executes the Action in the background and then sends
the user off to an intermediate waiting page.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect" href="exception-interce
ptor.html">Exception Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>exception</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Maps exceptions to a result.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
href="file-upload-interceptor.html">File Upload Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>fileUpload</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>An Interceptor that adds easy
access to file upload support.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="i18n-interceptor.html">I18n
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>i18n</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Remembers the locale selected for a user's
session.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="logger-interceptor.html">Logger
Interceptor</a></p></td><
td colspan="1" rowspan="1" class="confluenceTd"><p>logger</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Outputs the name of the
Action.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="message-store-interceptor.html">Message Store
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>store</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Store and retrieve action messages / errors / field
errors for action that implements ValidationAware interface into
session.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="model-driven-interceptor.html">Model Driven Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>modelDriven</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If the Action implements
ModelDriven, pushes the <code>getModel</code> Result onto the Value
Stack.</p></td></tr><tr><td colspan="1" rowspan="1" class="conflue
nceTd"><p><a shape="rect" href="scoped-model-driven-interceptor.html">Scoped
Model Driven Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>scopedModelDriven</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>If the Action implements ScopedModelDriven, the
interceptor retrieves and stores the model from a scope and sets it on the
action calling <code>setModel</code>.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect"
href="parameters-interceptor.html">Parameters Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>params</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Sets the request parameters onto the
Action.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="prepare-interceptor.html">Prepare
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>prepare</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>If t
he Action implements Preparable, calls its <code>prepare</code>
method.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="scope-interceptor.html">Scope Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>scope</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Simple mechanism for storing Action state
in the session or application scope.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect"
href="servlet-config-interceptor.html">Servlet Config
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>servletConfig</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Provide access to Maps representing HttpServletRequest
and HttpServletResponse.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="static-parameters-interceptor.html">Static Parameters
Interceptor</a></p></td><td colspan="1" rowspan="1" class="confluence
Td"><p>staticParams</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Sets the <code>struts.xml</code> defined parameters
onto the action. These are the <param> tags that are direct children of
the <action> tag.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="roles-interceptor.html">Roles
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>roles</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Action will only be executed if the user has the
correct JAAS role.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" href="timer-interceptor.html">Timer
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>timer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Outputs how long the Action takes to execute (including
nested Interceptors and View)</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect
" href="token-interceptor.html">Token Interceptor</a></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>token</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Checks for valid token presence in Action, prevents
duplicate form submission.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect"
href="token-session-interceptor.html">Token Session Interceptor</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>tokenSession</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Same as Token Interceptor, but
stores the submitted data in session when handed an invalid
token</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="validation-interceptor.html">Validation
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>validation</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Performs validation using the validators defined in
<em>action</em>-validatio
n.xml</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="default-workflow-interceptor.html">Default Workflow
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>workflow</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Calls the <code>validate</code> method in your Action
class. If Action errors are created then it returns the <code>INPUT</code>
view.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="parameter-filter-interceptor.html">Parameter Filter
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>N/A</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Removes parameters from the list of those available to
Actions</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
shape="rect" href="profiling-interceptor.html">Profiling
Interceptor</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>profiling</p></td
><td colspan="1" rowspan="1" class="confluenceTd"><p>Activate profiling
>through parameter</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><a shape="rect"
>href="multiselect-interceptor.html">Multiselect Interceptor</a></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p>multiselect</p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p>Like the checkbox interceptor
>detects that no value was selected for a field with multiple values (like a
>select) and adds an empty parameter</p></td></tr></tbody></table></div><div
>class="confluence-information-macro
>confluence-information-macro-warning"><span class="aui-icon aui-icon-small
>aui-iconfont-error confluence-information-macro-icon"></span><div
>class="confluence-information-macro-body"><p>Since 2.0.7, Interceptors and
>Results with hyphenated names were converted to camelCase. (The former
>model-driven is now modelDriven.) The original hyphenated names are retained
>as "aliases" until Struts 2.1.0. For clarity
, the hyphenated versions are not listed here, but might be referenced in
prior versions of the documentation.</p></div></div><h3
id="Interceptors-MethodFiltering">Method Filtering</h3>
+<p></p><p>
+MethodFilterInterceptor is an abstract <code>Interceptor</code> used as
+a base class for interceptors that will filter execution based on method
+names according to specified included/excluded method lists.</p>
+
+<p></p>
+
+<p>Settable parameters are as follows:</p>
+
+<p></p><ul><li>excludeMethods - method names to be excluded from interceptor
processing</li><li>includeMethods - method names to be included in interceptor
processing</li></ul>
+
+<p></p><p></p>
+
+<p><b>NOTE:</b> If method name are available in both includeMethods and
+excludeMethods, it will be considered as an included method:
+includeMethods takes precedence over excludeMethods.</p>
+
+<p></p>
+
+<p>Interceptors that extends this capability include:</p>
+
+<p></p><ul><li>TokenInterceptor</li><li>TokenSessionStoreInterceptor</li><li>DefaultWorkflowInterceptor</li><li>ValidationInterceptor</li></ul>
+<h3 id="Interceptors-InterceptorParameterOverriding">Interceptor Parameter
Overriding</h3><p>Interceptor's parameter could be overridden through the
following ways :</p><p><strong>Method 1</strong>:</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"><action name="myAction" class="myActionClass">
<interceptor-ref name="exception"/>
<interceptor-ref name="alias"/>
Modified:
websites/production/struts/content/docs/intrangefieldvalidator-annotation.html
==============================================================================
---
websites/production/struts/content/docs/intrangefieldvalidator-annotation.html
(original)
+++
websites/production/struts/content/docs/intrangefieldvalidator-annotation.html
Tue Aug 25 07:18:20 2015
@@ -138,19 +138,30 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><div class="error"><span
class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+ <div id="ConfluenceContent"><p>This validator checks that a
numeric field has a value within a specified range.
+If neither min nor max is set, nothing will be done.</p>
<h2 id="IntRangeFieldValidatorAnnotation-Usage">Usage</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p></p><p>The annotation must be applied at method level.</p>
<h2 id="IntRangeFieldValidatorAnnotation-Parameters">Parameters</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p><table class="confluenceTable" summary=""><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Parameter </th><th colspan="1" rowspan="1"
class="confluenceTh"> Required </th><th colspan="1" rowspan="1"
class="confluenceTh"> Default </th><th colspan="1" rowspan="1"
class="confluenceTh"> Notes </th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">message</td><td colspan="1" rowspan="1"
class="confluenceTd">yes</td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd">field error message</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">key</td><td colspan="1" rowspan="1"
class="confluenceTd">no</td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd">i18n key from language specific properties
file.</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">messageParams</td><td colspan="1" rowspan="1"
class="confluenceTd">no</td><td colspan="1" row
span="1" class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd">Additional params to be used to customize message - will
be evaluated against the Value Stack</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">fieldName</td><td colspan="1" rowspan="1"
class="confluenceTd">no</td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">shortCircuit</td><td colspan="1" rowspan="1"
class="confluenceTd">no</td><td colspan="1" rowspan="1"
class="confluenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd">If this validator should be used as
shortCircuit.</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">type</td><td colspan="1" rowspan="1"
class="confluenceTd">yes</td><td colspan="1" rowspan="1"
class="confluenceTd">ValidatorType.FIELD</td><td colspan="1" rowspan="1"
class="confluenceTd">Enum value from Valida
torType. Either FIELD or SIMPLE can be used here.</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> min </td><td colspan="1" rowspan="1"
class="confluenceTd"> no </td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"> Integer property. The minimum the number must
be.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
minExpression </td><td colspan="1" rowspan="1" class="confluenceTd"> no
</td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td
colspan="1" rowspan="1" class="confluenceTd">OGNL expression used to obtain the
minimum the number must be.</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> max </td><td colspan="1" rowspan="1"
class="confluenceTd"> no </td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"> Integer property. The maximum number can be. Can be an
expression.!</td></tr><tr><td colspan="1" rowspan=
"1" class="confluenceTd"> maxExpression </td><td colspan="1" rowspan="1"
class="confluenceTd"> no </td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd">OGNL expression used to obtain the maximum number can
be.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">parse</td><td
colspan="1" rowspan="1" class="confluenceTd">no</td><td colspan="1" rowspan="1"
class="confluenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd">Enable parsing of min/max value.</td></tr></table></p>
+
+<p></p><p>If neither <em>min</em> nor <em>max</em> is set, nothing will be
done.</p>
+
+<p></p><p>The values for min and max must be inserted as String values so that
"0" can be handled as a possible value.</p>
<h2 id="IntRangeFieldValidatorAnnotation-Examples">Examples</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+@IntRangeFieldValidator(message = "Default message", key =
"i18n.key", shortCircuit = true, min = "0", max =
"42")
+
+@IntRangeFieldValidator(message = "Default message", key =
"i18n.key", shortCircuit = true, minExpression =
"${minValue}", maxExpression = "${maxValue}")
+]]></script>
+</div></div></div>
</div>
Modified: websites/production/struts/content/docs/key-annotation.html
==============================================================================
--- websites/production/struts/content/docs/key-annotation.html (original)
+++ websites/production/struts/content/docs/key-annotation.html Tue Aug 25
07:18:20 2015
@@ -138,19 +138,25 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><div class="error"><span
class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+ <div id="ConfluenceContent"><p>Sets the Key for type
conversion.</p>
<h2 id="KeyAnnotation-Usage">Usage</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p></p><p>The Key annotation must be applied at field or method level.</p>
<h2 id="KeyAnnotation-Parameters">Parameters</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p><table summary=""><thead><tr><th colspan="1" rowspan="1">Parameter</th><th
colspan="1" rowspan="1">Required</th><th colspan="1"
rowspan="1">Default</th><th colspan="1"
rowspan="1">Description</th></tr></thead><tbody><tr><td colspan="1"
rowspan="1">value</td><td colspan="1" rowspan="1">no</td><td colspan="1"
rowspan="1">java.lang.Object.class</td><td colspan="1" rowspan="1">The key
property value.</td></tr></tbody></table></p>
<h2 id="KeyAnnotation-Examples">Examples</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+// The key property for User objects within the users collection is the
<code>userName</code> attribute.
+@Key( value = java.lang.Long.class )
+private Map<Long, User> userMap;
+]]></script>
+</div></div></div>
</div>
Modified: websites/production/struts/content/docs/keyproperty-annotation.html
==============================================================================
--- websites/production/struts/content/docs/keyproperty-annotation.html
(original)
+++ websites/production/struts/content/docs/keyproperty-annotation.html Tue Aug
25 07:18:20 2015
@@ -138,19 +138,26 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><div class="error"><span
class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+ <div id="ConfluenceContent"><p>Sets the KeyProperty for type
conversion.</p>
<h2 id="KeyPropertyAnnotation-Usage">Usage</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p></p><p>The KeyProperty annotation must be applied at field or method
level.</p>
+<p>This annotation should be used with Generic types, if the key property of
the key element needs to be specified.</p>
<h2 id="KeyPropertyAnnotation-Parameters">Parameters</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p><table summary=""><thead><tr><th colspan="1" rowspan="1">Parameter</th><th
colspan="1" rowspan="1">Required</th><th colspan="1"
rowspan="1">Default</th><th colspan="1"
rowspan="1">Description</th></tr></thead><tbody><tr><td colspan="1"
rowspan="1">value</td><td colspan="1" rowspan="1">no</td><td colspan="1"
rowspan="1">id</td><td colspan="1" rowspan="1">The key property
value.</td></tr></tbody></table></p>
<h2 id="KeyPropertyAnnotation-Examples">Examples</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+// The key property for User objects within the users collection is the
<code>userName</code> attribute.
+@KeyProperty( value = "userName" )
+protected List<User> users = null;
+]]></script>
+</div></div></div>
</div>
Modified: websites/production/struts/content/docs/localization.html
==============================================================================
--- websites/production/struts/content/docs/localization.html (original)
+++ websites/production/struts/content/docs/localization.html Tue Aug 25
07:18:20 2015
@@ -138,7 +138,21 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><h2
id="Localization-Overview">Overview</h2><p>The framework supports
internationalization (i18n) in the following places:</p><ol><li>the <a
shape="rect" href="ui-tags.html">UI Tags</a></li><li>Messages and Errors from
the <a shape="rect" class="external-link"
href="http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ValidationAware.html">ValidationAware</a>
interface (implemented by <a shape="rect" class="external-link"
href="http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ActionSupport.html">ActionSupport</a>
and <a shape="rect" class="external-link"
href="http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ValidationAwareSupport.html">ValidationAwareSupport</a>)</li><li>Within
action classes that extend <a shape="rect" class="external-link"
href="http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/A
ctionSupport.html">ActionSupport</a> through the getText() method</li></ol><h2
id="Localization-ResourceBundleSearchOrder">Resource Bundle Search
Order</h2><div class="error"><span class="error">Error formatting macro:
snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span>
</div><p>For more, see the LocalizedTextUtil class.</p><div
class="confluence-information-macro confluence-information-macro-tip"><p
class="title">Package hierarchy</p><span class="aui-icon aui-icon-small
aui-iconfont-approve confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><div class="error"><span
class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span>
</div></div></div><h3 id="Localization-Defaultaction'sclass">Default action's
class</h3><p>If you configure action as follow</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+ <div id="ConfluenceContent"><h2
id="Localization-Overview">Overview</h2><p>The framework supports
internationalization (i18n) in the following places:</p><ol><li>the <a
shape="rect" href="ui-tags.html">UI Tags</a></li><li>Messages and Errors from
the <a shape="rect" class="external-link"
href="http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ValidationAware.html">ValidationAware</a>
interface (implemented by <a shape="rect" class="external-link"
href="http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ActionSupport.html">ActionSupport</a>
and <a shape="rect" class="external-link"
href="http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ValidationAwareSupport.html">ValidationAwareSupport</a>)</li><li>Within
action classes that extend <a shape="rect" class="external-link"
href="http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/A
ctionSupport.html">ActionSupport</a> through the getText() method</li></ol><h2
id="Localization-ResourceBundleSearchOrder">Resource Bundle Search
Order</h2><p></p><p>Resource bundles are searched in the following order:</p>
+
+<p></p><ol><li>ActionClass.properties</li><li>Interface.properties (every
interface and sub-interface)</li><li>BaseClass.properties (all the way to
Object.properties)</li><li>ModelDriven's model (if implements ModelDriven), for
the model object repeat from 1</li><li>package.properties (of the directory
where class is located and every parent directory all the way to the root
directory)</li><li>search up the i18n message key hierarchy
itself</li><li>global resource properties</li></ol>
+<p>For more, see the LocalizedTextUtil class.</p><div
class="confluence-information-macro confluence-information-macro-tip"><p
class="title">Package hierarchy</p><span class="aui-icon aui-icon-small
aui-iconfont-approve confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p></p><p>To clarify #5, while
traversing the package hierarchy, Struts 2 will look for a file
package.properties:</p>
+com/<br clear="none">
+  acme/<br clear="none">
+    package.properties<br clear="none">
+    actions/<br clear="none">
+      package.properties<br clear="none">
+      FooAction.java<br clear="none">
+      FooAction.properties<br clear="none">
+<p>
+If FooAction.properties does not exist, com/acme/action/package.properties
will be searched for, if
+not found com/acme/package.properties, if not found com/package.properties,
etc.
+</p></div></div><h3 id="Localization-Defaultaction'sclass">Default action's
class</h3><p>If you configure action as follow</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"><action name="index">
<result>/index.jsp</result>
</action></pre>
@@ -170,7 +184,9 @@ under the License.
]]></script>
</div></div><div class="confluence-information-macro
confluence-information-macro-tip"><span class="aui-icon aui-icon-small
aui-iconfont-approve confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>Internationalizing SiteMesh
decorators is possible, but there are quirks. See <a shape="rect"
href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=33343">SiteMesh
Plugin</a> for more.</p></div></div><h3
id="Localization-UsingtheKeyattributeofUITags">Using the Key attribute of UI
Tags</h3><p>The key attribute of most UI tags can be used to retrieve a message
from a resource bundle:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"><s:textfield key="some.key"
name="textfieldName"/></pre>
-</div></div><h2 id="Localization-I18nInterceptor">I18n
Interceptor</h2><p>Essentially, the i18n Interceptor pushes a locale into the
ActionContext map upon every request. The framework components that support
localization all utilize the ActionContext locale. See <a shape="rect"
href="i18n-interceptor.html">I18n Interceptor</a> for details.</p><h2
id="Localization-GlobalResources(struts.custom.i18n.resources)instruts.properties">Global
Resources (struts.custom.i18n.resources) in
<code>struts.properties</code></h2><div class="error"><span class="error">Error
formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20,
Size: 20</span> </div><h2
id="Localization-FormattingDatesandNumbers">Formatting Dates and
Numbers</h2><p>See <a shape="rect"
href="formatting-dates-and-numbers.html">Formatting Dates and Numbers</a> for
more details and examples.</p><h2
id="Localization-ComparisonwithStruts1">Comparison with Struts 1</h2><p>Struts
1 users should be familiar with the appli
cation.properties resource bundle, where you can put all the messages in the
application that are going to be translated. Struts 2, though, splits the
resource bundles per action or model class, and you may end up with duplicated
messages in those resource bundles. A quick fix for that is to create a file
called ActionSupport.properties in com/opensymphony/xwork2 and put it on your
classpath. This will only work well if all your actions subclass XWork2's
ActionSupport.</p><h2 id="Localization-Next:">Next: <a shape="rect"
href="type-conversion.html">Type Conversion</a></h2></div>
+</div></div><h2 id="Localization-I18nInterceptor">I18n
Interceptor</h2><p>Essentially, the i18n Interceptor pushes a locale into the
ActionContext map upon every request. The framework components that support
localization all utilize the ActionContext locale. See <a shape="rect"
href="i18n-interceptor.html">I18n Interceptor</a> for details.</p><h2
id="Localization-GlobalResources(struts.custom.i18n.resources)instruts.properties">Global
Resources (struts.custom.i18n.resources) in
<code>struts.properties</code></h2><p></p><p>
+A global resource bundle could be specified programmatically, as well as the
locale.
+</p><h2 id="Localization-FormattingDatesandNumbers">Formatting Dates and
Numbers</h2><p>See <a shape="rect"
href="formatting-dates-and-numbers.html">Formatting Dates and Numbers</a> for
more details and examples.</p><h2
id="Localization-ComparisonwithStruts1">Comparison with Struts 1</h2><p>Struts
1 users should be familiar with the application.properties resource bundle,
where you can put all the messages in the application that are going to be
translated. Struts 2, though, splits the resource bundles per action or model
class, and you may end up with duplicated messages in those resource bundles. A
quick fix for that is to create a file called ActionSupport.properties in
com/opensymphony/xwork2 and put it on your classpath. This will only work well
if all your actions subclass XWork2's ActionSupport.</p><h2
id="Localization-Next:">Next: <a shape="rect" href="type-conversion.html">Type
Conversion</a></h2></div>
</div>
Modified: websites/production/struts/content/docs/logger-interceptor.html
==============================================================================
--- websites/production/struts/content/docs/logger-interceptor.html (original)
+++ websites/production/struts/content/docs/logger-interceptor.html Tue Aug 25
07:18:20 2015
@@ -138,19 +138,39 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><div class="error"><span
class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+ <div id="ConfluenceContent"><p>
+This interceptor logs the start and end of the execution an action (in
English-only, not internationalized).
+<br clear="none">
+<b>Note:</b>: This interceptor will log at <tt>INFO</tt> level.
+</p>
<h2 id="LoggerInterceptor-Parameters">Parameters</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p>There are no parameters for this interceptor.</p>
<h2 id="LoggerInterceptor-ExtendingtheInterceptor">Extending the
Interceptor</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+<p>There are no obvious extensions to the existing interceptor.</p>
<h2 id="LoggerInterceptor-Examples">Examples</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+<!-- prints out a message before and after the immediate action execution
-->
+<action name="someAction"
class="com.examples.SomeAction">
+ <interceptor-ref name="completeStack"/>
+ <interceptor-ref name="logger"/>
+ <result name="success">good_result.ftl</result>
+</action>
+
+<!-- prints out a message before any more interceptors continue and after
they have finished -->
+<action name="someAction"
class="com.examples.SomeAction">
+ <interceptor-ref name="logger"/>
+ <interceptor-ref name="completeStack"/>
+ <result name="success">good_result.ftl</result>
+</action>
+]]></script>
+</div></div></div>
</div>
Modified: websites/production/struts/content/docs/migration-tools.html
==============================================================================
--- websites/production/struts/content/docs/migration-tools.html (original)
+++ websites/production/struts/content/docs/migration-tools.html Tue Aug 25
07:18:20 2015
@@ -130,7 +130,7 @@ under the License.
<ul><li>bridge objects to utilize existing s1 resources, and</li><li>utilities
to convert resources to s2 equivalents.</li></ul>
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p><img class="emoticon
emoticon-warning"
src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/warning.png"
data-emoticon-name="warning" alt="(warning)"></p></th><td colspan="1"
rowspan="1" class="confluenceTd"><p> This is a whiteboard describing tools that
volunteers <em>might</em> write, given sufficient interest.
</p></td></tr></tbody></table></div>
+<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p><img class="emoticon
emoticon-warning"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/warning.png"
data-emoticon-name="warning" alt="(warning)"></p></th><td colspan="1"
rowspan="1" class="confluenceTd"><p> This is a whiteboard describing tools that
volunteers <em>might</em> write, given sufficient interest.
</p></td></tr></tbody></table></div>
<h2 id="MigrationTools-DualProcessor,SharedResources">Dual Processor, Shared
Resources</h2>
Modified: websites/production/struts/content/docs/model-driven-interceptor.html
==============================================================================
--- websites/production/struts/content/docs/model-driven-interceptor.html
(original)
+++ websites/production/struts/content/docs/model-driven-interceptor.html Tue
Aug 25 07:18:20 2015
@@ -138,7 +138,16 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><div class="error"><span
class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+ <div id="ConfluenceContent">
+<p>Watches for ModelDriven actions and adds the action's model on to the value
stack.</p>
+
+<p></p><p> <b>Note:</b> The ModelDrivenInterceptor must come before the both
StaticParametersInterceptor and
+ParametersInterceptor if you want the parameters to be applied to the model.
+</p>
+<p> <b>Note:</b> The ModelDrivenInterceptor will only push the model into the
stack when the
+model is not null, else it will be ignored.
+</p>
+
<div class="confluence-information-macro
confluence-information-macro-tip"><span class="aui-icon aui-icon-small
aui-iconfont-approve confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>To create a Model Driven action,
implement the <code>ModelDriven</code> interface by adding a <code>model</code>
property, or at least the accessor.</p>
@@ -153,15 +162,30 @@ under the License.
<h2 id="ModelDrivenInterceptor-Parameters">Parameters</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+
+<p></p><ul></ul><p></p><ul><li>refreshModelBeforeResult - set to true if you
want the model to be refreshed on the value stack after action
+execution and before result execution. The setting is useful if you want to
change the model instance during the
+action execution phase, like when loading it from the data layer. This will
result in getModel() being called at
+least twice.</li></ul><p></p>
+
<h2 id="ModelDrivenInterceptor-ExtendingtheInterceptor">Extending the
Interceptor</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+
+<p>There are no known extension points to this interceptor.</p>
+
<h2 id="ModelDrivenInterceptor-Examples">Examples</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+<action name="someAction"
class="com.examples.SomeAction">
+ <interceptor-ref name="modelDriven"/>
+ <interceptor-ref name="basicStack"/>
+ <result name="success">good_result.ftl</result>
+</action>
+]]></script>
+</div></div></div>
</div>
Modified: websites/production/struts/content/docs/obtain-response.html
==============================================================================
--- websites/production/struts/content/docs/obtain-response.html (original)
+++ websites/production/struts/content/docs/obtain-response.html Tue Aug 25
07:18:20 2015
@@ -151,7 +151,7 @@ under the License.
<h2 id="ObtainResponse-Extensions">Extensions</h2>
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Step </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Branching Action </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> </p></td></tr><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p> 1a </p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p> </p></th></tr><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p> .1 </p></th><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p> 2a </p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p> </p></th></tr><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p> .1
</p></th><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <img class="emoticon emoticon-information"
src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/information.png"
data-emoticon-name="information" alt="(info)">
</p></td></tr></tbody></table></div>
+<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Step </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Branching Action </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> </p></td></tr><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p> 1a </p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p> </p></th></tr><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p> .1 </p></th><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p> 2a </p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p> </p></th></tr><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p> .1
</p></th><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <img class="emoticon emoticon-information"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/information.png"
data-emoticon-name="information" alt="(info)">
</p></td></tr></tbody></table></div>
<hr>
Modified: websites/production/struts/content/docs/one-time-steps.html
==============================================================================
--- websites/production/struts/content/docs/one-time-steps.html (original)
+++ websites/production/struts/content/docs/one-time-steps.html Tue Aug 25
07:18:20 2015
@@ -140,11 +140,11 @@ under the License.
<div class="wiki-content">
<div id="ConfluenceContent"><h1
id="Onetimesteps-Content">Content</h1>
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1438274392589 {padding: 0px;}
-div.rbtoc1438274392589 ul {list-style: none;margin-left: 0px;}
-div.rbtoc1438274392589 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440486633260 {padding: 0px;}
+div.rbtoc1440486633260 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1440486633260 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1438274392589">
+/*]]>*/</style><div class="toc-macro rbtoc1440486633260">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a
shape="rect" href="#Onetimesteps-Content">Content</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1</span> <a
shape="rect" href="#Onetimesteps-Keysandconfiguration">Keys and
configuration</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1.1</span> <a
shape="rect" href="#Onetimesteps-CreateandinstallaSSHkey">Create and install a
SSH key</a></li><li><span class="TOCOutline">1.1.2</span> <a shape="rect"
href="#Onetimesteps-CreateaPGPkey">Create a PGP key</a></li><li><span
class="TOCOutline">1.1.3</span> <a shape="rect"
href="#Onetimesteps-UpdateMavensettingsforourservers">Update Maven settings for
our servers</a></li><li><span class="TOCOutline">1.1.4</span> <a shape="rect"
href="#Onetimesteps-IncreaseMemorySettingsforMaven">Increase Memory Settings
for Maven</a></li></ul>
Modified: websites/production/struts/content/docs/other-resources.html
==============================================================================
--- websites/production/struts/content/docs/other-resources.html (original)
+++ websites/production/struts/content/docs/other-resources.html Tue Aug 25
07:18:20 2015
@@ -131,7 +131,7 @@ under the License.
<h3 id="OtherResources-Books">Books</h3>
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td
colspan="1" rowspan="1" class="confluenceTd"><ul><li><a shape="rect"
class="external-link"
href="http://opensource.atlassian.com/confluence/oss/display/BOOKS/ISBN-1590599039"
rel="nofollow">Practical Apache Struts 2 Web 2.0 Projects</a> (Ian Roughley),
print-only, full-length, available now! <img class="emoticon
emoticon-yellow-star"
src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/star_yellow.png"
data-emoticon-name="yellow-star" alt="(star)"></li><li><a shape="rect"
class="external-link" href="http://www.infoq.com/minibooks/starting-struts2"
rel="nofollow">Starting with Struts 2</a> (Ian Roughley), Free PDF mini-book,
print version also available.</li><li><a shape="rect" class="external-link"
href="http://opensource.atlassian.com/confluence/oss/display/BOOKS/ISBN-1932394532"
rel="nofollow">WebWork in Action book</a> (Patrick Ligh
tbody, Jason Carreira), print only. (<em>Most of WW2 in Action applies to
Struts 2. The Struts 2 package names changed, and we've added some features,
but the fundamentals remain the same.</em>)</li><li><a shape="rect"
class="external-link" href="http://www.manning.com/dbrown/"
rel="nofollow">Struts 2 in Action</a> (Don Brown, Chad Michael Davis, Scott
Stanlick) Some early access chapters available now in PDF.</li><li><a
shape="rect" class="external-link"
href="http://opensource.atlassian.com/confluence/oss/display/BOOKS/ISBN-0980331609"
rel="nofollow">Struts 2 Design and Programming</a> (Bud Kurniawan),
print-only.</li><li><a shape="rect" class="external-link"
href="http://www.packtpub.com/apache-struts-2-web-application-development-beginners-guide/book"
rel="nofollow">Apache Struts 2 Web Application Development</a> (Dave Newton)
+<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td
colspan="1" rowspan="1" class="confluenceTd"><ul><li><a shape="rect"
class="external-link"
href="http://opensource.atlassian.com/confluence/oss/display/BOOKS/ISBN-1590599039"
rel="nofollow">Practical Apache Struts 2 Web 2.0 Projects</a> (Ian Roughley),
print-only, full-length, available now! <img class="emoticon
emoticon-yellow-star"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/star_yellow.png"
data-emoticon-name="yellow-star" alt="(star)"></li><li><a shape="rect"
class="external-link" href="http://www.infoq.com/minibooks/starting-struts2"
rel="nofollow">Starting with Struts 2</a> (Ian Roughley), Free PDF mini-book,
print version also available.</li><li><a shape="rect" class="external-link"
href="http://opensource.atlassian.com/confluence/oss/display/BOOKS/ISBN-1932394532"
rel="nofollow">WebWork in Action book</a> (Patrick Lightbody, Jaso
n Carreira), print only. (<em>Most of WW2 in Action applies to Struts 2. The
Struts 2 package names changed, and we've added some features, but the
fundamentals remain the same.</em>)</li><li><a shape="rect"
class="external-link" href="http://www.manning.com/dbrown/"
rel="nofollow">Struts 2 in Action</a> (Don Brown, Chad Michael Davis, Scott
Stanlick) Some early access chapters available now in PDF.</li><li><a
shape="rect" class="external-link"
href="http://opensource.atlassian.com/confluence/oss/display/BOOKS/ISBN-0980331609"
rel="nofollow">Struts 2 Design and Programming</a> (Bud Kurniawan),
print-only.</li><li><a shape="rect" class="external-link"
href="http://www.packtpub.com/apache-struts-2-web-application-development-beginners-guide/book"
rel="nofollow">Apache Struts 2 Web Application Development</a> (Dave Newton)
<h4 id="OtherResources-ComingSoon">Coming Soon</h4></li><li><a shape="rect"
class="external-link"
href="http://opensource.atlassian.com/confluence/oss/display/BOOKS/ISBN-0071489908"
rel="nofollow">Struts 2: The Complete Reference</a> (James Holmes),
print-only, pre-order only</li></ul>
</td></tr></tbody></table></div>
Modified:
websites/production/struts/content/docs/parameter-filter-interceptor.html
==============================================================================
--- websites/production/struts/content/docs/parameter-filter-interceptor.html
(original)
+++ websites/production/struts/content/docs/parameter-filter-interceptor.html
Tue Aug 25 07:18:20 2015
@@ -138,11 +138,40 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><div class="error"><span
class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+ <div id="ConfluenceContent">
+<p>The Parameter Filter Interceptor blocks parameters from getting
+to the rest of the stack or your action. You can use multiple
+parameter filter interceptors for a given action, so, for example,
+you could use one in your default stack that filtered parameters
+you wanted blocked from every action and those you wanted blocked
+from an individual action you could add an additional interceptor
+for each action.</p>
+
<h2 id="ParameterFilterInterceptor-Parameters">Parameters</h2>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
+
+<p></p><ul><li>allowed - a comma delimited list of parameter prefixes
+ that are allowed to pass to the action</li><li>blocked - a comma delimited
list of parameter prefixes
+that are not allowed to pass to the action</li><li>defaultBlock - boolean
(default to false) whether by
+default a given parameter is blocked. If true, then a parameter
+must have a prefix in the allowed list in order to be able
+to pass to the action
+</li></ul>
+
+<p></p><p>The way parameters are filtered for the least configuration is that
+if a string is in the allowed or blocked lists, then any parameter
+that is a member of the object represented by the parameter is allowed
+or blocked respectively.</p>
+
+<p></p><p>For example, if the parameters are:
+</p><ul><li>blocked:
person,person.address.createDate,personDao</li><li>allowed:
person.address</li><li>defaultBlock: false</li></ul>
+
+<p></p><p>
+The parameters person.name, person.phoneNum etc would be blocked
+because 'person' is in the blocked list. However, person.address.street
+and person.address.city would be allowed because person.address is
+in the allowed list (the longer string determines permissions).</p>
<h2 id="ParameterFilterInterceptor-Example">Example</h2>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">