struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1014706 - in /websites/production/struts/content/core-developers: debugging.html dependency-injection.html development-mode.html
Date Thu, 29 Jun 2017 13:05:03 GMT
Author: lukaszlenart
Date: Thu Jun 29 13:05:03 2017
New Revision: 1014706

Log:
Updates production

Modified:
    websites/production/struts/content/core-developers/debugging.html
    websites/production/struts/content/core-developers/dependency-injection.html
    websites/production/struts/content/core-developers/development-mode.html

Modified: websites/production/struts/content/core-developers/debugging.html
==============================================================================
--- websites/production/struts/content/core-developers/debugging.html (original)
+++ websites/production/struts/content/core-developers/debugging.html Thu Jun 29 13:05:03
2017
@@ -125,131 +125,69 @@
     <a href="index.html" title="back to Core Developers Guide"><< back to Core
Developers Guide</a>
     <h1 id="debugging">Debugging</h1>
 
-<p>Modern IDEs provide excellent support for debugging. In addition, the framework
provides support for inspecting framework-specific objects at runtime.</p>
+<p>Modern IDEs provide excellent support for debugging. In addition, the framework
provides support for inspecting
+framework-specific objects at runtime.</p>
 
-<p>The <a href="debugging-interceptor.html">Debugging Interceptor</a> provides
three debugging modes to provide insight into the data behind the page. The</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>xml
-</code></pre>
-</div>
-<p>mode formats relevant framework objects as an XML document. The</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>console
-</code></pre>
-</div>
-<p>mode provides a OGNL command line that accepts entry of runtime expressions, and
the</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>browser
-</code></pre>
-</div>
-<p>mode adds an interactive page that display objects from the Value Stack.</p>
-
-<p>To use the debugging, first be sure that</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>struts.devMode
-</code></pre>
-</div>
-<p>is set to</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>true
+<p>The <a href="debugging-interceptor.html">Debugging Interceptor</a> provides
three debugging modes to provide insight into the data 
+behind the page. The <code class="highlighter-rouge">xml</code> mode formats
relevant framework objects as an XML document. The <code class="highlighter-rouge">console</code>
mode provides 
+a OGNL command line that accepts entry of runtime expressions, and the <code class="highlighter-rouge">browser</code>
mode adds an interactive page that 
+display objects from the Value Stack.</p>
+
+<p>To use the debugging, first be sure that <code class="highlighter-rouge">struts.devMode</code>
is set to <code class="highlighter-rouge">true</code> is enabled through 
+the <a href="struts-properties.html">struts.properties</a> file or <code class="highlighter-rouge">struts.xml</code>
file, like:</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;constant</span>
<span class="na">name=</span><span class="s">"struts.devMode"</span>
<span class="na">value=</span><span class="s">"true"</span> <span
class="nt">/&gt;</span>
 </code></pre>
 </div>
-<p>is enabled through the <a href="struts-properties.html">struts.properties</a>
file or</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>struts.xml
+<p>Then, whenever a page needs debugging, add <code class="highlighter-rouge">?debug=xml</code>
or <code class="highlighter-rouge">?debug=console</code> or <code class="highlighter-rouge">?debug=browser</code>
to the URL.</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;debug&gt;</span>
+     <span class="nt">&lt;parameters</span> <span class="nt">/&gt;</span>

+     <span class="nt">&lt;context&gt;</span>
+        <span class="nt">&lt;struts.actionMapping&gt;</span>
+        <span class="nt">&lt;class&gt;</span>class org.apache.struts2.dispatcher.mapper.ActionMapping<span
class="nt">&lt;/class&gt;</span> 
+        <span class="nt">&lt;name&gt;</span>showcase<span class="nt">&lt;/name&gt;</span>

+        <span class="nt">&lt;namespace&gt;</span>/<span class="nt">&lt;/namespace&gt;</span>

+        <span class="nt">&lt;/struts.actionMapping&gt;</span>
+        <span class="nt">&lt;attr</span> <span class="nt">/&gt;</span>

+        <span class="nt">&lt;__devMode&gt;</span>true<span class="nt">&lt;/__devMode&gt;</span>

+        <span class="nt">&lt;report.conversion.errors&gt;</span>false<span
class="nt">&lt;/report.conversion.errors&gt;</span> 
+    <span class="nt">&lt;/context&gt;</span>
+    <span class="nt">&lt;request</span> <span class="nt">/&gt;</span>

