Author: lukaszlenart Date: Fri Oct 2 06:46:40 2015 New Revision: 967482 Log: Updates production
Modified: websites/production/struts/content/docs/examples.html websites/production/struts/content/docs/httpheader-result.html websites/production/struts/content/docs/result-configuration.html websites/production/struts/content/docs/struts-next.html websites/production/struts/content/docs/version-notes-25.html websites/production/struts/content/docs/webxml.html Modified: websites/production/struts/content/docs/examples.html ============================================================================== --- websites/production/struts/content/docs/examples.html (original) +++ websites/production/struts/content/docs/examples.html Fri Oct 2 06:46:40 2015 @@ -125,22 +125,7 @@ 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>Struts 2 is based on the WebWork 2 codebase, and so we include links to WW applications here too.</p></div></div> - -<hr> - -<p>Simple HOWTOs</p> - -<ul><li><a shape="rect" href="chat-application.html">Chat Application</a></li><li><a shape="rect" href="simplelogin-with-session.html">SimpleLogin with Session</a></li></ul> - - -<p>Powered with ...</p> - -<ul><li><a shape="rect" class="external-link" href="http://appfuse.dev.java.net" rel="nofollow">AppFuse</a> shows you how to get started <a shape="rect" class="external-link" href="http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuseQuickStart" rel="nofollow">quickly</a> with WebWork, Spring, and Hibernate. - <ul><li><a shape="rect" class="external-link" href="http://equinox.dev.java.net" rel="nofollow">Equinox</a> is a simpler version of AppFuse.</li></ul> - </li><li><a shape="rect" class="external-link" href="http://sourceforge.net/project/showfiles.php?group_id=98634&package_id=149488" rel="nofollow">EclipseWork's example application</a> - Simple CRUD application WW2, Prevayler and Freemarker.</li><li><a shape="rect" class="external-link" href="http://hibernate.org/159.html" rel="nofollow">Hibernate's example application</a></li><li><a shape="rect" class="external-link" href="http://www.i-tao.com/adminapp.html" rel="nofollow">Hibernate's adminapp</a> updated to use WW2.2, Hibernate3.1 and WW's new Spring2 IoC.</li><li><a shape="rect" class="external-link" href="http://www.wiley.com/legacy/compbooks/walnes" rel="nofollow">Petsoar</a></li><li>The current <a shape="rect" class="external-link" href="http://sourceforge.net/projects/quartz/" rel="nofollow">Quartz sample web application</a> also uses WW2.</li></ul></div> + <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>Struts 2 is based on the WebWork 2 codebase, and so we include links to WW applications here too.</p></div></div><hr><p> </p><p>Struts2 Examples Apps</p><ul><li>Examples at <a shape="rect" class="external-link" href="https://github.com/apache/struts-examples" rel="nofollow">Github</a></li><li><a shape="rect" href="struts-2-maven-archetypes.html">Strust2 Quickstart with Maven Archetypes</a></li><li><a shape="rect" class="external-link" href="http://struts.jgeppert.com/struts2-jquery-showcase/index.action" rel="nofollow">Struts2 jQuery Showcase</a></li><li><a shape="rect" class="external-link" href="http://struts.jgeppert.com/struts2-bootstrap-showcase/index.action" rel="nofollow">Struts2 Bootstrap Showcase</a></li ></ul><p>Simple HOWTOs</p><ul><li><a shape="rect" >href="chat-application.html">Chat Application</a></li><li><a shape="rect" >href="simplelogin-with-session.html">SimpleLogin with >Session</a></li></ul><p>Powered with ...</p><ul><li><a shape="rect" >class="external-link" href="http://appfuse.org/display/APF/Home" >rel="nofollow">AppFuse</a> shows you how to get started <a shape="rect" >class="external-link" >href="http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuseQuickStart" >rel="nofollow">quickly</a> with WebWork, Spring, and Hibernate.<ul><li><a >shape="rect" class="external-link" href="http://equinox.dev.java.net" >rel="nofollow">Equinox</a> is a simpler version of >AppFuse.</li></ul></li><li><a shape="rect" class="external-link" >href="http://sourceforge.net/project/showfiles.php?group_id=98634&package_id=149488" > rel="nofollow">EclipseWork's example application</a> - Simple CRUD >application WW2, Prevayler and Freemarker.</li><li><a shape="rect" >class="external-link" href="http://hiber nate.org/159.html" rel="nofollow">Hibernate's example application</a></li><li><a shape="rect" class="external-link" href="http://www.i-tao.com/adminapp.html" rel="nofollow">Hibernate's adminapp</a> updated to use WW2.2, Hibernate3.1 and WW's new Spring2 IoC.</li><li><a shape="rect" class="external-link" href="http://www.wiley.com/legacy/compbooks/walnes" rel="nofollow">Petsoar</a></li><li>The current <a shape="rect" class="external-link" href="http://sourceforge.net/projects/quartz/" rel="nofollow">Quartz sample web application</a> also uses WW2.</li></ul></div> </div> <div class="tabletitle"> Modified: websites/production/struts/content/docs/httpheader-result.html ============================================================================== --- websites/production/struts/content/docs/httpheader-result.html (original) +++ websites/production/struts/content/docs/httpheader-result.html Fri Oct 2 06:46:40 2015 @@ -138,16 +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> - -<h1 id="HttpHeaderResult-Parameters">Parameters</h1> - -<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> - -<h1 id="HttpHeaderResult-Examples">Examples</h1> - -<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div> + <div id="ConfluenceContent"><p></p><p> +A custom Result type for setting HTTP headers and status by optionally evaluating against the ValueStack. +This result can also be used to send an error to the client. All the parameters can be evaluated against the ValueStack. +</p> +<h1 id="HttpHeaderResult-Parameters">Parameters</h1><p> +</p><p></p><ul></ul><p></p><ul><li><b>status</b> - the http servlet response status code that should be set on a response.</li></ul><p></p><ul><li><b>parse</b> - true by default. If set to false, the headers param will not be parsed for Ognl expressions.</li></ul><p></p><ul><li><b>headers</b> - header values.</li></ul><p></p><ul><li><b>error</b> - the http servlet response error code that should be set on a response.</li></ul><p></p><ul><li><b>errorMessage</b> - error message to be set on response if 'error' is set.</li></ul> +<h1 id="HttpHeaderResult-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[ +<result name="success" type="httpheader"> + <param name="status">204</param> + <param name="headers.a">a custom header value</param> + <param name="headers.b">another custom header value</param> +</result> + +<result name="proxyRequired" type="httpheader"> + <param name="error">305</param> + <param name="errorMessage">this action must be accessed through a proxy</param> +</result> +]]></script> +</div></div></div> </div> Modified: websites/production/struts/content/docs/result-configuration.html ============================================================================== --- websites/production/struts/content/docs/result-configuration.html (original) +++ websites/production/struts/content/docs/result-configuration.html Fri Oct 2 06:46:40 2015 @@ -138,145 +138,76 @@ under the License. <div class="pagecontent"> <div class="wiki-content"> - <div id="ConfluenceContent"><p>When an <a shape="rect" href="action.html">Action</a> class method completes, it returns a String. The value of the String is used to select a result element. An action mapping will often have a set of results representing different possible outcomes. A standard set of result tokens are defined by the <code>ActionSupport</code> base class.</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Predefined result names</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> -String SUCCESS = "success"; + <div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/ +div.rbtoc1443767274995 {padding: 0px;} +div.rbtoc1443767274995 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1443767274995 li {margin-left: 0px;padding-left: 0px;} + +/*]]>*/</style></p><div class="toc-macro rbtoc1443767274995"> +<ul class="toc-indentation"><li><a shape="rect" href="#ResultConfiguration-ResultElements">Result Elements</a> +<ul class="toc-indentation"><li><a shape="rect" href="#ResultConfiguration-IntelligentDefaults">Intelligent Defaults</a></li></ul> +</li><li><a shape="rect" href="#ResultConfiguration-GlobalResults">Global Results</a></li><li><a shape="rect" href="#ResultConfiguration-DynamicResults">Dynamic Results</a></li></ul> +</div><p>When an <a shape="rect" href="action.html">action</a> class method completes, it returns a String. The value of the String is used to select a result element. An action mapping will often have a set of results representing different possible outcomes. A standard set of result tokens are defined by the <code>ActionSupport</code> base class.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Predefined result names</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">String SUCCESS = "success"; String NONE = "none"; String ERROR = "error"; String INPUT = "input"; String LOGIN = "login"; </pre> -</div></div> - -<p>Of course, applications can define other result tokens to match specific cases.</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)"> Returning <code><a shape="rect" class="external-link" href="http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/Action.html#NONE">ActionSupport.NONE</a></code> (or <code>null</code>) from an <a shape="rect" href="action.html">Action</a> class method causes the results processing to be skipped. This is useful if the action fully handles the result processing such as writing directly to the HttpServletResponse OutputStream.</p> - -<h2 id="ResultConfiguration-ResultElements">Result Elements</h2> - -<p>The result element has two jobs. First, it provides a logical name. An <code>Action</code> can pass back a token like "success" or "error" without knowing any other implementation details. Second, the result element provides a result type. Most results simply forward to a server page or template, but other <a shape="rect" href="result-types.html">Result Types</a> can be used to do more interesting things.</p> - -<h3 id="ResultConfiguration-IntelligentDefaults">Intelligent Defaults</h3> - -<p>Each package may set a default result type to be used if none is specified in a result element. If one package extends another, the "child" package can set its own default result, or inherit one from the parent.</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Setting a default Result Type</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> -<result-types> +</div></div><p>Of course, applications can define other result tokens to match specific cases.</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)"> Returning <code><a shape="rect" class="external-link" href="http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/Action.html#NONE">ActionSupport.NONE</a></code> (or <code>null</code>) from an <a shape="rect" href="action.html">action</a> class method causes the results processing to be skipped. This is useful if the action fully handles the result processing such as writing directly to the HttpServletResponse OutputStream.</p><h2 id="ResultConfiguration-ResultElements">Result Elements</h2><p>The result element has two jobs. First, it provides a logical name. An <code>Action</code> can pass back a token like "success" or "error" without kn owing any other implementation details. Second, the result element provides a result type. Most results simply forward to a server page or template, but other <a shape="rect" href="result-types.html">Result Types</a> can be used to do more interesting things.</p><h3 id="ResultConfiguration-IntelligentDefaults">Intelligent Defaults</h3><p>Each package may set a default result type to be used if none is specified in a result element. If one package extends another, the "child" package can set its own default result, or inherit one from the parent.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Setting a default Result Type</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"><result-types> <result-type name="dispatcher" default="true" class="org.apache.struts2.dispatcher.ServletDispatcherResult" /> </result-types> </pre> -</div></div> - -<p>If a <code>type</code> attribute is not specified, the framework will use the default <code>dispatcher</code> type, which forwards to another web resource. If the resource is a JavaServer Page, then the container will render it, using its JSP engine.</p> - -<p>Likewise if the <code>name</code> attribute is not specified, the framework will give it the name "success".</p> - -<p>Using these intelligent defaults, the most often used result types also become the simplest.</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Result element without defaults</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"> -<result name="success" type="dispatcher"> +</div></div><p>If a <code>type</code> attribute is not specified, the framework will use the default <code>dispatcher</code> type, which forwards to another web resource. If the resource is a JavaServer Page, then the container will render it, using its JSP engine.</p><p>Likewise if the <code>name</code> attribute is not specified, the framework will give it the name "success".</p><p>Using these intelligent defaults, the most often used result types also become the simplest.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Result element without defaults</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><result name="success" type="dispatcher"> <param name="location">/ThankYou.jsp</param> </result> </pre> -</div></div> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>A Result element using some defaults</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"> -<result> +</div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>A Result element using some defaults</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><result> <param name="location">/ThankYou.jsp</param> </result> </pre> -</div></div> - -<p>The <code>param</code> tag sets a property on the Result object. The most commonly-set property is <code>location</code>, which usually specifies the path to a web resources. The <code>param</code> attribute is another intelligent default.</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Result element using more defaults</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"> -<result>/ThankYou.jsp</result> +</div></div><p>The <code>param</code> tag sets a property on the Result object. The most commonly-set property is <code>location</code>, which usually specifies the path to a web resources. The <code>param</code> attribute is another intelligent default.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Result element using more defaults</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><result>/ThankYou.jsp</result> </pre> -</div></div> - -<p>Mixing results with intelligent defaults with other results makes it easier to see the "critical path".</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Multiple Results</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"> -<action name="Hello"> +</div></div><p>Mixing results with intelligent defaults with other results makes it easier to see the "critical path".</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Multiple Results</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><action name="Hello"> <result>/hello/Result.jsp</result> <result name="error">/hello/Error.jsp</result> <result name="input">/hello/Input.jsp</result> </action> </pre> -</div></div> - -<p>A special 'other' result can be configured by adding a result with name="*". This result will only be selected if no result is found with a matching name.</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>'*' Other Result</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"> -<action name="Hello"> +</div></div><p>A special 'other' result can be configured by adding a result with name="*". This result will only be selected if no result is found with a matching name.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>'*' Other Result</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><action name="Hello"> <result>/hello/Result.jsp</result> <result name="error">/hello/Error.jsp</result> <result name="input">/hello/Input.jsp</result> <result name="*">/hello/Other.jsp</result> </action> </pre> -</div></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)"> The name="*" is <strong>not</strong> a wildcard pattern, it is a special name that is only selected if an exact match is not found.</p> - -<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)"> In most cases if an action returns an unrecognized result name this would be a programming error and should be fixed.</p> - -<h2 id="ResultConfiguration-GlobalResults">Global Results</h2> - -<p>Most often, results are nested with the action element. But some results apply to multiple actions. In a secure application, a client might try to access a page without being authorized, and many actions may need access to a "logon" result.</p> - -<p>If actions need to share results, a set of global results can be defined for each package. The framework will first look for a local result nested in the action. If a local match is not found, then the global results are checked.</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Defining global results</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"> -<global-results> +</div></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)"> The name="*" is <strong>not</strong> a wildcard pattern, it is a special name that is only selected if an exact match is not found.</p><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)"> In most cases if an action returns an unrecognized result name this would be a programming error and should be fixed.</p><h2 id="ResultConfiguration-GlobalResults">Global Results</h2><p>Most often, results are nested with the action element. But some results apply to multiple actions. In a secure application, a client might try to access a page without being authorized, and many actions may n eed access to a "logon" result.</p><p>If actions need to share results, a set of global results can be defined for each package. The framework will first look for a local result nested in the action. If a local match is not found, then the global results are checked.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Defining global results</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><global-results> <result name="error">/Error.jsp</result> <result name="invalid.token">/Error.jsp</result> <result name="login" type="redirectAction">Logon!input</result> </global-results> </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)"> For more about results, see <a shape="rect" href="result-types.html">Result Types</a>.</p> - -<h2 id="ResultConfiguration-DynamicResults">Dynamic Results</h2> - -<p>A result may not be known until execution time. Consider the implementation of a state-machine-based execution flow; the next state might depend on any combination of form input elements, session attributes, user roles, moon phase, etc. In other words, determining the next action, input page, etc. may not be known at configuration time.</p> - -<p>Result values may be retrieved from its corresponding Action implementation by using EL expressions that access the Action's properties, just like the Struts 2 tag libraries. So given the following Action fragment:</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>FragmentAction implementation</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> -private String nextAction; +</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)"> For more about results, see <a shape="rect" href="result-types.html">Result Types</a>.</p><h2 id="ResultConfiguration-DynamicResults">Dynamic Results</h2><p>A result may not be known until execution time. Consider the implementation of a state-machine-based execution flow; the next state might depend on any combination of form input elements, session attributes, user roles, moon phase, etc. In other words, determining the next action, input page, etc. may not be known at configuration time.</p><p>Result values may be retrieved from its corresponding Action implementation by using EL expressions that access the Action's properties, just like the Struts 2 tag libraries. So given the following Action fragment:</p><div class="code panel pdl" style ="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>FragmentAction implementation</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">private String nextAction; public String getNextAction() { return nextAction; } </pre> -</div></div> - -<p>you might define a result like this:</p> - -<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>FragmentAction configuration</b></div><div class="codeContent panelContent pdl"> -<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"> -<action name="fragment" class="FragmentAction"> +</div></div><p>you might define a result like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>FragmentAction configuration</b></div><div class="codeContent panelContent pdl"> +<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><action name="fragment" class="FragmentAction"> <result name="next" type="redirectAction">${nextAction}</result> </action> </pre> -</div></div> - -<p>If a <code>FragmentAction</code> method returns "next" the actual <em>value</em> of that result will be whatever is in <code>FragmentAction</code>'s <code>nextAction</code> property. So <code>nextAction</code> may be computed based on whatever state information necessary then passed at runtime to "next"'s <code>redirectAction</code>.</p> - -<p>See <a shape="rect" href="parameters-in-configuration-results.html">Parameters in configuration results</a> for an expanded discussion.</p></div> +</div></div><p>If a <code>FragmentAction</code> method returns "next" the actual <em>value</em> of that result will be whatever is in <code>FragmentAction</code>'s <code>nextAction</code> property. So <code>nextAction</code> may be computed based on whatever state information necessary then passed at runtime to "next"'s <code>redirectAction</code>.</p><p>See <a shape="rect" href="parameters-in-configuration-results.html">Parameters in configuration results</a> for an expanded discussion.</p></div> </div> Modified: websites/production/struts/content/docs/struts-next.html ============================================================================== --- websites/production/struts/content/docs/struts-next.html (original) +++ websites/production/struts/content/docs/struts-next.html Fri Oct 2 06:46:40 2015 @@ -125,12 +125,12 @@ under the License. <div class="pagecontent"> <div class="wiki-content"> - <div id="ConfluenceContent"><h3 id="StrutsNext-/*<![CDATA[*/div.rbtoc1443119323812{padding:0px;}div.rbtoc1443119323812ul{list-style:disc;margin-left:0px;}div.rbtoc1443119323812li{margin-left:0px;padding-left:0px;}/*]]>*/#StrutsNext-Whatshouldbeimproved/changed#StrutsNext-Whatshouldbeimprove"><style type="text/css">/*<![CDATA[*/ -div.rbtoc1443119323812 {padding: 0px;} -div.rbtoc1443119323812 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1443119323812 li {margin-left: 0px;padding-left: 0px;} + <div id="ConfluenceContent"><h3 id="StrutsNext-/*<![CDATA[*/div.rbtoc1443768301760{padding:0px;}div.rbtoc1443768301760ul{list-style:disc;margin-left:0px;}div.rbtoc1443768301760li{margin-left:0px;padding-left:0px;}/*]]>*/#StrutsNext-Whatshouldbeimproved/changed#StrutsNext-Whatshouldbeimprove"><style type="text/css">/*<![CDATA[*/ +div.rbtoc1443768301760 {padding: 0px;} +div.rbtoc1443768301760 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1443768301760 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></h3><div class="toc-macro rbtoc1443119323812"> +/*]]>*/</style></h3><div class="toc-macro rbtoc1443768301760"> <ul class="toc-indentation"><li><a shape="rect" href="#StrutsNext-"></a></li></ul> <ul><li><a shape="rect" href="#StrutsNext-Whatshouldbeimproved/changed">What should be improved / changed</a></li><li><a shape="rect" href="#StrutsNext-DevelopmentplanofStruts3">Development plan of Struts 3</a> <ul class="toc-indentation"><li><a shape="rect" href="#StrutsNext-M1(akaStruts2.5)">M1 (aka Struts 2.5)</a></li><li><a shape="rect" href="#StrutsNext-M2(alphaStruts3)">M2 (alpha Struts 3)</a></li><li><a shape="rect" href="#StrutsNext-M3(alphaStruts3)">M3 (alpha Struts 3)</a></li><li><a shape="rect" href="#StrutsNext-M4(beta1Struts3)">M4 (beta 1 Struts 3)</a></li></ul> @@ -139,7 +139,7 @@ div.rbtoc1443119323812 li {margin-left: </li><li class="checked" data-inline-task-id="32">Remove deprecated APIs<ol><li>if it cannot be removed, mark to be removed during work on 3.0</li></ol></li><li class="checked" data-inline-task-id="33">Switch to Java 7</li><li class="checked" data-inline-task-id="34">Merge XWork code into Struts Core (without renaming packages)</li><li class="checked" data-inline-task-id="39">Prepare the first beta release</li><li class="checked" data-inline-task-id="36">Mark current logging layer as <code>@deprecated</code> and use Log4j2 as default one</li><li class="checked" data-inline-task-id="37">Add plugin to support bean validation<ul class="inline-task-list" data-inline-tasks-content-id="27832363"><li class="checked" data-inline-task-id="44">Implement plugin</li><li class="checked" data-inline-task-id="45">Add showcase example</li><li class="checked" data-inline-task-id="46">Add documentation to wiki</li></ul> -</li><li class="checked" data-inline-task-id="38">Upgrade spring plugins spring version to 4.x </li><li class="checked" data-inline-task-id="48">Move struts2 blank, jboss-blank and mailreader app to struts2-examples</li><li data-inline-task-id="35">Switch to strict DMI by default - allow only defined methods to be accessible via DMI - user can always change that list</li><li data-inline-task-id="49">prepare second beta</li><li data-inline-task-id="50">drop support for "top" object</li><li data-inline-task-id="40">Cleanup website<ul class="inline-task-list" data-inline-tasks-content-id="27832363"><li data-inline-task-id="8">new user guide totally developed out of Confluence - people will be able to contribute to it via GitHub</li><li data-inline-task-id="9">Confluence (wiki) used only to explain more detailed given aspect of the framework (ie.: how to implement your own converter in details)</li><li class="checked" data-inline-task-id="10">keep just one version of the doc (no mo re release/2.3.x, release/2.2.x and so on - Google indexes everything and people are confused)</li></ul> +</li><li class="checked" data-inline-task-id="38">Upgrade spring plugins spring version to 4.x </li><li class="checked" data-inline-task-id="48">Move struts2 blank, jboss-blank and mailreader app to struts2-examples</li><li class="checked" data-inline-task-id="35">Switch to strict DMI by default - allow only defined methods to be accessible via DMI - user can always change that list</li><li class="checked" data-inline-task-id="49">prepare second beta</li><li data-inline-task-id="50">drop support for "top" object - this can be painful, users are using so migration path is needed</li><li data-inline-task-id="40">Cleanup website<ul class="inline-task-list" data-inline-tasks-content-id="27832363"><li data-inline-task-id="8">new user guide totally developed out of Confluence - people will be able to contribute to it via GitHub</li><li data-inline-task-id="9">Confluence (wiki) used only to explain more detailed given aspect of the framework (ie.: how to implement your own converter i n details)</li><li class="checked" data-inline-task-id="10">keep just one version of the doc (no more release/2.3.x, release/2.2.x and so on - Google indexes everything and people are confused)</li></ul> </li><li data-inline-task-id="51">prepare the last beta</li></ul> Modified: websites/production/struts/content/docs/version-notes-25.html ============================================================================== --- websites/production/struts/content/docs/version-notes-25.html (original) +++ websites/production/struts/content/docs/version-notes-25.html Fri Oct 2 06:46:40 2015 @@ -142,7 +142,7 @@ under the License. <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-core</artifactId> - <version>2.5</version> + <version>2.5-BEAT2</version> </dependency> </pre> </div></div><p>You can also use Struts Archetype Catalog like below</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Struts Archetype Catalog</b></div><div class="codeContent panelContent pdl"> @@ -155,7 +155,7 @@ under the License. <url>https://repository.apache.org/content/groups/staging/</url> </repository> </repositories></pre> -</div></div><h2 id="VersionNotes2.5-InternalChanges">Internal Changes</h2><ul><li>XWork source was merged into Struts Core source, it means that there be no more <code>xwork</code> artifact nor dedicated jar</li><li>OGNL was upgraded to version 3.0.11 and it breaks access to properties as it follows Java Bean Specification, see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4207">WW-4207</a> and <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-3909">WW-3909</a></li><li>Spring dependency for tests and spring plugin was upgraded to version 4.1.6, see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4510">WW-4510</a>.</li><li>Struts2 internal logging api was marked as deprecated and was replaced with new <a shape="rect" class="external-link" href="http://logging.apache.org/log4j/2.x/">Log4j2</a> api as logging layer, see <a shape="rect" class="exte rnal-link" href="https://issues.apache.org/jira/browse/WW-4504">WW-4504</a>.</li><li>Struts2 is now build with JDK7, see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4503">WW-4503</a>.</li><li>New plugin to support <a shape="rect" href="https://cwiki.apache.org/confluence/display/WW/Bean+Validation+Plugin">bean validation</a> is now part of the distribution, see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4505">WW-4505</a>.</li><li>Deprecated plugins are now removed from the distribution and are not longer supported anymore.<ul><li>Dojo Plugin</li><li>Codebehind Plugin</li><li>JSF Plugin</li><li>Struts1 Plugin</li></ul></li></ul><h2 id="VersionNotes2.5-IssueDetail"><span style="font-size: 16.0px;line-height: 1.5625;">Issue Detail</span></h2><ul><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12331974&projectId=12311041">JIRA Release Note s 2.3.24</a> - TBU</li></ul><h3 id="VersionNotes2.5-IssueList">Issue List</h3><ul><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/issues/?filter=12330045">Struts 2.3.24 DONE</a> - TBU</li><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/issues/?filter=12318399">Struts 2.3.x TODO</a> - TBU</li></ul><h3 id="VersionNotes2.5-Otherresources">Other resources</h3><ul><li><a shape="rect" class="external-link" href="http://www.mail-archive.com/commits%40struts.apache.org/" rel="nofollow">Commit Logs</a></li><li><a shape="rect" class="external-link" href="https://git-wip-us.apache.org/repos/asf?p=struts.git;a=tree;h=refs/heads/develop;hb=develop">Source Code Repository</a></li></ul><div><span style="font-size: 24.0px;line-height: 30.0px;"><br clear="none"></span></div><div><span style="font-size: 24.0px;line-height: 30.0px;background-color: rgb(245,245,245);"><br clear="none"></span></div></div> +</div></div><h2 id="VersionNotes2.5-InternalChanges">Internal Changes</h2><ul><li>XWork source was merged into Struts Core source, it means that there be no more <code>xwork</code> artifact nor dedicated jar</li><li>OGNL was upgraded to version 3.0.11 and it breaks access to properties as it follows Java Bean Specification, see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4207">WW-4207</a> and <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-3909">WW-3909</a></li><li>Spring dependency for tests and spring plugin was upgraded to version 4.1.6, see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4510">WW-4510</a>.</li><li>Struts2 internal logging api was marked as deprecated and was replaced with new <a shape="rect" class="external-link" href="http://logging.apache.org/log4j/2.x/">Log4j2</a> api as logging layer, see <a shape="rect" class="exte rnal-link" href="https://issues.apache.org/jira/browse/WW-4504">WW-4504</a>.</li><li>Struts2 is now build with JDK7, see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4503">WW-4503</a>.</li><li>New plugin to support <a shape="rect" href="https://cwiki.apache.org/confluence/display/WW/Bean+Validation+Plugin">bean validation</a> is now part of the distribution, see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4505">WW-4505</a>.</li><li>Deprecated plugins are now removed from the distribution and are not longer supported anymore.<ul><li>Dojo Plugin</li><li>Codebehind Plugin</li><li>JSF Plugin</li><li>Struts1 Plugin</li></ul></li><li>New security option was added - Strict Method Invocation (also known as Strict DMI), see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4540">WW-4540</a></li><li>Add support for latest stable AngularJS in Maven archetype, see <a shape="r ect" class="external-link" href="https://issues.apache.org/jira/browse/WW-4522">WW-4522</a></li></ul><h2 id="VersionNotes2.5-IssueDetail"><span style="font-size: 16.0px;line-height: 1.5625;">Issue Detail</span></h2><ul><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12331974&projectId=12311041">JIRA Release Notes 2.3.24</a> - TBU</li></ul><h3 id="VersionNotes2.5-IssueList">Issue List</h3><ul><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/issues/?filter=12330045">Struts 2.3.24 DONE</a> - TBU</li><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/issues/?filter=12318399">Struts 2.3.x TODO</a> - TBU</li></ul><h3 id="VersionNotes2.5-Otherresources">Other resources</h3><ul><li><a shape="rect" class="external-link" href="http://www.mail-archive.com/commits%40struts.apache.org/" rel="nofollow">Commit Logs</a></li><li><a shape="rect" class="external-l ink" href="https://git-wip-us.apache.org/repos/asf?p=struts.git;a=tree;h=refs/heads/develop;hb=develop">Source Code Repository</a></li></ul><div><span style="font-size: 24.0px;line-height: 30.0px;"><br clear="none"></span></div><div><span style="font-size: 24.0px;line-height: 30.0px;background-color: rgb(245,245,245);"><br clear="none"></span></div></div> </div> Modified: websites/production/struts/content/docs/webxml.html ============================================================================== --- websites/production/struts/content/docs/webxml.html (original) +++ websites/production/struts/content/docs/webxml.html Fri Oct 2 06:46:40 2015 @@ -138,7 +138,7 @@ under the License. <div class="pagecontent"> <div class="wiki-content"> - <div id="ConfluenceContent"><p>The <code>web.xml</code> web application descriptor file represents the core of the Java web application, so it is appropriate that it is also part of the core of the Struts framework. In the <code>web.xml</code> file, Struts defines its FilterDispatcher, the Servlet Filter class that initializes the Struts framework and handles all requests. This filter can contain initialization parameters that affect what, if any, additional configuration files are loaded and how the framework should behave.</p><p>In addition to the FilterDispatcher, Struts also provides an ActionContextCleanUp class that handles special cleanup tasks when other filters, such as those used by Sitemesh, need access to an initialized Struts framework.</p><h2 id="web.xml-SimpleExample">Simple Example</h2><p>Configuring <code>web.xml</code> for the framework is a matter of adding a filter and filter-mapping.</p><div class="code panel pdl" style="border-width: 1px;"><div clas s="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>FilterDispatcher Example (web.xml)</b></div><div class="codeContent panelContent pdl"> + <div id="ConfluenceContent"><p>The <code>web.xml</code> web application descriptor file represents the core of the Java web application, so it is appropriate that it is also part of the core of the Struts framework. In the <code>web.xml</code> file, Struts defines its FilterDispatcher, the Servlet Filter class that initializes the Struts framework and handles all requests. This filter can contain initialization parameters that affect what, if any, additional configuration files are loaded and how the framework should behave.</p><h2 id="web.xml-SimpleExample">Simple Example</h2><p>Configuring <code>web.xml</code> for the framework is a matter of adding a filter and filter-mapping.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>FilterDispatcher Example (web.xml)</b></div><div class="codeContent panelContent pdl"> <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" @@ -146,11 +146,7 @@ under the License. <filter> <filter-name>struts2</filter-name> - <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> - <init-param> - <param-name>actionPackages</param-name> - <param-value>com.mycompany.myapp.actions</param-value> - </init-param> + <filter-class>org.apache.struts2.dispatcher.filter.ng.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping>