struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject struts-site git commit: Updates production by Jenkins
Date Wed, 23 Aug 2017 08:59:10 GMT
Repository: struts-site
Updated Branches:
  refs/heads/asf-site e2b7cd1ee -> c88a260e1


Updates production by Jenkins


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

Branch: refs/heads/asf-site
Commit: c88a260e12e70cf593959e9c31d3a81be3086852
Parents: e2b7cd1
Author: jenkins <builds@apache.org>
Authored: Wed Aug 23 08:59:08 2017 +0000
Committer: jenkins <builds@apache.org>
Committed: Wed Aug 23 08:59:08 2017 +0000

----------------------------------------------------------------------
 content/core-developers/dispatcher.html         |  35 +--
 .../core-developers/result-configuration.html   | 254 ++++++++-----------
 content/core-developers/unknown-handlers.html   |  59 ++---
 3 files changed, 128 insertions(+), 220 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-site/blob/c88a260e/content/core-developers/dispatcher.html
----------------------------------------------------------------------
diff --git a/content/core-developers/dispatcher.html b/content/core-developers/dispatcher.html
index 28f0281..29c4533 100644
--- a/content/core-developers/dispatcher.html
+++ b/content/core-developers/dispatcher.html
@@ -126,35 +126,18 @@
     <a href="index.html" title="back to Core Developers Guide"><< back to Core
Developers Guide</a>
     <h1 id="dispatcher">Dispatcher</h1>
 
-<p>###Description###</p>
+<p>Dispatcher is the main point of control which dispatch request execution to given
actions. It is used 
+by <a href="web-xml.html">filters</a> / servlet / listener / portlet to set up
and run Struts environment.</p>
 
-<p>Dispatcher is the main point of control which dispatch request execution to given
actions. It is used by <a href="web-xml.html">filters</a> / servlet / listener
/ portlet to set up and run Struts environment.</p>
+<h2 id="error-handling">Error handling</h2>
 
-<p>####Error handling####</p>
+<p>When exception occurs (misconfiguration or some internal error), Dispatcher will
pass handling to <code class="highlighter-rouge">DispatcherErrorHandler</code>
+which by default uses <code class="highlighter-rouge">HttpServletResponse#sendError</code>
to report error back to client. It will be 404 or 500 by default 
+(depends on exception type).</p>
 
-<p>When exception occurs (misconfiguration or some internal error), Dispatcher will
pass handling to </p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>DispatcherErrorHandler
-</code></pre>
-</div>
-<p>which by default uses </p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>HttpServletResponse#sendError
-</code></pre>
-</div>
-<p>to report error back to client. It will be 404 or 500 by default (depends on exception
type).</p>
-
-<p>If you need a different type of handling you can implement your own </p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>DispatcherErrorHandler
-</code></pre>
-</div>
-<p>and register it with Dispatcher using extension point </p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>struts.dispatcher.errorHandler
-</code></pre>
-</div>
-<p>, see <em>Plugins</em>  for how to register your own implementation
of internal mechanism.</p>
+<p>If you need a different type of handling you can implement your own <code class="highlighter-rouge">DispatcherErrorHandler</code>
and register it with 
+Dispatcher using extension point <code class="highlighter-rouge">struts.dispatcher.errorHandler</code>,
see <a href="../plugins-developer-guide/">Plugins</a> for how 
+to register your own implementation of internal mechanism.</p>
 
   </section>
 </article>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/c88a260e/content/core-developers/result-configuration.html
----------------------------------------------------------------------
diff --git a/content/core-developers/result-configuration.html b/content/core-developers/result-configuration.html
index 9450f39..e137de0 100644
--- a/content/core-developers/result-configuration.html
+++ b/content/core-developers/result-configuration.html
@@ -124,14 +124,19 @@
 <article class="container">
   <section class="col-md-12">
     <a href="index.html" title="back to Core Developers Guide"><< back to Core
Developers Guide</a>
-    <h1 id="result-configuration">Result Configuration</h1>
+    <h1 class="no_toc" id="result-configuration">Result Configuration</h1>
 