+    <span class="nt">&lt;session</span> <span class="nt">/&gt;</span>

+    <span class="nt">&lt;valueStack&gt;</span>
+        <span class="nt">&lt;value&gt;</span>
+            <span class="nt">&lt;actionErrors</span> <span class="nt">/&gt;</span>

+            <span class="nt">&lt;actionMessages</span> <span class="nt">/&gt;</span>

+            <span class="nt">&lt;class&gt;</span>class com.opensymphony.xwork2.ActionSupport<span
class="nt">&lt;/class&gt;</span> 
+            <span class="nt">&lt;errorMessages</span> <span class="nt">/&gt;</span>

+            <span class="nt">&lt;errors</span> <span class="nt">/&gt;</span>

+            <span class="nt">&lt;fieldErrors</span> <span class="nt">/&gt;</span>

+            <span class="nt">&lt;locale&gt;</span>
+                <span class="nt">&lt;ISO3Country&gt;</span>USA<span
class="nt">&lt;/ISO3Country&gt;</span> 
+                <span class="nt">&lt;ISO3Language&gt;</span>eng<span
class="nt">&lt;/ISO3Language&gt;</span> 
+                <span class="nt">&lt;class&gt;</span>class java.util.Locale<span
class="nt">&lt;/class&gt;</span> 
+                <span class="nt">&lt;country&gt;</span>US<span class="nt">&lt;/country&gt;</span>

+                <span class="nt">&lt;displayCountry&gt;</span>United
States<span class="nt">&lt;/displayCountry&gt;</span> 
+                <span class="nt">&lt;displayLanguage&gt;</span>English<span
class="nt">&lt;/displayLanguage&gt;</span> 
+                <span class="nt">&lt;displayName&gt;</span>English (United
States)<span class="nt">&lt;/displayName&gt;</span> 
+                <span class="nt">&lt;displayVariant</span> <span class="nt">/&gt;</span>

+                <span class="nt">&lt;language&gt;</span>en<span class="nt">&lt;/language&gt;</span>

+                <span class="nt">&lt;variant</span> <span class="nt">/&gt;</span>

+            <span class="nt">&lt;/locale&gt;</span>
+        <span class="nt">&lt;/value&gt;</span>
+        <span class="nt">&lt;value&gt;</span>
+            <span class="nt">&lt;class&gt;</span>class com.opensymphony.xwork2.DefaultTextProvider<span
class="nt">&lt;/class&gt;</span> 
+        <span class="nt">&lt;/value&gt;</span>
+    <span class="nt">&lt;/valueStack&gt;</span>
+<span class="nt">&lt;/debug&gt;</span>
 </code></pre>
 </div>
-<p>file, like:</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;constant
name="struts.devMode" value="true" /&gt;
-
-</code></pre>
-</div>
-
-<p>Then, whenever a page needs debugging, add</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>?debug=xml
-</code></pre>
-</div>
-<p>or</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>?debug=console
-</code></pre>
-</div>
-<p>or</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>?debug=browser
-</code></pre>
-</div>
-<p>to the URL.</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>- &lt;debug&gt;
-  &lt;parameters /&gt; 
-- &lt;context&gt;
-- &lt;struts.actionMapping&gt;
-  &lt;class&gt;class org.apache.struts2.dispatcher.mapper.ActionMapping&lt;/class&gt;

-  &lt;name&gt;showcase&lt;/name&gt; 
-  &lt;namespace&gt;/&lt;/namespace&gt; 
-  &lt;/struts.actionMapping&gt;
-  &lt;attr /&gt; 
-  &lt;__devMode&gt;true&lt;/__devMode&gt; 
-  &lt;report.conversion.errors&gt;false&lt;/report.conversion.errors&gt;

-  &lt;/context&gt;
-  &lt;request /&gt; 
-  &lt;session /&gt; 
-- &lt;valueStack&gt;
-- &lt;value&gt;
-  &lt;actionErrors /&gt; 
-  &lt;actionMessages /&gt; 
-  &lt;class&gt;class com.opensymphony.xwork2.ActionSupport&lt;/class&gt;

-  &lt;errorMessages /&gt; 
-  &lt;errors /&gt; 
-  &lt;fieldErrors /&gt; 
-- &lt;locale&gt;
-  &lt;ISO3Country&gt;USA&lt;/ISO3Country&gt; 
-  &lt;ISO3Language&gt;eng&lt;/ISO3Language&gt; 
-  &lt;class&gt;class java.util.Locale&lt;/class&gt; 
-  &lt;country&gt;US&lt;/country&gt; 
-  &lt;displayCountry&gt;United States&lt;/displayCountry&gt; 
-  &lt;displayLanguage&gt;English&lt;/displayLanguage&gt; 
-  &lt;displayName&gt;English (United States)&lt;/displayName&gt; 
-  &lt;displayVariant /&gt; 
-  &lt;language&gt;en&lt;/language&gt; 
-  &lt;variant /&gt; 
-  &lt;/locale&gt;
-  &lt;/value&gt;
-- &lt;value&gt;
-  &lt;class&gt;class com.opensymphony.xwork2.DefaultTextProvider&lt;/class&gt;

-  &lt;/value&gt;
-  &lt;/valueStack&gt;
-  &lt;/debug&gt;
-
-</code></pre>
-</div>
+<p>For <code class="highlighter-rouge">?debug=xml</code> use Internet Explorer
or an <a href="http://ietab.mozdev.org/">IE tab in FireFox</a>.</p>
 
-<table>
-  <tbody>
-    <tr>
-      <td>For ?debug=xml use Internet Explorer or an <a href="http://ietab\.mozdev\.org/">IE
tab in FireFox</a>^[http://ietab.mozdev.org/]</td>
-    </tr>
-  </tbody>
-</table>
-
-<table>
-  <tbody>
-    <tr>
-    </tr>
-  </tbody>
-</table>
-
-<p>For ?debug=console you may need to relax any popup blockers</p>
-
-<table>
-  <tbody>
-    <tr>
-    </tr>
-  </tbody>
-</table>
+<p>For <code class="highlighter-rouge">?debug=console</code> you may need
to relax any popup blockers.</p>
 
   </section>
 </article>

Modified: websites/production/struts/content/core-developers/dependency-injection.html
==============================================================================
--- websites/production/struts/content/core-developers/dependency-injection.html (original)
+++ websites/production/struts/content/core-developers/dependency-injection.html Thu Jun 29
13:05:03 2017
@@ -125,20 +125,20 @@
     <a href="index.html" title="back to Core Developers Guide"><< back to Core
Developers Guide</a>
     <h1 id="dependency-injection">Dependency Injection</h1>
 
-<p>Dependency injection removes the responsibility for object creation and object linking
from the objects themselves to a factory.  The factory is often provided by an Inversion of
Control (IoC) container.  For an overview of Inversion of Control containers and the Dependency
Injection pattern, please see <a href="http://www\.martinfowler\.com/articles/injection\.html">Martin
Fowler’s article</a>^[http://www.martinfowler.com/articles/injection.html].</p>
-
-<table>
-  <tbody>
-    <tr>
-    </tr>
-  </tbody>
-</table>
-
-<p>Internally, the framework uses its own dependency injection container that is very
similar to Google Guice.  Both were originally developed by <a href="http://blog\.crazybob\.org/">Bob
Lee</a>^[http://blog.crazybob.org/].  Plugins are available to integrate applications
with other IoC containers (e.g. <em>Spring Plugin</em> , <em>Plexus Plugin</em>
).  An application can even use a local copy of Google Guice for dependency injection needs.</p>
-
-<p>(information) Actions can still be instantiated via Spring configuration by way
of the <em>Spring Plugin</em> , but Spring is entirely optional.</p>
-
-<p>(!)  The WebWork/XWork IoC container utilized by WebWork 2.1 is not supported by
Struts 2.</p>
+<p>Dependency injection removes the responsibility for object creation and object linking
from the objects themselves 
+to a factory.  The factory is often provided by an Inversion of Control (IoC) container.
For an overview 
+of Inversion of Control containers and the Dependency Injection pattern, please see 
+<a href="http://www.martinfowler.com/articles/injection.html">Martin Fowler’s
article</a>.</p>
+
+<p>Internally, the framework uses its own dependency injection container that is very
similar to Google Guice.  Both were 
+originally developed by <a href="http://blog.crazybob.org/">Bob Lee</a>. Plugins
are available to integrate applications with other 
+IoC containers (e.g. <em>Spring Plugin</em>, <em>Plexus Plugin</em>
). An application can even use a local copy of Google Guice 
+for dependency injection needs.</p>
+
+<blockquote>
+  <p>Actions can still be instantiated via Spring configuration by way of the <em>Spring
Plugin</em>, but Spring 
+is entirely optional.</p>
+</blockquote>
 
   </section>
 </article>

Modified: websites/production/struts/content/core-developers/development-mode.html
==============================================================================
--- websites/production/struts/content/core-developers/development-mode.html (original)
+++ websites/production/struts/content/core-developers/development-mode.html Thu Jun 29 13:05:03
2017
@@ -127,137 +127,55 @@
 
 <p>Please turn this option off before deploying application to a production environment
- it can expose sensitive data of your application!</p>
 
-<blockquote>
+<p>Struts 2 has a setting (which can be set to <code class="highlighter-rouge">true</code>
or <code class="highlighter-rouge">false</code> in <a href="struts-properties.html">struts.properties</a>)

+called devMode (= development mode). When this setting is enabled, Struts 2 will provide
additional logging and debug 
+information, which can significantly speed up development.</p>
 
-</blockquote>
+<p>You can also set this constant in your struts.xml file: <code class="highlighter-rouge">&lt;constant
name="struts.devMode" value="true" /&gt;</code>.</p>
 
-<p>Struts 2 has a setting (which can be set to</p>
+<p>This is the preferred method. See <a href="constant-configuration.html">Constant
Configuration</a> for more information.</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>true
-</code></pre>
-</div>
-<p>or</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>false
-</code></pre>
-</div>
-<p>in <a href="struts-properties.html">struts.properties</a>) called devMode
(= development mode). When this setting is enabled, Struts 2 will provide additional logging
and debug information, which can significantly speed up development.</p>
-
-<table>
-  <tbody>
-    <tr>
-      <td>You can also set this constant in your struts.xml file: &lt;constant
name=”struts.devMode” value=”true” /&gt;.</td>
-    </tr>
-  </tbody>
-</table>
-
-<table>
-  <tbody>
-    <tr>
-    </tr>
-  </tbody>
-</table>
-
-<table>
-  <tbody>
-    <tr>
-    </tr>
-  </tbody>
-</table>
-
-<table>
-  <tbody>
-    <tr>
-      <td>This is the preferred method. See <a href="constant-configuration.html">Constant
Configuration</a> for more information.</td>
-    </tr>
-  </tbody>
-</table>
-
-<table>
-  <tbody>
-    <tr>
-    </tr>
-  </tbody>
-</table>
-
-<p>####What does it do?####</p>
+<h2 id="what-does-it-do">What does it do?</h2>
 
 <ul>
-  <li>When enabled, Struts 2 will reload your <strong>resource bundles on every
request</strong> (meaning you can change your .properties files, save them, and see
the changes reflected on the next request).
- Note: this option can also be set standalone via</li>
+  <li>When enabled, Struts 2 will reload your <strong>resource bundles on every
request</strong> (meaning you can change your .properties 
+files, save them, and see the changes reflected on the next request). 
+<strong>Note</strong>: this option can also be set standalone via <code class="highlighter-rouge">struts.i18n.reload
= true</code></li>
+  <li>It will also <strong>reload your xml configuration files</strong>
(<a href="struts-xml.html">struts.xml</a>), your <strong>validation files</strong>,

+and so on, on every request. This is useful for testing or fine-tuning your configuration
without having to redeploy 
+your application every time.
+<strong>Note</strong>: this option can also be set standalone via <code class="highlighter-rouge">struts.configuration.xml.reload
= true</code></li>
+  <li>And thirdly, perhaps the setting which is less widely known, and therefore a
source of much confusion: it will 
+<strong>raise the level of debug or normally ignorable problems to errors</strong>.
For example: when you 
+<strong>submit a field which cannot be set on an action</strong> ‘someUnknownField’,
it will normally be ignored. However, when 
+you’re in development mode, <strong>an exception will be thrown</strong>,
telling you an invalid field was submitted. This is very 
+useful for debugging or testing large forms, but can also be confusing if you’re relying
on parameters in your request 
+that are not set on the action, but which you are using directly in your view layer (<strong>warning</strong>:
bad practice, 
+you should always validate input from the web).</li>
 </ul>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>struts.i18n.reload
= true
-</code></pre>
-</div>
+<h2 id="dont-forget">Don’t forget…</h2>
 
-<ul>
-  <li>It will also <strong>reload your xml configuration files</strong>
(<a href="struts-xml.html">struts.xml</a>), your <strong>validation files</strong>,
and so on, on every request. This is useful for testing or fine-tuning your configuration
without having to redeploy your application every time.
- Note: this option can also be set standalone via</li>
-</ul>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>struts.configuration.xml.reload
= true
-</code></pre>
-</div>
-
-<ul>
-  <li>And thirdly, perhaps the setting which is less widely known, and therefore a
source of much confusion: it will <strong>raise the level of debug or normally ignorable
problems to errors</strong>. For example: when you <strong>submit a field which
cannot be set on an action</strong> ‘someUnknownField’, it will normally be
ignored. However, when you’re in development mode, <strong>an exception will be
thrown</strong>, telling you an invalid field was submitted. This is very useful for
debugging or testing large forms, but can also be confusing if you’re relying on parameters
in your request that are not set on the action, but which you are using directly in your view
layer (<strong>warning</strong>: bad practice, you should always validate input
from the web).</li>
-</ul>
+<p>By default, the development mode is disabled, because it has a significant impact
on <a href="performance-tuning.html">performance</a>, 
+since the entire configuration will be reloaded on every request.</p>
 
-<p>####Don’t forget...####</p>
-
-<p>By default, the development mode is disabled, because it has a significant impact
on <a href="performance-tuning.html">performance</a>, since the entire configuration
will be reloaded on every request.</p>
-
-<p>####Page rendering is slow####</p>
-
-<p>If you experience slow page rendering when</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>devMode
-</code></pre>
-</div>
-<p>is on it’s mostly because Freemarker cache is disabled during</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>devMode
-</code></pre>
-</div>
-<p>. You can explicit enable cache and any other options disabled by</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>devMode
-</code></pre>
-</div>
-<p>, see example below:</p>
-
-<div class="highlighter-rouge"><pre class="highlight"><code>&lt;constant
name="struts.devMode" value="true" /&gt;
-&lt;constant name="struts.i18n.reload" value="false"/&gt;
-&lt;constant name="struts.configuration.xml.reload" value="false"/&gt;
-&lt;constant name="struts.freemarker.templatesCache" value="true"/&gt;
-&lt;constant name="struts.freemarker.templatesCache.updateDelay" value="120"/&gt;
-&lt;constant name="struts.freemarker.mru.max.strong.size" value="120"/&gt;
-
-</code></pre>
-</div>
+<h2 id="page-rendering-is-slow">Page rendering is slow</h2>
 
-<p>As you can see, you can switch</p>
+<p>If you experience slow page rendering when <code class="highlighter-rouge">devMode</code>
is on it’s mostly because Freemarker cache is disabled during 
+<code class="highlighter-rouge">devMode</code>. You can explicit enable cache
and any other options disabled by <code class="highlighter-rouge">devMode</code>,
see example below:</p>
 
-<div class="highlighter-rouge"><pre class="highlight"><code>devMode
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;constant</span>
<span class="na">name=</span><span class="s">"struts.devMode"</span>
<span class="na">value=</span><span class="s">"true"</span> <span
class="nt">/&gt;</span>
+<span class="nt">&lt;constant</span> <span class="na">name=</span><span
class="s">"struts.i18n.reload"</span> <span class="na">value=</span><span
class="s">"false"</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;constant</span> <span class="na">name=</span><span
class="s">"struts.configuration.xml.reload"</span> <span class="na">value=</span><span
class="s">"false"</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;constant</span> <span class="na">name=</span><span
class="s">"struts.freemarker.templatesCache"</span> <span class="na">value=</span><span
class="s">"true"</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;constant</span> <span class="na">name=</span><span
class="s">"struts.freemarker.templatesCache.updateDelay"</span> <span class="na">value=</span><span
class="s">"120"</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;constant</span> <span class="na">name=</span><span
class="s">"struts.freemarker.mru.max.strong.size"</span> <span class="na">value=</span><span
class="s">"120"</span><span class="nt">/&gt;</span>
 </code></pre>
 </div>
-<p>on and still have production options on as well.</p>
+<p>As you can see, you can switch <code class="highlighter-rouge">devMode</code>
on and still have production options on as well.</p>
 
-<table>
-  <tbody>
-    <tr>
-      <td>Please remember to use production optimized options which can be different
than these used during development (especially cache related)!</td>
-    </tr>
-  </tbody>
-</table>
-
-<table>
-  <tbody>
-    <tr>
-    </tr>
-  </tbody>
-</table>
+<p>Please remember to use production optimized options which can be different than
these used during development 
+(especially cache related)!</p>
 
   </section>
 </article>



Mime
View raw message