Author: lukaszlenart
Date: Tue Aug 25 07:57:34 2015
New Revision: 963017
Log:
Updates production
Modified:
websites/production/struts/content/docs/action-configuration.html
websites/production/struts/content/docs/actionmapper.html
websites/production/struts/content/docs/ajax-and-javascript-recipes.html
websites/production/struts/content/docs/basic-validation.html
websites/production/struts/content/docs/building-struts-2-fast-track-release.html
websites/production/struts/content/docs/building-struts-2-normal-release.html
websites/production/struts/content/docs/building-struts-annotations.html
websites/production/struts/content/docs/building-struts-master.html
websites/production/struts/content/docs/cdi-plugin.html
websites/production/struts/content/docs/client-validation.html
websites/production/struts/content/docs/convention-plugin.html
websites/production/struts/content/docs/file-upload.html
websites/production/struts/content/docs/freemarker.html
websites/production/struts/content/docs/interceptors.html
websites/production/struts/content/docs/one-time-steps.html
websites/production/struts/content/docs/redirect-action-result.html
websites/production/struts/content/docs/redirect-result.html
websites/production/struts/content/docs/rest-plugin.html
websites/production/struts/content/docs/sample-announcements.html
websites/production/struts/content/docs/security.html
websites/production/struts/content/docs/stream-result.html
websites/production/struts/content/docs/struts-2-blank-archetype.html
websites/production/struts/content/docs/struts-2-maven-archetypes.html
websites/production/struts/content/docs/struts-2-spring-2-jpa-ajax.html
websites/production/struts/content/docs/struts-next.html
websites/production/struts/content/docs/tiles-2-plugin.html
websites/production/struts/content/docs/type-conversion.html
websites/production/struts/content/docs/using-field-validators.html
websites/production/struts/content/docs/using-freemarker-templates.html
websites/production/struts/content/docs/using-non-field-validators.html
websites/production/struts/content/docs/using-visitor-field-validator.html
websites/production/struts/content/docs/validation.html
websites/production/struts/content/docs/webxml.html
Modified: websites/production/struts/content/docs/action-configuration.html
==============================================================================
--- websites/production/struts/content/docs/action-configuration.html (original)
+++ websites/production/struts/content/docs/action-configuration.html Tue Aug
25 07:57:34 2015
@@ -139,11 +139,11 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
<div id="ConfluenceContent"><p>The action mappings are the basic
"unit-of-work" in the framework. Essentially, the action maps an identifier to
a handler class. When a request matches the action's name, the framework uses
the mapping to determine how to process the request.</p><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1440486140481 {padding: 0px;}
-div.rbtoc1440486140481 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1440486140481 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440488847319 {padding: 0px;}
+div.rbtoc1440488847319 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1440488847319 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1440486140481">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440488847319">
<ul class="toc-indentation"><li><a shape="rect"
href="#ActionConfiguration-ActionMappings">Action Mappings</a></li><li><a
shape="rect" href="#ActionConfiguration-ActionNames">Action
Names</a></li><li><a shape="rect"
href="#ActionConfiguration-ActionMethods">Action Methods</a></li><li><a
shape="rect" href="#ActionConfiguration-WildcardMethod">Wildcard
Method</a></li><li><a shape="rect"
href="#ActionConfiguration-DynamicMethodInvocation">Dynamic Method
Invocation</a></li><li><a shape="rect"
href="#ActionConfiguration-ActionSupportDefault">ActionSupport
Default</a></li><li><a shape="rect"
href="#ActionConfiguration-Post-BackDefault">Post-Back Default</a></li><li><a
shape="rect" href="#ActionConfiguration-ActionDefault">Action Default</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#ActionConfiguration-WildcardDefault">Wildcard Default</a></li></ul>
</li><li><a shape="rect" href="#ActionConfiguration-Next:">Next: Wildcard
Mappings</a></li></ul>
Modified: websites/production/struts/content/docs/actionmapper.html
==============================================================================
--- websites/production/struts/content/docs/actionmapper.html (original)
+++ websites/production/struts/content/docs/actionmapper.html Tue Aug 25
07:57:34 2015
@@ -138,22 +138,18 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486144103 {padding: 0px;}
-div.rbtoc1440486144103 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1440486144103 li {margin-left: 0px;padding-left: 0px;}
+ <div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1440488860740 {padding: 0px;}
+div.rbtoc1440488860740 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1440488860740 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1440486144103">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440488860740">
<ul class="toc-indentation"><li><a shape="rect"
href="#ActionMapper-Description">Description</a></li><li><a shape="rect"
href="#ActionMapper-DefaultActionMapper">DefaultActionMapper</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#ActionMapper-Methodprefix">Method prefix</a></li><li><a shape="rect"
href="#ActionMapper-Actionprefix">Action prefix</a></li></ul>
</li><li><a shape="rect" href="#ActionMapper-CustomActionMapper">Custom
ActionMapper</a></li><li><a shape="rect"
href="#ActionMapper-CompositeActionMapper">CompositeActionMapper</a></li><li><a
shape="rect"
href="#ActionMapper-PrefixBasedActionMapper">PrefixBasedActionMapper</a></li><li><a
shape="rect"
href="#ActionMapper-ActionMapperandActionMappingobjects">ActionMapper and
ActionMapping objects</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#ActionMapper-Customize">Customize</a></li></ul>
-</li><li><a shape="rect" href="#ActionMapper-Next:">Next: Action Proxy &
ActionProxy Factory</a></li></ul>
-</div>
-
-<h2 id="ActionMapper-Description">Description</h2>
-
-<p></p><p>
+</li><li><a shape="rect"
href="#ActionMapper-Next:ActionProxy&ActionProxyFactory">Next: Action Proxy
& ActionProxy Factory</a></li></ul>
+</div><h2 id="ActionMapper-Description">Description</h2><p></p><p></p><p>
The ActionMapper interface provides a mapping between HTTP requests and action
invocation requests and vice-versa.
</p>
@@ -173,12 +169,7 @@ just to determine if a request should be
Just as requests can be mapped from HTTP to an action invocation, the opposite
is true as well.
However, because HTTP requests (when shown in HTTP responses) must be in
String form,
a String is returned rather than an actual request object.
-</p>
-
-<h2 id="ActionMapper-DefaultActionMapper">DefaultActionMapper</h2>
-
-<p>By default, the DefaultActionMapper is used:</p>
-<p></p><p>
+</p><h2 id="ActionMapper-DefaultActionMapper">DefaultActionMapper</h2><p>By
default, the DefaultActionMapper is used:</p><p></p><p>
Default action mapper implementation, using the standard *.[ext] (where ext
usually "action") pattern. The extension is looked up from the Struts
configuration key <b>struts.action.extension</b>.
@@ -198,19 +189,14 @@ In addition to these four prefixes, this
action naming pattern of <i>foo!bar</i> in either the extension form (eg:
foo!bar.action) or in the prefix form (eg: action:foo!bar). This syntax tells
this mapper to map to the action named <i>foo</i> and the method <i>bar</i>.
-</p>
-
-<h3 id="ActionMapper-Methodprefix">Method prefix</h3>
-
-<p></p><p>
+</p><h3 id="ActionMapper-Methodprefix">Method prefix</h3><p></p><p></p><p>
With method-prefix, instead of calling baz action's execute() method (by
default if it isn't overriden in struts.xml to be something else), the baz
action's anotherMethod() will be called. A very elegant way determine which
button is clicked. Alternatively, one would have submit button set a
particular value on the action when clicked, and the execute() method decides
on what to do with the setted value depending on which button is clicked.
-</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</p><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[
<s:form action="baz">
<s:textfield label="Enter your name"
name="person.name"/>
@@ -218,17 +204,12 @@ on what to do with the setted value depe
<s:submit method="anotherMethod" value="Cancel"/>
</s:form>
]]></script>
-</div></div>
-
-<h3 id="ActionMapper-Actionprefix">Action prefix</h3>
-
-<p></p><p>
+</div></div><h3 id="ActionMapper-Actionprefix">Action
prefix</h3><p></p><p></p><p>
With action-prefix, instead of executing baz action's execute() method (by
default if it isn't overridden in struts.xml to be something else), the
anotherAction action's execute() method (assuming again if it isn't overridden
with something else in struts.xml) will be executed.
-</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</p><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[
<s:form action="baz">
<s:textfield label="Enter your name"
name="person.name"/>
@@ -236,47 +217,19 @@ with something else in struts.xml) will
<s:submit action="anotherAction" value="Cancel"/>
</s:form>
]]></script>
-</div></div>
-
-<h2 id="ActionMapper-CustomActionMapper">Custom ActionMapper</h2>
-
-<p>You can define your own ActionMapper by implementing
<code>org.apache.struts2.dispatcher.mapper.ActionMapper</code> then configuring
Struts 2 to use the new class in struts.xml</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;">
-<bean type="org.apache.struts2.dispatcher.mapper.ActionMapper"
name="mymapper" class="com.mycompany.myapp.MyActionMapper" />
+</div></div><h2 id="ActionMapper-CustomActionMapper">Custom
ActionMapper</h2><p>You can define your own ActionMapper by implementing
<code>org.apache.struts2.dispatcher.mapper.ActionMapper</code> then configuring
Struts 2 to use the new class in struts.xml</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;"><bean
type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="mymapper"
class="com.mycompany.myapp.MyActionMapper" />
<constant name="struts.mapper.class" value="mymapper" />
</pre>
-</div></div>
-
-<p>Possible uses of the ActionMapper include defining your own, cleaner
namespaces, such as URLs like <strong>/person/1</strong>, which would be
similar to a request to <strong>/getPerson.action?personID=1</strong> using the
DefaultActionMapper.</p>
-
-<h2 id="ActionMapper-CompositeActionMapper">CompositeActionMapper</h2>
-
-<p>A composite action mapper that is capable of delegating to a series of <a
shape="rect" href="actionmapper.html">ActionMapper</a> if the former failed to
obtained a valid <a shape="rect" class="createlink"
href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&title=ActionMapping&linkCreation=true&fromPageId=14128">ActionMapping</a>
or uri.</p>
-
-<p>It is configured through <a shape="rect"
href="strutsxml.html">struts.xml</a>. For example, with the following entries
in struts.xml</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;">
-<constant name="struts.mapper.class" value="composite" />
+</div></div><p>Possible uses of the ActionMapper include defining your own,
cleaner namespaces, such as URLs like <strong>/person/1</strong>, which would
be similar to a request to <strong>/getPerson.action?personID=1</strong> using
the DefaultActionMapper.</p><h2
id="ActionMapper-CompositeActionMapper">CompositeActionMapper</h2><p>A
composite action mapper that is capable of delegating to a series of <a
shape="rect" href="actionmapper.html">ActionMapper</a> if the former failed to
obtained a valid <a shape="rect" class="createlink"
href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&title=ActionMapping&linkCreation=true&fromPageId=14128">ActionMapping</a>
or uri.</p><p>It is configured through <a shape="rect"
href="strutsxml.html">struts.xml</a>. For example, with the following entries
in struts.xml</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;"><constant name="struts.mapper.class"
value="composite" />
<constant name="struts.mapper.composite" value="struts,restful,restful2"
/>
</pre>
-</div></div>
-
-<p>When <code>CompositeActionMapper#getMapping(HttpServletRequest,
ConfigurationManager)</code> or
<code>CompositeActionMapper#getUriFromActionMapping(ActionMapping)</code> is
invoked, <code>CompositeActionMapper</code> would go through these <a
shape="rect" href="actionmapper.html">ActionMapper</a>s in sequence starting
from <a shape="rect" href="actionmapper.html">ActionMapper</a> identified by
<code>struts.mapper.composite.1</code>, followed by
<code>struts.mapper.composite.2</code> and finally
<code>struts.mapper.composite.3</code> (in this case) until either one of the
<a shape="rect" href="actionmapper.html">ActionMapper</a> return a valid result
(not null) or it runs out of <a shape="rect"
href="actionmapper.html">ActionMapper</a> in which case it will just return
null for both <code>CompositeActionMapper#getMapping(HttpServletRequest,
ConfigurationManager)</code> and
<code>CompositeActionMapper#getUriFromActionMapping(ActionMapping)</code>
methods.</p>
-
-<p>For example with the following in struts.xml:</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;">
-<constant name="struts.mapper.class" value="composite" />
+</div></div><p>When <code>CompositeActionMapper#getMapping(HttpServletRequest,
ConfigurationManager)</code> or
<code>CompositeActionMapper#getUriFromActionMapping(ActionMapping)</code> is
invoked, <code>CompositeActionMapper</code> would go through these <a
shape="rect" href="actionmapper.html">ActionMapper</a>s in sequence starting
from <a shape="rect" href="actionmapper.html">ActionMapper</a> identified by
<code>struts.mapper.composite.1</code>, followed by
<code>struts.mapper.composite.2</code> and finally
<code>struts.mapper.composite.3</code> (in this case) until either one of the
<a shape="rect" href="actionmapper.html">ActionMapper</a> return a valid result
(not null) or it runs out of <a shape="rect"
href="actionmapper.html">ActionMapper</a> in which case it will just return
null for both <code>CompositeActionMapper#getMapping(HttpServletRequest,
ConfigurationManager)</code> and
<code>CompositeActionMapper#getUriFromActionMapping(ActionMapping)</code>
methods.</p><p>For exam
ple with the following in struts.xml:</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;"><constant name="struts.mapper.class"
value="composite" />
<constant name="struts.mapper.composite" value="struts,restful" />
</pre>
-</div></div>
-
-<p><code>CompositeActionMapper</code> will be configured with 2 ActionMapper,
namely "struts" which is
<code>org.apache.struts2.dispatcher.mapper.DefaultActionMapper</code> and
"restful" which is
<code>org.apache.struts2.dispatcher.mapper.RestfulActionMapperRestfulActionMapper</code>.
<code>CompositeActionMapper</code> would consult each of them in order
described above.</p>
-
-<h2 id="ActionMapper-PrefixBasedActionMapper">PrefixBasedActionMapper</h2>
-<p></p><p>
+</div></div><p><code>CompositeActionMapper</code> will be configured with 2
ActionMapper, namely "struts" which is
<code>org.apache.struts2.dispatcher.mapper.DefaultActionMapper</code> and
"restful" which is
<code>org.apache.struts2.dispatcher.mapper.RestfulActionMapperRestfulActionMapper</code>.
<code>CompositeActionMapper</code> would consult each of them in order
described above.</p><h2
id="ActionMapper-PrefixBasedActionMapper">PrefixBasedActionMapper</h2><p></p><p></p><p>
A prefix based action mapper that is capable of delegating to other
ActionMappers based on the request's prefix.<br clear="none">
It is configured through struts.xml<br clear="none">
For example, with the following entries in struts.properties
@@ -294,29 +247,32 @@ PrefixBasedActionMapper will check each
{@link PrefixBasedActionMapper#getMapping(HttpServletRequest,
ConfigurationManager)} and
PrefixBasedActionMapper#getUriFromActionMapping(ActionMapping) methods.
</p>
+<h4
id="ActionMapper-PrefixBasedActionProxyFactory">PrefixBasedActionProxyFactory</h4><p></p><p></p><p>
+Prefix based factory should be used with
org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper
+to use appropriate com.opensymphony.xwork2.ActionProxyFactory connected with
given
+org.apache.struts2.dispatcher.mapper.ActionMapper
+</p>
+<p></p><p>
+Add below entry to struts.xml to enable the factory:
+</p>
-<h4
id="ActionMapper-PrefixBasedActionProxyFactory">PrefixBasedActionProxyFactory</h4>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
-
-<h2 id="ActionMapper-ActionMapperandActionMappingobjects">ActionMapper and
ActionMapping objects</h2>
-
-<p>The ActionMapper fetches the ActionMapping object corresponding to a given
request. Essentially, the ActionMapping is a data transfer object that collects
together details such as the Action class and method to execute. The mapping is
utilized by the Dispatcher and various user interface components. It is
customizable through <code>struts.mapper.class</code> entry in
<code>struts.properties</code> or <code>struts.xml</code>. Note that the value
of this constant is the name of the bean of the new mapper.</p>
-
-<h3 id="ActionMapper-Customize">Customize</h3>
+<p></p><pre>
+<constant name="struts.actionProxyFactory" value="prefix"/>
+</pre>
-<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>Custom ActionMapper must implement
ActionMapper interface and have a default constructor.</p></div></div>
+<p></p><p>
+The factory will use the same set of patterns as defined with:
+</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;">
-<bean type="org.apache.struts2.dispatcher.mapper.ActionMapper"
name="mymapper" class="com.mycompany.myapp.MyActionMapper" />
+<p></p><pre>
+<constant name="struts.mapper.prefixMapping" value="..."/>
+</pre><h2 id="ActionMapper-ActionMapperandActionMappingobjects">ActionMapper
and ActionMapping objects</h2><p>The ActionMapper fetches the ActionMapping
object corresponding to a given request. Essentially, the ActionMapping is a
data transfer object that collects together details such as the Action class
and method to execute. The mapping is utilized by the Dispatcher and various
user interface components. It is customizable through
<code>struts.mapper.class</code> entry in <code>struts.properties</code> or
<code>struts.xml</code>. Note that the value of this constant is the name of
the bean of the new mapper.</p><h3
id="ActionMapper-Customize">Customize</h3><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>Custom ActionMapper must implement
ActionMapper interface and have a default constructor.</p></div></d
iv><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;"><bean
type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="mymapper"
class="com.mycompany.myapp.MyActionMapper" />
<constant name="struts.mapper.class" value="mymapper" />
</pre>
-</div></div>
-
-<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;">
-public class MyCustomActionMapper implements ActionMapper {
+</div></div><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;">public class MyCustomActionMapper implements
ActionMapper {
public ActionMapping getMapping(HttpServletRequest request,
ConfigurationManager configManager) {
....
@@ -327,11 +283,7 @@ public class MyCustomActionMapper implem
}
}
</pre>
-</div></div>
-
-<p><img class="emoticon emoticon-light-on"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/lightbulb_on.png"
data-emoticon-name="light-on" alt="(lightbulb)"> See also: <a shape="rect"
href="restfulactionmapper.html">RestfulActionMapper</a></p>
-
-<h2 id="ActionMapper-Next:">Next: <a shape="rect"
href="action-proxy-actionproxy-factory.html">Action Proxy & ActionProxy
Factory</a></h2></div>
+</div></div><p><img class="emoticon emoticon-light-on"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/lightbulb_on.png"
data-emoticon-name="light-on" alt="(lightbulb)"> See also: <a shape="rect"
href="restfulactionmapper.html">RestfulActionMapper</a></p><h2
id="ActionMapper-Next:ActionProxy&ActionProxyFactory">Next: <a shape="rect"
href="action-proxy-actionproxy-factory.html">Action Proxy & ActionProxy
Factory</a></h2></div>
</div>
<div class="tabletitle">
Modified:
websites/production/struts/content/docs/ajax-and-javascript-recipes.html
==============================================================================
--- websites/production/struts/content/docs/ajax-and-javascript-recipes.html
(original)
+++ websites/production/struts/content/docs/ajax-and-javascript-recipes.html
Tue Aug 25 07:57:34 2015
@@ -142,11 +142,11 @@ under the License.
<p>The Dojo plugin will be deprecated on Struts 2.1</p></div></div>
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486492139 {padding: 0px;}
-div.rbtoc1440486492139 ul {list-style: none;margin-left: 0px;padding-left:
20px;}
-div.rbtoc1440486492139 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489201239 {padding: 0px;}
+div.rbtoc1440489201239 ul {list-style: none;margin-left: 0px;padding-left:
20px;}
+div.rbtoc1440489201239 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1440486492139">
+/*]]>*/</style><div class="toc-macro rbtoc1440489201239">
<ul class="toc-indentation"><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Common">Common</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Requests">Requests</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Requestistriggeredbyatopic">Request is
triggered by a topic</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Attachedtoanevent">Attached to an
event</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Attachedtoaneventonmultiplesources">Attached to
an event on multiple sources</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Attachedtomultipleeventsonmultiplesources">Attached
to multiple events on multiple sources</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Updatetargetelementwithcontentreturnedfromurl">Update
target element with content returned from url</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Updatemultipletargetelementswithcontentreturnedfromurl">Update
multiple target elements with content returned from url</a></li><li><a
shape="rect"
href="#AjaxandJavaScriptRecipes-Showindicatorwhilerequestisinprogress">Show
indicator while request is
in progress</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Highlightcontentoftargetwithbluecolor,for2seconds">Highlight
content of target with blue color, for 2 seconds</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-ExecuteJavaScriptinthereturnedcontent">Execute
JavaScript in the returned content</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Publishatopicbeforetherequest">Publish a topic
before the request</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Publishatopicaftertherequest">Publish a topic
after the request</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Publishatopiconerror">Publish a topic on
error</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Showafixederrormessageonerror">Show a fixed
error message on error</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Preventarequest">Prevent a
request</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Submitaform(plainform)">Submit a
form (plain form)</a></li><li><a shape="rect"
href="#AjaxandJavaScriptRecipes-Submitaform(usings:formtag)">Submit a form
(using s:form tag)</a></li></ul>
</li><li><a shape="rect" href="#AjaxandJavaScriptRecipes-Div">Div</a>
Modified: websites/production/struts/content/docs/basic-validation.html
==============================================================================
--- websites/production/struts/content/docs/basic-validation.html (original)
+++ websites/production/struts/content/docs/basic-validation.html Tue Aug 25
07:57:34 2015
@@ -138,17 +138,43 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><p>Let's configure a basic validation
workflow, step by step.</p>
-
-<h2 id="BasicValidation-Step1">Step 1</h2>
-
-<p>Create the input form.</p>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
-
-<h2 id="BasicValidation-Step2">Step 2</h2>
+ <div id="ConfluenceContent"><p>Let's configure a basic validation
workflow, step by step.</p><h2 id="BasicValidation-Step1">Step 1</h2><p>Create
the input form.</p><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[
-<p>Create the Action class.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<html>
+<head>
+ <title>Struts2 Showcase - Validation - Basic</title>
+ <s:head/>
+</head>
+
+<body>
+
+<div class="page-header">
+ <h1>Basic validation Example</h1>
+</div>
+
+<div class="container-fluid">
+ <div class="row">
+ <div class="col-md-12">
+
+ <p>
+ <b>What is your favorite color?</b>
+
+ <p/>
+
+ <s:form method="post">
+ <s:textfield label="Name"
name="name"/>
+ <s:textfield label="Age"
name="age"/>
+ <s:textfield label="Favorite
color" name="answer"/>
+ <s:submit cssClass="btn
btn-primary"/>
+ </s:form>
+ </div>
+ </div>
+</div>
+</body>
+</html>
+]]></script>
+</div></div><h2 id="BasicValidation-Step2">Step 2</h2><p>Create the Action
class.</p><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 QuizAction extends ActionSupport {
@@ -185,12 +211,7 @@ public class QuizAction extends ActionSu
}
]]></script>
-</div></div>
-
-<h2 id="BasicValidation-Step3">Step 3</h2>
-
-<p>Create the validators. The <code>validation.xml</code> format is either
<code><ActionClassName>-validation.xml</code> or
<code><ActionClassName>-<ActionAliasName>-validation.xml</code>.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><h2 id="BasicValidation-Step3">Step 3</h2><p>Create the
validators. The <code>validation.xml</code> format is either
<code><ActionClassName>-validation.xml</code> or
<code><ActionClassName>-<ActionAliasName>-validation.xml</code>.</p><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[
<!--
Add the following DOCTYPE declaration as first line of your
XXX-validation.xml file:
@@ -212,22 +233,14 @@ public class QuizAction extends ActionSu
</validators>
]]></script>
-</div></div>
-
-<h2 id="BasicValidation-Step4">Step 4</h2>
-
-<p>Make sure there is a result for "input" listed in the struts.xml for when
the validation fails:</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="HelloWorld" class="tutorial.HelloWorld">
+</div></div><h2 id="BasicValidation-Step4">Step 4</h2><p>Make sure there is a
result for "input" listed in the struts.xml for when the validation
fails:</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="HelloWorld"
class="tutorial.HelloWorld">
<result name="success">/tutorial/createconfirm.jsp</result>
<result name="error">/tutorial/error.jsp</result>
<result name="input">/tutorial/create.jsp</result>
</action>
</pre>
-</div></div>
-
-<p>If you don't have this, you'll get a: "No result defined for action
xxx.xxx.tutorial.HellowWorld and result input" error </p></div>
+</div></div><p>If you don't have this, you'll get a: "No result defined for
action xxx.xxx.tutorial.HellowWorld and result input" error</p></div>
</div>
Modified:
websites/production/struts/content/docs/building-struts-2-fast-track-release.html
==============================================================================
---
websites/production/struts/content/docs/building-struts-2-fast-track-release.html
(original)
+++
websites/production/struts/content/docs/building-struts-2-fast-track-release.html
Tue Aug 25 07:57:34 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-warning"><span
class="aui-icon aui-icon-small aui-iconfont-error
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>This version is outdated!
Work-in-progress!</p></div></div><h1
id="BuildingStruts2-Fasttrackrelease-Content">Content</h1><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1440486640358 {padding: 0px;}
-div.rbtoc1440486640358 ul {list-style: none;margin-left: 0px;}
-div.rbtoc1440486640358 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489354904 {padding: 0px;}
+div.rbtoc1440489354904 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1440489354904 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1440486640358">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440489354904">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a
shape="rect"
href="#BuildingStruts2-Fasttrackrelease-BuildingSteps(Struts)">Building Steps
(Struts)</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1</span> <a
shape="rect" href="#BuildingStruts2-Fasttrackrelease-Gettingready">Getting
ready</a></li><li><span class="TOCOutline">1.2</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Updateversionofarchetypes">Update
version of archetypes</a></li><li><span class="TOCOutline">1.3</span> <a
shape="rect" href="#BuildingStruts2-Fasttrackrelease-Applysecuritypatch">Apply
security patch</a></li><li><span class="TOCOutline">1.4</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Preparerelease">Prepare
release</a></li><li><span class="TOCOutline">1.5</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Performtherelease">Perform the
release</a></li><li><span class="TOCOutline">1.6</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Movetheassembliestothe/www/people.apache.org/builds/struts/$VERSIONdir">Move
the assemblies to the /www/people.apache.org/builds/struts/$VERSION
dir</a></li>
<li><span class="TOCOutline">1.7</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Jirastuff">Jira stuff</a></li><li><span
class="TOCOutline">1.8</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Voteonit">Vote on it</a></li><li><span
class="TOCOutline">1.9</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Copyfiles">Copy files</a></li><li><span
class="TOCOutline">1.10</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Promoterelease">Promote
release</a></li><li><span class="TOCOutline">1.11</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Cleanupoldreleases">Clean up old
releases</a></li><li><span class="TOCOutline">1.12</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Waitforrsync">Wait for
rsync</a></li><li><span class="TOCOutline">1.13</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-(Optional)-UpdateSecurityBulletins">(Optional)
- Update Security Bulletins</a></li><li><span class="TOCOu
tline">1.14</span> <a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Updatesite(Strutstoplevelsite)">Update
site (Struts top level site)</a></li><li><span class="TOCOutline">1.15</span>
<a shape="rect"
href="#BuildingStruts2-Fasttrackrelease-Updatesite(Struts2site)">Update site
(Struts 2 site)</a></li><li><span class="TOCOutline">1.16</span> <a
shape="rect" href="#BuildingStruts2-Fasttrackrelease-Postannouncements">Post
announcements</a></li></ul>
</li></ul>
Modified:
websites/production/struts/content/docs/building-struts-2-normal-release.html
==============================================================================
---
websites/production/struts/content/docs/building-struts-2-normal-release.html
(original)
+++
websites/production/struts/content/docs/building-struts-2-normal-release.html
Tue Aug 25 07:57:34 2015
@@ -139,11 +139,11 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
<div id="ConfluenceContent"><h1
id="BuildingStruts2-Normalrelease-Content">Content</h1><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1440486639213 {padding: 0px;}
-div.rbtoc1440486639213 ul {list-style: none;margin-left: 0px;}
-div.rbtoc1440486639213 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489353613 {padding: 0px;}
+div.rbtoc1440489353613 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1440489353613 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1440486639213">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440489353613">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a
shape="rect" href="#BuildingStruts2-Normalrelease-Gettingready">Getting
ready</a></li><li><span class="TOCOutline">2</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-UpdateDraftDocswhenneeded">Update Draft
Docs when needed</a></li><li><span class="TOCOutline">3</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Besureyourlocalcopyisup-to-date">Be sure
your local copy is up-to-date</a></li><li><span class="TOCOutline">4</span> <a
shape="rect" href="#BuildingStruts2-Normalrelease-Createareleasebranch">Create
a release branch</a></li><li><span class="TOCOutline">5</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Preparerelease">Prepare
release</a></li><li><span class="TOCOutline">6</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Performtherelease">Perform the
release</a></li><li><span class="TOCOutline">7</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Movetheasse
mblies">Move the assemblies</a></li><li><span class="TOCOutline">8</span> <a
shape="rect"
href="#BuildingStruts2-Normalrelease-Announceavailability">Announce
availability</a></li><li><span class="TOCOutline">9</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Cleanuprepository">Clean up
repository</a></li><li><span class="TOCOutline">10</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Voteonit">Vote on it</a></li><li><span
class="TOCOutline">11</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Copyfiles">Copy files</a></li><li><span
class="TOCOutline">12</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Promoterelease">Promote
release</a></li><li><span class="TOCOutline">13</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Cleanupoldreleases">Clean up old
releases</a></li><li><span class="TOCOutline">14</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Waitforrsync">Wait for
rsync</a></li><li><span class="TOCOutline">15</s
pan> <a shape="rect" href="#BuildingStruts2-Normalrelease-Updatesite">Update
site</a></li><li><span class="TOCOutline">16</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Redeploythedocs(Optional)">Redeploy the
docs (Optional)</a></li><li><span class="TOCOutline">17</span> <a shape="rect"
href="#BuildingStruts2-Normalrelease-Postannouncements">Post
announcements</a></li></ul>
</div><h2 id="BuildingStruts2-Normalrelease-BuildingSteps(Struts)">Building
Steps (Struts)</h2><h3 id="BuildingStruts2-Normalrelease-Gettingready">Getting
ready</h3><ol><li>Create an "Struts 2.x.y omnibus ticket" ticket in JIRA to
refer to in upcoming release related commit comments and for general
documentation purposes. Mark it with priority "Blocker".</li><li>Switch to
branch <code>develop</code></li><li>Ensure that the master POM and Struts
Annotations have current releases</li><li>Review JIRA for any issues without a
fix version set, and for any issues that should be resolved for the pending
release.</li><li>Ensure that there are no repositories or pluginRepositories
listed in the poms.</li><li>If you have committed all changes regarding the
release process, close the omnibus ticket as it is the last open ticket for the
upcoming release</li><li>Release the upcoming version in JIRA (under
Administration/Manage Releases) and tag the release date</li><li>Add next
milestone ve
rsion to the JIRA roadmap</li><li>Create DONE and TODO filters for the new
version, share with all, and remove obsolete TODO filter</li><li>Create a new
Version Notes page in Confluence, link from <a shape="rect"
href="migration-guide.html">Migration Guide</a>, and link to prior release page
and JIRA DONE filters of the version to release</li><li>Export wiki pages and
put them under <code>/docs</code></li></ol><h3
id="BuildingStruts2-Normalrelease-UpdateDraftDocswhenneeded">Update Draft Docs
when needed</h3><p>Checkout <code>struts-site</code> project (see details
at the bottom of this page) and perform export:</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;">cd struts-site
Modified:
websites/production/struts/content/docs/building-struts-annotations.html
==============================================================================
--- websites/production/struts/content/docs/building-struts-annotations.html
(original)
+++ websites/production/struts/content/docs/building-struts-annotations.html
Tue Aug 25 07:57:34 2015
@@ -140,11 +140,11 @@ under the License.
<div class="wiki-content">
<div id="ConfluenceContent"><h1
id="BuildingStrutsAnnotations-Content">Content</h1>
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486635445 {padding: 0px;}
-div.rbtoc1440486635445 ul {list-style: none;margin-left: 0px;}
-div.rbtoc1440486635445 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489348319 {padding: 0px;}
+div.rbtoc1440489348319 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1440489348319 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1440486635445">
+/*]]>*/</style><div class="toc-macro rbtoc1440489348319">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a
shape="rect" href="#BuildingStrutsAnnotations-Content">Content</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1</span> <a
shape="rect"
href="#BuildingStrutsAnnotations-BuildingSteps(StrutsAnnotations)">Building
Steps (Struts Annotations)</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1.1</span> <a
shape="rect"
href="#BuildingStrutsAnnotations-Obtainafreshcheckoutofstrutsannotations">Obtain
a fresh check out of struts annotations</a></li><li><span
class="TOCOutline">1.1.2</span> <a shape="rect"
href="#BuildingStrutsAnnotations-Preparerelease">Prepare
release</a></li><li><span class="TOCOutline">1.1.3</span> <a shape="rect"
href="#BuildingStrutsAnnotations-Performrelease">Perform
release</a></li><li><span class="TOCOutline">1.1.4</span> <a shape="rect"
href="#BuildingStrutsAnnotations-SendaVOTEemail">Send a VOTE
email</a></li><li><span class="TOCOutline">1.1.5</span> <a shape="rect"
href="#BuildingStrutsAnnotations-Promoterelease">Promote release</a></li></ul>
Modified: websites/production/struts/content/docs/building-struts-master.html
==============================================================================
--- websites/production/struts/content/docs/building-struts-master.html
(original)
+++ websites/production/struts/content/docs/building-struts-master.html Tue Aug
25 07:57:34 2015
@@ -140,11 +140,11 @@ under the License.
<div class="wiki-content">
<div id="ConfluenceContent"><h1
id="BuildingStrutsMaster-Content">Content</h1>
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486652374 {padding: 0px;}
-div.rbtoc1440486652374 ul {list-style: none;margin-left: 0px;}
-div.rbtoc1440486652374 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489362313 {padding: 0px;}
+div.rbtoc1440489362313 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1440489362313 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1440486652374">
+/*]]>*/</style><div class="toc-macro rbtoc1440489362313">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a
shape="rect" href="#BuildingStrutsMaster-BuildingSteps(Struts)">Building Steps
(Struts)</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1</span> <a
shape="rect" href="#BuildingStrutsMaster-Obtainafreshcheckout.">Obtain a fresh
checkout.</a></li><li><span class="TOCOutline">1.2</span> <a shape="rect"
href="#BuildingStrutsMaster-Changesitetarget">Change site
target</a></li><li><span class="TOCOutline">1.3</span> <a shape="rect"
href="#BuildingStrutsMaster-Preparerelease">Prepare release</a></li><li><span
class="TOCOutline">1.4</span> <a shape="rect"
href="#BuildingStrutsMaster-Performtherelease">Perform the
release</a></li><li><span class="TOCOutline">1.5</span> <a shape="rect"
href="#BuildingStrutsMaster-Announceavailability">Announce
availability</a></li><li><span class="TOCOutline">1.6</span> <a shape="rect"
href="#BuildingStrutsMaster-Voteonit">Vote on it</a></li><li><span
class="TOCOutline">1.7</span> <a shape="rect"
href="#BuildingStrutsMaster-Promoterelease">Promote release</a></li><li><span
class="TOCOutline">1.8</span> <a shape="rect" href="#BuildingS
trutsMaster-Waitforrsync">Wait for rsync</a></li><li><span
class="TOCOutline">1.9</span> <a shape="rect"
href="#BuildingStrutsMaster-Postannouncements">Post announcements</a></li></ul>
</li></ul>
Modified: websites/production/struts/content/docs/cdi-plugin.html
==============================================================================
--- websites/production/struts/content/docs/cdi-plugin.html (original)
+++ websites/production/struts/content/docs/cdi-plugin.html Tue Aug 25 07:57:34
2015
@@ -139,11 +139,11 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
<div id="ConfluenceContent"><style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486658285 {padding: 0px;}
-div.rbtoc1440486658285 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1440486658285 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489369636 {padding: 0px;}
+div.rbtoc1440489369636 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1440489369636 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1440486658285">
+/*]]>*/</style><div class="toc-macro rbtoc1440489369636">
<ul class="toc-indentation"><li><a shape="rect"
href="#CDIPlugin-Overview">Overview</a></li><li><a shape="rect"
href="#CDIPlugin-Setup">Setup</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#CDIPlugin-MavenSetup">Maven Setup</a></li><li><a shape="rect"
href="#CDIPlugin-ManualIntegration">Manual Integration</a></li><li><a
shape="rect" href="#CDIPlugin-Configuration">Configuration</a></li></ul>
</li><li><a shape="rect" href="#CDIPlugin-Usage">Usage</a>
Modified: websites/production/struts/content/docs/client-validation.html
==============================================================================
--- websites/production/struts/content/docs/client-validation.html (original)
+++ websites/production/struts/content/docs/client-validation.html Tue Aug 25
07:57:34 2015
@@ -138,23 +138,40 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><p>Let's create a Client-Side
validation workflow, step by step.</p>
-
-<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)"> The <code>validate</code>
attribute is set to <code>true</code>. </p>
-
-<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)"> Some themes do not support
client-side validation.</p>
-
-<h2 id="ClientValidation-Step1">Step 1</h2>
-
-<p>Create the form.</p>
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
-
-<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)"> This case uses the default
xhtml theme, so the <code><s:head ></code> tag is used to link a style
sheet.</p>
+ <div id="ConfluenceContent"><p>Let's create a Client-Side
validation workflow, step by step.</p><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)"> The <code>validate</code>
attribute is set to <code>true</code>.</p><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)"> Some themes do not support
client-side validation.</p><h2 id="ClientValidation-Step1">Step 1</h2><p>Create
the form.</p><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[
-<h2 id="ClientValidation-Step2">Step 2</h2>
+<html>
+<head>
+ <title>Struts2 Showcase - Validation - Basic</title>
+ <s:head/>
+</head>
+
+<body>
+
+<div class="page-header">
+ <h1>Basic validation Example</h1>
+</div>
+
+<div class="container-fluid">
+ <div class="row">
+ <div class="col-md-12">
+
+
+ <s:form method="post"
validate="true">
+ <s:textfield label="Name"
name="name"/>
+ <s:textfield label="Age"
name="age"/>
+ <s:textfield label="Favorite
color" name="answer"/>
+ <s:submit cssClass="btn
btn-primary"/>
+ </s:form>
+ </div>
+ </div>
+</div>
+</body>
+</html>
-<p>Create the Action class.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+]]></script>
+</div></div><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)"> This case uses the default
xhtml theme, so the <code><s:head ></code> tag is used to link a style
sheet.<h2 id="ClientValidation-Step2">Step 2</h2><p>Create the Action
class.</p><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 QuizAction extends ActionSupport {
@@ -191,12 +208,7 @@ public class QuizAction extends ActionSu
}
]]></script>
-</div></div>
-
-<h3 id="ClientValidation-Step3">Step 3</h3>
-
-<p>Create the <code>validation.xml</code> to configure the validators to be
used.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><h3 id="ClientValidation-Step3">Step 3</h3><p>Create the
<code>validation.xml</code> to configure the validators to be used.</p><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[
<!--
Add the following DOCTYPE declaration as first line of your
XXX-validation.xml file:
@@ -218,27 +230,16 @@ public class QuizAction extends ActionSu
</validators>
]]></script>
-</div></div>
-
-<h3 id="ClientValidation-ActionandNamespace">Action and Namespace</h3>
-<p>A correct action and namespace attributes must be provided to the
<s:form> tag. For example, if the action named "quizClient" is defined in
the "/validation" namespace, the form must be configured as:</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;">
-<s:form method="post" validate="true" action="quizClient"
namespace="/validation">
+</div></div><h3 id="ClientValidation-ActionandNamespace">Action and
Namespace</h3><p>A correct action and namespace attributes must be provided to
the <s:form> tag. For example, if the action named "quizClient" is
defined in the "/validation" namespace, the form must be configured as:</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;"><s:form method="post" validate="true"
action="quizClient" namespace="/validation">
<s:textfield label="Name" name="name"/>
<s:textfield label="Age" name="age"/>
<s:textfield label="Favorite color" name="answer"/>
<s:submit/>
</s:form>
</pre>
-</div></div>
-
-<p>While the following will "work" in the sense that the form will function
correctly, <strong>client-side validation will not</strong>. That is because
Struts must know the exact namespace and action (rather than a URL) to properly
support validation.</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;">
-<s:form method="post" validate="true"
action="/validation/quizClient.action">
+</div></div><p>While the following will "work" in the sense that the form will
function correctly, <strong>client-side validation will not</strong>. That is
because Struts must know the exact namespace and action (rather than a URL) to
properly support validation.</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;"><s:form method="post" validate="true"
action="/validation/quizClient.action">
<s:textfield label="Name" name="name"/>
<s:textfield label="Age" name="age"/>
<s:textfield label="Favorite color" name="answer"/>
Modified: websites/production/struts/content/docs/convention-plugin.html
==============================================================================
--- websites/production/struts/content/docs/convention-plugin.html (original)
+++ websites/production/struts/content/docs/convention-plugin.html Tue Aug 25
07:57:34 2015
@@ -139,11 +139,11 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
<div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486564704 {padding: 0px;}
-div.rbtoc1440486564704 ul {list-style: none;margin-left: 0px;}
-div.rbtoc1440486564704 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489266002 {padding: 0px;}
+div.rbtoc1440489266002 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1440489266002 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1440486564704">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440489266002">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a
shape="rect"
href="#ConventionPlugin-Introduction">Introduction</a></li><li><span
class="TOCOutline">2</span> <a shape="rect"
href="#ConventionPlugin-Setup">Setup</a></li><li><span
class="TOCOutline">3</span> <a shape="rect"
href="#ConventionPlugin-ConvertingaCodebehindbasedapplicationtoConvention">Converting
a Codebehind based application to Convention</a></li><li><span
class="TOCOutline">4</span> <a shape="rect"
href="#ConventionPlugin-Helloworld">Hello world</a></li><li><span
class="TOCOutline">5</span> <a shape="rect"
href="#ConventionPlugin-Codebehindhelloworld">Code behind hello
world</a></li><li><span class="TOCOutline">6</span> <a shape="rect"
href="#ConventionPlugin-Resultsandresultcodes">Results and result
codes</a></li><li><span class="TOCOutline">7</span> <a shape="rect"
href="#ConventionPlugin-Chaining">Chaining</a></li><li><span
class="TOCOutline">8</span> <a shape="rect" href="#ConventionPlugin-XWork
packages">XWork packages</a></li><li><span class="TOCOutline">9</span> <a
shape="rect" href="#ConventionPlugin-Annotationreference">Annotation
reference</a>
<ul class="toc-indentation"><li><span class="TOCOutline">9.1</span> <a
shape="rect" href="#ConventionPlugin-Actionannotation">Action annotation</a>
<ul class="toc-indentation"><li><span class="TOCOutline">9.1.1</span> <a
shape="rect"
href="#ConventionPlugin-Applying@Actionand@Actionsattheclasslevel">Applying
@Action and @Actions at the class level</a></li></ul>
Modified: websites/production/struts/content/docs/file-upload.html
==============================================================================
--- websites/production/struts/content/docs/file-upload.html (original)
+++ websites/production/struts/content/docs/file-upload.html Tue Aug 25
07:57:34 2015
@@ -139,11 +139,11 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
<div id="ConfluenceContent"><p>The Struts 2 framework provides
built-in support for processing file uploads that conform to <a shape="rect"
class="external-link" href="http://www.ietf.org/rfc/rfc1867.txt"
rel="nofollow">RFC 1867</a>, "Form-based File Upload in HTML". When correctly
configured the framework will pass uploaded file(s) into your Action class.
Support for individual and multiple file uploads are provided. When a file is
uploaded it will typically be stored in a temporary directory. Uploaded files
should be processed or moved by your Action class to ensure the data is not
lost. Be aware that servers may have a security policy in place that prohibits
you from writing to directories other than the temporary directory and the
directories that belong to your web application.</p><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1440486534735 {padding: 0px;}
-div.rbtoc1440486534735 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1440486534735 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489248804 {padding: 0px;}
+div.rbtoc1440489248804 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1440489248804 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1440486534735">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440489248804">
<ul class="toc-indentation"><li><a shape="rect"
href="#FileUpload-Dependencies">Dependencies</a></li><li><a shape="rect"
href="#FileUpload-BasicUsage">Basic Usage</a></li><li><a shape="rect"
href="#FileUpload-UploadingMultipleFiles">Uploading Multiple Files</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#FileUpload-UploadingMultipleFilesusingArrays">Uploading Multiple Files
using Arrays</a></li><li><a shape="rect"
href="#FileUpload-UploadingMultipleFilesusingLists">Uploading Multiple Files
using Lists</a></li></ul>
</li><li><a shape="rect" href="#FileUpload-AdvancedConfiguration">Advanced
Configuration</a>
Modified: websites/production/struts/content/docs/freemarker.html
==============================================================================
--- websites/production/struts/content/docs/freemarker.html (original)
+++ websites/production/struts/content/docs/freemarker.html Tue Aug 25 07:57:34
2015
@@ -139,11 +139,11 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
<div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486090739 {padding: 0px;}
-div.rbtoc1440486090739 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1440486090739 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440488800473 {padding: 0px;}
+div.rbtoc1440488800473 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1440488800473 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1440486090739">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440488800473">
<ul class="toc-indentation"><li><a shape="rect"
href="#FreeMarker-GettingStarted">Getting Started</a></li><li><a shape="rect"
href="#FreeMarker-Servlet/JSPScopedObjects">Servlet / JSP Scoped Objects</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#FreeMarker-ApplicationScopeAttribute">Application Scope
Attribute</a></li><li><a shape="rect"
href="#FreeMarker-SessionScopeAttribute">Session Scope Attribute</a></li><li><a
shape="rect" href="#FreeMarker-RequestScopeAttribute">Request Scope
Attribute</a></li><li><a shape="rect"
href="#FreeMarker-RequestParameter">Request Parameter</a></li><li><a
shape="rect" href="#FreeMarker-Contextparameter">Context parameter</a></li></ul>
</li><li><a shape="rect" href="#FreeMarker-TemplateLoading">Template
Loading</a></li><li><a shape="rect"
href="#FreeMarker-VariableResolution">Variable Resolution</a></li><li><a
shape="rect" href="#FreeMarker-TagSupport">Tag Support</a></li><li><a
shape="rect" href="#FreeMarker-TipsandTricks">Tips and Tricks</a>
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:57:34 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.rbtoc1440485997157 {padding: 0px;}
-div.rbtoc1440485997157 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1440485997157 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440488678590 {padding: 0px;}
+div.rbtoc1440488678590 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1440488678590 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1440485997157">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440488678590">
<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>
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:57:34 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.rbtoc1440486633260 {padding: 0px;}
-div.rbtoc1440486633260 ul {list-style: none;margin-left: 0px;}
-div.rbtoc1440486633260 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489346579 {padding: 0px;}
+div.rbtoc1440489346579 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1440489346579 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1440486633260">
+/*]]>*/</style><div class="toc-macro rbtoc1440489346579">
<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/redirect-action-result.html
==============================================================================
--- websites/production/struts/content/docs/redirect-action-result.html
(original)
+++ websites/production/struts/content/docs/redirect-action-result.html Tue Aug
25 07:57:34 2015
@@ -138,21 +138,78 @@ 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 class="confluence-information-macro
confluence-information-macro-note"><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>See <a shape="rect"
href="actionmapper.html">ActionMapper</a> for more details</p></div></div>
-
-<h1 id="RedirectActionResult-Parameters">Parameters</h1>
-
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
-
-<h1 id="RedirectActionResult-Examples">Examples</h1>
-
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
-
-<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;">
-<!--
+ <div id="ConfluenceContent"><p></p><p>
+This result uses the ActionMapper provided by the
+ActionMapperFactory to redirect the browser to a URL that invokes the
+specified action and (optional) namespace. This is better than the
+ServletRedirectResult because it does not require you to encode the
+URL patterns processed by the ActionMapper in to your struts.xml
+configuration files. This means you can change your URL patterns at any point
+and your application will still work. It is strongly recommended that if you
+are redirecting to another action, you use this result rather than the
+standard redirect result.
+</p>
+
+<p></p><p>
+See examples below for an example of how request parameters could be passed
+in.
+</p><div class="confluence-information-macro
confluence-information-macro-note"><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>See <a shape="rect"
href="actionmapper.html">ActionMapper</a> for more details</p></div></div><h1
id="RedirectActionResult-Parameters">Parameters</h1><p>
+</p><p></p><ul><li><b>actionName (default)</b> - The name of the action that
will be
+redirected to.</li><li><b>namespace</b> - Used to determine which namespace
the action is in
+that we're redirecting to. If namespace is null, the default will be the
+current namespace.</li><li><b>suppressEmptyParameters</b> - Optional boolean
(defaults to false) that
+can prevent parameters with no values from being included in the redirect
+URL.</li><li><b>parse</b> - Boolean, true by default. If set to false, the
actionName
+param will not be parsed for Ognl expressions.</li><li><b>anchor</b> -
Optional. Also known as "fragment" or colloquially as
+"hash". You can specify an anchor for a result.</li></ul>
+<h1 id="RedirectActionResult-Examples">Examples</h1><p></p><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[
+<package name="public" extends="struts-default">
+ <action name="login" class="...">
+ <!-- Redirect to another namespace -->
+ <result type="redirectAction">
+ <param name="actionName">dashboard</param>
+ <param name="namespace">/secure</param>
+ </result>
+ </action>
+</package>
+
+<package name="secure" extends="struts-default"
namespace="/secure">
+ <-- Redirect to an action in the same namespace -->
+ <action name="dashboard" class="...">
+ <result>dashboard.jsp</result>
+ <result name="error"
type="redirectAction">error</result>
+ </action>
+
+ <action name="error" class="...">
+ <result>error.jsp</result>
+ </action>
+</package>
+
+<package name="passingRequestParameters"
extends="struts-default"
namespace="/passingRequestParameters">
+ <!-- Pass parameters (reportType, width and height) -->
+ <!--
+ The redirectAction url generated will be :
+
/genReport/generateReport.action?reportType=pie&amp;width=100&amp;height=100#summary
+ -->
+ <action name="gatherReportInfo" class="...">
+ <result name="showReportResult"
type="redirectAction">
+ <param name="actionName">generateReport</param>
+ <param name="namespace">/genReport</param>
+ <param name="reportType">pie</param>
+ <param name="width">100</param>
+ <param name="height">100</param>
+ <param name="empty"></param>
+ <param
name="suppressEmptyParameters">true</param>
+ <param name="anchor">summary</param>
+ </result>
+ </action>
+</package>
+
+
+]]></script>
+</div></div><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;"><!--
Example of "anchor" param usage in conjunction with "redirectAction"
result-type.
Generated URL: /displayReport.action#SUMMARY
Modified: websites/production/struts/content/docs/redirect-result.html
==============================================================================
--- websites/production/struts/content/docs/redirect-result.html (original)
+++ websites/production/struts/content/docs/redirect-result.html Tue Aug 25
07:57:34 2015
@@ -138,19 +138,37 @@ 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>
-
-<h1 id="RedirectResult-Parameters">Parameters</h1>
-
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
-
-<h1 id="RedirectResult-Examples">Examples</h1>
-
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
-
-<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;">
-<package name="passingRequestParameters" extends="struts-default"
namespace="/passingRequestParameters">
+ <div id="ConfluenceContent"><p></p><p>
+Calls the {@link HttpServletResponse#sendRedirect(String) sendRedirect}
+method to the location specified. The response is told to redirect the
+browser to the specified location (a new request from the client). The
+consequence of doing this means that the action (action instance, action
+errors, field errors, etc) that was just executed is lost and no longer
+available. This is because actions are built on a single-thread model. The
+only way to pass data is through the session or with web parameters
+(url?name=value) which can be OGNL expressions.
+</p><h1 id="RedirectResult-Parameters">Parameters</h1><p>
+</p><p></p><ul></ul><p></p><ul><li><b>location (default)</b> - the location to
go to after execution.</li></ul><p></p><ul><li><b>parse</b> - true by default.
If set to false, the location param will
+not be parsed for Ognl expressions.</li></ul><p></p><ul><li><b>anchor</b> -
Optional. Also known as "fragment" or colloquially as
+"hash". You can specify an anchor for a result.</li></ul>
+
+<p></p><p>
+This result follows the same rules from StrutsResultSupport.
+</p>
+<h1 id="RedirectResult-Examples">Examples</h1><p></p><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[
+<!--
+ The redirect URL generated will be:
+ /foo.jsp#FRAGMENT
+-->
+<result name="success" type="redirect">
+ <param name="location">foo.jsp</param>
+ <param name="parse">false</param>
+ <param name="anchor">FRAGMENT</param>
+</result>
+]]></script>
+</div></div><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;"><package name="passingRequestParameters"
extends="struts-default" namespace="/passingRequestParameters">
<-- Pass parameters (reportType, width and height) -->
<!--
The redirect url generated will be - the namespace of current acction will
be appended as location doesn't start with "/":
Modified: websites/production/struts/content/docs/rest-plugin.html
==============================================================================
--- websites/production/struts/content/docs/rest-plugin.html (original)
+++ websites/production/struts/content/docs/rest-plugin.html Tue Aug 25
07:57:34 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-information"><span class="aui-icon aui-icon-small
aui-iconfont-info confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>This plugin is only available with
Struts 2.1.1 or later</p></div></div><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486526369 {padding: 0px;}
-div.rbtoc1440486526369 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1440486526369 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489225220 {padding: 0px;}
+div.rbtoc1440489225220 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1440489225220 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1440486526369">
+/*]]>*/</style></p><div class="toc-macro rbtoc1440489225220">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a
shape="rect" href="#RESTPlugin-Overview">Overview</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1</span> <a
shape="rect" href="#RESTPlugin-Features">Features</a></li><li><span
class="TOCOutline">1.2</span> <a shape="rect"
href="#RESTPlugin-MappingRESTURLstoStruts2Actions">Mapping REST URLs to Struts
2 Actions</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.2.1</span> <a
shape="rect" href="#RESTPlugin-RESTfulURLMappingLogic">RESTful URL Mapping
Logic</a></li></ul>
Modified: websites/production/struts/content/docs/sample-announcements.html
==============================================================================
--- websites/production/struts/content/docs/sample-announcements.html (original)
+++ websites/production/struts/content/docs/sample-announcements.html Tue Aug
25 07:57:34 2015
@@ -127,11 +127,11 @@ under the License.
<div class="wiki-content">
<div id="ConfluenceContent"><h1
id="Sampleannouncements-Content">Content</h1>
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486636390 {padding: 0px;}
-div.rbtoc1440486636390 ul {list-style: none;margin-left: 0px;}
-div.rbtoc1440486636390 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489352374 {padding: 0px;}
+div.rbtoc1440489352374 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1440489352374 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1440486636390">
+/*]]>*/</style><div class="toc-macro rbtoc1440489352374">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a
shape="rect" href="#Sampleannouncements-Content">Content</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1</span> <a
shape="rect"
href="#Sampleannouncements-SampleStrutsAnnotationsRelease/QualityVote">Sample
Struts Annotations Release/Quality Vote</a></li><li><span
class="TOCOutline">1.2</span> <a shape="rect"
href="#Sampleannouncements-SampleTestBuildAnnouncement">Sample Test Build
Announcement</a></li><li><span class="TOCOutline">1.3</span> <a shape="rect"
href="#Sampleannouncements-SampleRelease/QualityVote">Sample Release/Quality
Vote</a></li><li><span class="TOCOutline">1.4</span> <a shape="rect"
href="#Sampleannouncements-SampleReleaseAnnouncement">Sample Release
Announcement</a></li><li><span class="TOCOutline">1.5</span> <a shape="rect"
href="#Sampleannouncements-Fast-TrackinganImportantSecurityRelease">Fast-Tracking
an Important Security Release</a></li></ul>
</li></ul>
Modified: websites/production/struts/content/docs/security.html
==============================================================================
--- websites/production/struts/content/docs/security.html (original)
+++ websites/production/struts/content/docs/security.html Tue Aug 25 07:57:34
2015
@@ -138,12 +138,12 @@ under the License.
<div class="pagecontent">
<div class="wiki-content">
- <div id="ConfluenceContent"><h3
id="Security-/*<![CDATA[*/div.rbtoc1440486694001{padding:0px;}div.rbtoc1440486694001ul{list-style:disc;margin-left:0px;}div.rbtoc1440486694001li{margin-left:0px;padding-left:0px;}/*]]>*/#Security-Securitytips#Security-SecuritytipsRestrictaccesstotheConfigBrow"><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1440486694001 {padding: 0px;}
-div.rbtoc1440486694001 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1440486694001 li {margin-left: 0px;padding-left: 0px;}
+ <div id="ConfluenceContent"><h3
id="Security-/*<![CDATA[*/div.rbtoc1440489401638{padding:0px;}div.rbtoc1440489401638ul{list-style:disc;margin-left:0px;}div.rbtoc1440489401638li{margin-left:0px;padding-left:0px;}/*]]>*/#Security-Securitytips#Security-SecuritytipsRestrictaccesstotheConfigBrow"><style
type="text/css">/*<![CDATA[*/
+div.rbtoc1440489401638 {padding: 0px;}
+div.rbtoc1440489401638 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1440489401638 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></h3><div class="toc-macro rbtoc1440486694001">
+/*]]>*/</style></h3><div class="toc-macro rbtoc1440489401638">
<ul class="toc-indentation"><li><a shape="rect"
href="#Security-"></a></li><li><a shape="rect"
href="#Security-Securitytips">Security tips</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#Security-RestrictaccesstotheConfigBrowser">Restrict access to the Config
Browser</a></li><li><a shape="rect"
href="#Security-Don'tmixdifferentaccesslevelsinthesamenamespace">Don't mix
different access levels in the same namespace</a></li><li><a shape="rect"
href="#Security-NeverexposeJSPfilesdirectly">Never expose JSP files
directly</a></li><li><a shape="rect" href="#Security-DisabledevMode">Disable
devMode</a></li></ul>
</li><li><a shape="rect" href="#Security-Internalsecuritymechanism">Internal
security mechanism</a>
Modified: websites/production/struts/content/docs/stream-result.html
==============================================================================
--- websites/production/struts/content/docs/stream-result.html (original)
+++ websites/production/struts/content/docs/stream-result.html Tue Aug 25
07:57:34 2015
@@ -138,22 +138,28 @@ 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 class="confluence-information-macro
confluence-information-macro-note"><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p> If you are running your app
server under HTTPS and having issues with PDF's or other file streams you
should take a look at <a shape="rect" href="https-and-ie-issues.html">HTTPS and
IE Issues</a></p></div></div>
-
-<h1 id="StreamResult-Parameters">Parameters</h1>
-
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
-
-<h1 id="StreamResult-Examples">Examples</h1>
-
-<h2 id="StreamResult-AnnotationbasedConfiguration">Annotation based
Configuration</h2>
-
-<p>To configure Actions and Results with Annotations you need to activate the
Struts2 <a shape="rect" href="convention-plugin.html">Convention Plugin</a> in
your Struts2 application.</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;">
-package com.mycompany.webapp.actions;
+ <div id="ConfluenceContent"><p></p><p>
+A custom Result type for sending raw data (via an InputStream) directly to the
+HttpServletResponse. Very useful for allowing users to download content.
+</p><div class="confluence-information-macro
confluence-information-macro-note"><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>If you are running your app server
under HTTPS and having issues with PDF's or other file streams you should take
a look at <a shape="rect" href="https-and-ie-issues.html">HTTPS and IE
Issues</a></p></div></div><h1 id="StreamResult-Parameters">Parameters</h1><p>
+</p><p></p><ul></ul><p></p><ul><li><b>contentType</b> - the stream mime-type
as sent to the web browser
+(default =
<code>text/plain</code>).</li></ul><p></p><ul><li><b>contentLength</b> - the
stream length in bytes (the browser displays a
+progress bar).</li></ul><p></p><ul><li><b>contentDisposition</b> - the content
disposition header value for
+specifing the file name (default = <code>inline</code>, values are typically
+<i>attachment;filename="document.pdf"</i>.</li></ul><p></p><ul><li><b>inputName</b>
- the name of the InputStream property from the chained
+action (default =
<code>inputStream</code>).</li></ul><p></p><ul><li><b>bufferSize</b> - the size
of the buffer to copy from input to output
+(default = <code>1024</code>).</li></ul><p></p><ul><li><b>allowCaching</b> if
set to 'false' it will set the headers 'Pragma' and 'Cache-Control'
+to 'no-cahce', and prevent client from caching the content. (default =
<code>true</code>)
+
+<p></p></li><li><b>contentCharSet</b> if set to a string, ';charset=value'
will be added to the
+content-type header, where value is the string set. If set to an expression,
the result
+of evaluating the expression will be used. If not set, then no charset will be
set on
+the header</li></ul>
+
+<p></p><p>These parameters can also be set by exposing a similarly named
getter method on your Action. For example, you can
+provide <code>getContentType()</code> to override that parameter for the
current action.</p>
+<h1 id="StreamResult-Examples">Examples</h1><h2
id="StreamResult-AnnotationbasedConfiguration">Annotation based
Configuration</h2><p>To configure Actions and Results with Annotations you need
to activate the Struts2 <a shape="rect"
href="convention-plugin.html">Convention Plugin</a> in your Struts2
application.</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;">package com.mycompany.webapp.actions;
import java.io.File;
import java.io.FileInputStream;
@@ -203,12 +209,16 @@ public class FileDisplay extends ActionS
}
</pre>
-</div></div>
-
-
-<h2 id="StreamResult-XMLbasedConfiguration">XML based Configuration</h2>
-
-<div class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+</div></div><h2 id="StreamResult-XMLbasedConfiguration">XML based
Configuration</h2><p></p><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[
+<result name="success" type="stream">
+ <param name="contentType">image/jpeg</param>
+ <param name="inputName">imageStream</param>
+ <param
name="contentDisposition">attachment;filename="document.pdf"</param>
+ <param name="bufferSize">1024</param>
+</result>
+]]></script>
+</div></div></div>
</div>
<div class="tabletitle">
Modified: websites/production/struts/content/docs/struts-2-blank-archetype.html
==============================================================================
--- websites/production/struts/content/docs/struts-2-blank-archetype.html
(original)
+++ websites/production/struts/content/docs/struts-2-blank-archetype.html Tue
Aug 25 07:57:34 2015
@@ -149,11 +149,11 @@ under the License.
<p><strong>Contents</strong></p>
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1440486562322 {padding: 0px;}
-div.rbtoc1440486562322 ul {list-style: none;margin-left: 0px;padding-left:
1em;}
-div.rbtoc1440486562322 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1440489278291 {padding: 0px;}
+div.rbtoc1440489278291 ul {list-style: none;margin-left: 0px;padding-left:
1em;}
+div.rbtoc1440489278291 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1440486562322">
+/*]]>*/</style><div class="toc-macro rbtoc1440489278291">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a
shape="rect"
href="#Struts2BlankArchetype-CreatingOurblank-archetypeProject">Creating Our
blank-archetype Project</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1</span> <a
shape="rect" href="#Struts2BlankArchetype-Stagingrepository">Staging
repository</a></li></ul>
</li><li><span class="TOCOutline">2</span> <a shape="rect"
href="#Struts2BlankArchetype-ProjectStructure">Project Structure</a>