-<p>When an <em>action</em>  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</p>
+<ul id="markdown-toc">
+  <li><a href="#result-elements" id="markdown-toc-result-elements">Result Elements</a></li>
+  <li><a href="#multiple-names" id="markdown-toc-multiple-names">Multiple names</a></li>
+  <li><a href="#global-results" id="markdown-toc-global-results">Global Results</a></li>
+  <li><a href="#dynamic-results" id="markdown-toc-dynamic-results">Dynamic Results</a></li>
+  <li><a href="#returning-result-objects" id="markdown-toc-returning-result-objects">Returning
Result Objects</a></li>
+</ul>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>ActionSupport
-</code></pre>
-</div>
-<p>base class.</p>
+<p>When an <code class="highlighter-rouge">action</code> 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 class="highlighter-rouge">ActionSupport</code>
base class.</p>
 
 <p><strong>Predefined result names</strong></p>
 
@@ -140,106 +145,66 @@ String NONE    = "none";
 String ERROR   = "error";
 String INPUT   = "input";
 String LOGIN   = "login";
-
 </code></pre>
 </div>
 
 <p>Of course, applications can define other result tokens to match specific cases.</p>
 
-<p>(information) Returning</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>ActionSupport.NONE
-</code></pre>
-</div>
-<p>(or</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>null
-</code></pre>
-</div>
-<p>) from an <em>action</em>  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>
+<blockquote>
+  <p>Returning <code class="highlighter-rouge">ActionSupport.NONE</code>
(or <code class="highlighter-rouge">null</code>) from an action 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>
+</blockquote>
 
-<p>#####Result Elements#####</p>
+<h2 id="result-elements">Result Elements</h2>
 
-<p>The result element has two jobs. First, it provides a logical name. An</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>Action
-</code></pre>
-</div>
-<p>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 href="result-types.html">Result Types</a>
can be used to do more interesting things.</p>
+<p>The result element has two jobs. First, it provides a logical name. An <code
class="highlighter-rouge">Action</code> can pass back a token like <code class="highlighter-rouge">success</code>

+or <code class="highlighter-rouge">error</code> 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 href="result-types.html">Result
Types</a> can be used to do more 
+interesting things.</p>
 
 <p><strong>Intelligent Defaults</strong></p>
 
-<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>
+<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>
 
 <p><strong>Setting a default Result Type</strong></p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;result-types&gt;
-   &lt;result-type name="dispatcher" default="true"
-                class="org.apache.struts2.dispatcher.ServletDispatcherResult" /&gt;
-&lt;/result-types&gt;
-</code></pre>
-</div>
-
-<p>If a</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>type
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;result-types&gt;</span>
+   <span class="nt">&lt;result-type</span> <span class="na">name=</span><span
class="s">"dispatcher"</span> <span class="na">default=</span><span
class="s">"true"</span> <span class="na">class=</span><span class="s">"org.apache.struts2.dispatcher.ServletDispatcherResult"</span>
<span class="nt">/&gt;</span>
+<span class="nt">&lt;/result-types&gt;</span>
 </code></pre>
 </div>
-<p>attribute is not specified, the framework will use the default</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>dispatcher
-</code></pre>
-</div>
-<p>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>If a <code class="highlighter-rouge">type</code> attribute is not specified,
the framework will use the default <code class="highlighter-rouge">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</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>name
-</code></pre>
-</div>
-<p>attribute is not specified, the framework will give it the name “success”.</p>
+<p>Likewise if the <code class="highlighter-rouge">name</code> attribute
is not specified, the framework will give it the name <code class="highlighter-rouge">success</code>.</p>
 
 <p>Using these intelligent defaults, the most often used result types also become the
simplest.</p>
 
 <p><strong>Result element without defaults</strong></p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;result
name="success" type="dispatcher"&gt;
-    &lt;param name="location"&gt;/ThankYou.jsp&lt;/param&gt;
-&lt;/result&gt;
-
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;result</span>
<span class="na">name=</span><span class="s">"success"</span> <span
class="na">type=</span><span class="s">"dispatcher"</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;param</span> <span class="na">name=</span><span
class="s">"location"</span><span class="nt">&gt;</span>/ThankYou.jsp<span
class="nt">&lt;/param&gt;</span>
+<span class="nt">&lt;/result&gt;</span>
 </code></pre>
 </div>
 
 <p><strong>A Result element using some defaults</strong></p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;result&gt;
-    &lt;param name="location"&gt;/ThankYou.jsp&lt;/param&gt;
-&lt;/result&gt;
-
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;result&gt;</span>
+    <span class="nt">&lt;param</span> <span class="na">name=</span><span
class="s">"location"</span><span class="nt">&gt;</span>/ThankYou.jsp<span
class="nt">&lt;/param&gt;</span>
+<span class="nt">&lt;/result&gt;</span>
 </code></pre>
 </div>
 
-<p>The</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>param
-</code></pre>
-</div>
-<p>tag sets a property on the Result object. The most commonly-set property is</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>location
-</code></pre>
-</div>
-<p>, which usually specifies the path to a web resources. The</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>param
-</code></pre>
-</div>
-<p>attribute is another intelligent default.</p>
+<p>The <code class="highlighter-rouge">param</code> tag sets a property
on the Result object. The most commonly-set property is <code class="highlighter-rouge">location</code>,
which usually 
+specifies the path to a web resources. The <code class="highlighter-rouge">param</code>
attribute is another intelligent default.</p>
 
 <p><strong>Result element using more defaults</strong></p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;result&gt;/ThankYou.jsp&lt;/result&gt;
-
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;result&gt;</span>/ThankYou.jsp<span
class="nt">&lt;/result&gt;</span>
 </code></pre>
 </div>
 
@@ -247,79 +212,88 @@ String LOGIN   = "login";
 
 <p><strong>Multiple Results</strong></p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;action
name="Hello"&gt;
-    &lt;result&gt;/hello/Result.jsp&lt;/result&gt;
-    &lt;result name="error"&gt;/hello/Error.jsp&lt;/result&gt;
-    &lt;result name="input"&gt;/hello/Input.jsp&lt;/result&gt;
-&lt;/action&gt;
-
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;action</span>
<span class="na">name=</span><span class="s">"Hello"</span><span
class="nt">&gt;</span>
+    <span class="nt">&lt;result&gt;</span>/hello/Result.jsp<span class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"error"</span><span class="nt">&gt;</span>/hello/Error.jsp<span
class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"input"</span><span class="nt">&gt;</span>/hello/Input.jsp<span
class="nt">&lt;/result&gt;</span>
+<span class="nt">&lt;/action&gt;</span>
 </code></pre>
 </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>
-
-<p><strong>’*’ Other Result</strong></p>
+<p>A special “other” result can be configured by adding a result with <code
class="highlighter-rouge">name="*"</code>. This result will only be selected if no

+result is found with a matching name.</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;action
name="Hello"&gt;
-    &lt;result&gt;/hello/Result.jsp&lt;/result&gt;
-    &lt;result name="error"&gt;/hello/Error.jsp&lt;/result&gt;
-    &lt;result name="input"&gt;/hello/Input.jsp&lt;/result&gt;
-    &lt;result name="*"&gt;/hello/Other.jsp&lt;/result&gt;
-&lt;/action&gt;
+<p><strong>‘*’ Other Result</strong></p>
 
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;action</span>
<span class="na">name=</span><span class="s">"Hello"</span><span
class="nt">&gt;</span>
+    <span class="nt">&lt;result&gt;</span>/hello/Result.jsp<span class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"error"</span><span class="nt">&gt;</span>/hello/Error.jsp<span
class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"input"</span><span class="nt">&gt;</span>/hello/Input.jsp<span
class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"*"</span><span class="nt">&gt;</span>/hello/Other.jsp<span
class="nt">&lt;/result&gt;</span>
+<span class="nt">&lt;/action&gt;</span>
 </code></pre>
 </div>
 
-<p>(information) 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>
+<blockquote>
+  <p>The <code class="highlighter-rouge">name="*"</code> is <strong>not</strong>
a wildcard pattern, it is a special name that is only selected if an exact match is not found.</p>
+</blockquote>
 
-<p>(!)  In most cases if an action returns an unrecognized result name this would be
a programming error and should be fixed.</p>
+<blockquote>
+  <p>In most cases if an action returns an unrecognized result name this would be a
programming error and should be fixed.</p>
+</blockquote>
 
-<p><strong>Multiple names</strong></p>
+<h2 id="multiple-names">Multiple names</h2>
 
 <p>It is possible to define multiple names for the same result:</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;action
name="save"&gt;
-    &lt;result&gt;success.jsp&lt;/result&gt;
-    &lt;result name="error, input"&gt;input-form.jsp&lt;/result&gt;
-&lt;/action&gt;
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;action</span>
<span class="na">name=</span><span class="s">"save"</span><span
class="nt">&gt;</span>
+    <span class="nt">&lt;result&gt;</span>success.jsp<span class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"error, input"</span><span class="nt">&gt;</span>input-form.jsp<span
class="nt">&lt;/result&gt;</span>
+<span class="nt">&lt;/action&gt;</span>
 </code></pre>
 </div>
 
 <p>Such functionality was added in Struts 2.5</p>
 
-<p>#####Global Results#####</p>
+<h2 id="global-results">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>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 <code class="highlighter-rouge">logon</code> 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>
+<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>
 
 <p><strong>Defining global results</strong></p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;global-results&gt;
-    &lt;result name="error"&gt;/Error.jsp&lt;/result&gt;
-    &lt;result name="invalid.token"&gt;/Error.jsp&lt;/result&gt;
-    &lt;result name="login" type="redirectAction"&gt;Logon!input&lt;/result&gt;
-&lt;/global-results&gt;
-
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;global-results&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"error"</span><span class="nt">&gt;</span>/Error.jsp<span
class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"invalid.token"</span><span class="nt">&gt;</span>/Error.jsp<span
class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"login"</span> <span class="na">type=</span><span class="s">"redirectAction"</span><span
class="nt">&gt;</span>Logon!input<span class="nt">&lt;/result&gt;</span>
+<span class="nt">&lt;/global-results&gt;</span>
 </code></pre>
 </div>
 
-<p>(light-on) For more about results, see <a href="result-types.html">Result
Types</a>.</p>
+<blockquote>
+  <p>For more about results, see <a href="result-types.html">Result Types</a>.</p>
+</blockquote>
 
-<p>#####Dynamic Results#####</p>
+<h2 id="dynamic-results">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>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>
+<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>
 
 <p><strong>FragmentAction implementation</strong></p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>private String
nextAction;
-
-public String getNextAction() {
-    return nextAction;
-}
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="kd">private</span>
<span class="n">String</span> <span class="n">nextAction</span><span
class="o">;</span>
 
+<span class="kd">public</span> <span class="n">String</span> <span
class="nf">getNextAction</span><span class="p">(</span><span class="o">)</span>
<span class="o">{</span>
+    <span class="k">return</span> <span class="n">nextAction</span><span
class="o">;</span>
+<span class="o">}</span>
 </code></pre>
 </div>
 
@@ -327,58 +301,30 @@ public String getNextAction() {
 
 <p><strong>FragmentAction configuration</strong></p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;action
name="fragment" class="FragmentAction"&gt;
-    &lt;result name="next" type="redirectAction"&gt;${nextAction}&lt;/result&gt;
-&lt;/action&gt;
-
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;action</span>
<span class="na">name=</span><span class="s">"fragment"</span> <span
class="na">class=</span><span class="s">"FragmentAction"</span><span
class="nt">&gt;</span>
+    <span class="nt">&lt;result</span> <span class="na">name=</span><span
class="s">"next"</span> <span class="na">type=</span><span class="s">"redirectAction"</span><span
class="nt">&gt;</span>${nextAction}<span class="nt">&lt;/result&gt;</span>
+<span class="nt">&lt;/action&gt;</span>
 </code></pre>
 </div>
 
-<p>If a</p>
+<p>If a <code class="highlighter-rouge">FragmentAction</code> method returns
<code class="highlighter-rouge">next</code> the actual <em>value</em>
of that result will be whatever is in <code class="highlighter-rouge">FragmentAction</code>’s

+<code class="highlighter-rouge">nextAction</code> property. So <code class="highlighter-rouge">nextAction</code>
may be computed based on whatever state information necessary then passed 
+at runtime to <code class="highlighter-rouge">next</code>’s <code class="highlighter-rouge">redirectAction</code>.</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>FragmentAction
-</code></pre>
-</div>
-<p>method returns “next” the actual <em>value</em>  of that result
will be whatever is in</p>
+<p>See <a href="../faq/parameters-in-configuration-results.html">Parameters in
configuration results</a> for an expanded discussion. </p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>FragmentAction
-</code></pre>
-</div>
-<p>’s</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>nextAction
-</code></pre>
-</div>
-<p>property. So</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>nextAction
-</code></pre>
-</div>
-<p>may be computed based on whatever state information necessary then passed at runtime
to “next”’s</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>redirectAction
-</code></pre>
-</div>
-<p>.</p>
-
-<p>See <em>Parameters in configuration results</em>  for an expanded discussion.</p>
-
-<p> </p>
-
-<p>#####Returning Result Objects#####</p>
+<h2 id="returning-result-objects">Returning Result Objects</h2>
 
 <p>Instead of configuring results and returning the name, it is possible to return
a result object:</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>public Result
runAction() {
-	ServletDispatcherResult result = new ServletDispatcherResult();
-	result.setLocation("input-form.jsp");
-	return result;
-}
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="kd">public</span>
<span class="n">Result</span> <span class="nf">runAction</span><span
class="p">(</span><span class="o">)</span> <span class="o">{</span>
+	<span class="n">ServletDispatcherResult</span> <span class="n">result</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">ServletDispatcherResult</span><span
class="o">();</span>
+	<span class="n">result</span><span class="o">.</span><span class="na">setLocation</span><span
class="o">(</span><span class="s">"input-form.jsp"</span><span class="o">);</span>
+	<span class="k">return</span> <span class="n">result</span><span
class="o">;</span>
+<span class="o">}</span>
 </code></pre>
 </div>
 
-<p> </p>
-
   </section>
 </article>
 

http://git-wip-us.apache.org/repos/asf/struts-site/blob/c88a260e/content/core-developers/unknown-handlers.html
----------------------------------------------------------------------
diff --git a/content/core-developers/unknown-handlers.html b/content/core-developers/unknown-handlers.html
index 74a5ed1..23d9222 100644
--- a/content/core-developers/unknown-handlers.html
+++ b/content/core-developers/unknown-handlers.html
@@ -128,60 +128,39 @@
 
 <p>Unknown Handler stacks are available from Struts 2.1 on.</p>
 
-<blockquote>
+<h2 id="unknown-handlers-1">Unknown Handlers</h2>
 
-</blockquote>
-
-<p>#####Unkown Handlers#####</p>
-
-<p>Unknown Handlers are classes that implement the</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>com.opensymphony.xwork2.UnknownHandler
-</code></pre>
-</div>
-<p>interface, and are called by the framework, when an unknown action, result, or method
are executed. To define an unknown handler, create a class implementing the mentioned interface,
and add a bean definition to your struts.xml:</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>
-&lt;bean type="com.opensymphony.xwork2.UnknownHandler" name="handler" class="myclasses.SomeUnknownHandler"/&gt;
+<p>Unknown Handlers are classes that implement the <code class="highlighter-rouge">com.opensymphony.xwork2.UnknownHandler</code>
interface, and are called 
+by the framework, when an unknown action, result, or method are executed. To define an unknown
handler, create a class 
+implementing the mentioned interface, and add a bean definition to your struts.xml:</p>
 
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;bean</span>
<span class="na">type=</span><span class="s">"com.opensymphony.xwork2.UnknownHandler"</span>
<span class="na">name=</span><span class="s">"handler"</span> <span
class="na">class=</span><span class="s">"myclasses.SomeUnknownHandler"</span><span
class="nt">/&gt;</span>
 </code></pre>
 </div>
 
-<p>#####Stacking Unknown Handlers#####</p>
+<h2 id="stacking-unknown-handlers">Stacking Unknown Handlers</h2>
 
 <p>Multiple unknown handlers can be defined, using the <em>unknown-handler-stack</em>
 tag:</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>
-&lt;bean type="com.opensymphony.xwork2.UnknownHandler" name="handler1" class="com.opensymphony.xwork2.config.providers.SomeUnknownHandler"/&gt;
-&lt;bean type="com.opensymphony.xwork2.UnknownHandler" name="handler2" class="com.opensymphony.xwork2.config.providers.SomeUnknownHandler"/&gt;
-
-&lt;unknown-handler-stack&gt;
-   &lt;unknown-handler-ref name="handler1" /&gt;
-   &lt;unknown-handler-ref name="handler2" /&gt;
-&lt;/unknown-handler-stack&gt;
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;bean</span>
<span class="na">type=</span><span class="s">"com.opensymphony.xwork2.UnknownHandler"</span>
<span class="na">name=</span><span class="s">"handler1"</span> <span
class="na">class=</span><span class="s">"com.opensymphony.xwork2.config.providers.SomeUnknownHandler"</span><span
class="nt">/&gt;</span>
+<span class="nt">&lt;bean</span> <span class="na">type=</span><span
class="s">"com.opensymphony.xwork2.UnknownHandler"</span> <span class="na">name=</span><span
class="s">"handler2"</span> <span class="na">class=</span><span class="s">"com.opensymphony.xwork2.config.providers.SomeUnknownHandler"</span><span
class="nt">/&gt;</span>
 
+<span class="nt">&lt;unknown-handler-stack&gt;</span>
+   <span class="nt">&lt;unknown-handler-ref</span> <span class="na">name=</span><span
class="s">"handler1"</span> <span class="nt">/&gt;</span>
+   <span class="nt">&lt;unknown-handler-ref</span> <span class="na">name=</span><span
class="s">"handler2"</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/unknown-handler-stack&gt;</span>
 </code></pre>
 </div>
 
-<p>When multiple unknown handlers are stacked like above, they will be called in the
specified order, in the same cases when a single unknown handler would be called (when an
unknown action, result, or method are executed), until one of them handles the requested action.</p>
-
-<p>#####Uknown Handlers Manager#####</p>
+<p>When multiple unknown handlers are stacked like above, they will be called in the
specified order, in the same cases 
+when a single unknown handler would be called (when an unknown action, result, or method
are executed), until one of them 
+handles the requested action.</p>
 
-<p>The default class that handles unknown handler stacks is</p>
+<h2 id="unknown-handlers-manager">Unknown Handlers Manager</h2>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>com.opensymphony.xwork2.DefaultUnknownHandlerManager
-</code></pre>
-</div>
-<p>, a custom implementation of this class can be provided by implementing the interface</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>com.opensymphony.xwork2.UnknownHandlerManager
-</code></pre>
-</div>
-<p>and setting the property</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>struts.unknownHandlerManager
-</code></pre>
-</div>
+<p>The default class that handles unknown handler stacks is <code class="highlighter-rouge">com.opensymphony.xwork2.DefaultUnknownHandlerManager</code>,

+a custom implementation of this class can be provided by implementing the interface <code
class="highlighter-rouge">com.opensymphony.xwork2.UnknownHandlerManager</code>
+and setting the property <code class="highlighter-rouge">struts.unknownHandlerManager</code>.</p>
 
   </section>
 </article>


Mime
View raw message