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"><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">/></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"><debug></span>
+ <span class="nt"><parameters</span> <span class="nt">/></span>
+ <span class="nt"><context></span>
+ <span class="nt"><struts.actionMapping></span>
+ <span class="nt"><class></span>class
org.apache.struts2.dispatcher.mapper.ActionMapping<span
class="nt"></class></span>
+ <span class="nt"><name></span>showcase<span
class="nt"></name></span>
+ <span class="nt"><namespace></span>/<span
class="nt"></namespace></span>
+ <span class="nt"></struts.actionMapping></span>
+ <span class="nt"><attr</span> <span class="nt">/></span>
+ <span class="nt"><__devMode></span>true<span
class="nt"></__devMode></span>
+ <span class="nt"><report.conversion.errors></span>false<span
class="nt"></report.conversion.errors></span>
+ <span class="nt"></context></span>
+ <span class="nt"><request</span> <span class="nt">/></span>
+ <span class="nt"><session</span> <span class="nt">/></span>
+ <span class="nt"><valueStack></span>
+ <span class="nt"><value></span>
+ <span class="nt"><actionErrors</span> <span
class="nt">/></span>
+ <span class="nt"><actionMessages</span> <span
class="nt">/></span>
+ <span class="nt"><class></span>class
com.opensymphony.xwork2.ActionSupport<span class="nt"></class></span>
+ <span class="nt"><errorMessages</span> <span
class="nt">/></span>
+ <span class="nt"><errors</span> <span class="nt">/></span>
+ <span class="nt"><fieldErrors</span> <span
class="nt">/></span>
+ <span class="nt"><locale></span>
+ <span class="nt"><ISO3Country></span>USA<span
class="nt"></ISO3Country></span>
+ <span class="nt"><ISO3Language></span>eng<span
class="nt"></ISO3Language></span>
+ <span class="nt"><class></span>class
java.util.Locale<span class="nt"></class></span>
+ <span class="nt"><country></span>US<span
class="nt"></country></span>
+ <span class="nt"><displayCountry></span>United
States<span class="nt"></displayCountry></span>
+ <span class="nt"><displayLanguage></span>English<span
class="nt"></displayLanguage></span>
+ <span class="nt"><displayName></span>English (United
States)<span class="nt"></displayName></span>
+ <span class="nt"><displayVariant</span> <span
class="nt">/></span>
+ <span class="nt"><language></span>en<span
class="nt"></language></span>
+ <span class="nt"><variant</span> <span
class="nt">/></span>
+ <span class="nt"></locale></span>
+ <span class="nt"></value></span>
+ <span class="nt"><value></span>
+ <span class="nt"><class></span>class
com.opensymphony.xwork2.DefaultTextProvider<span
class="nt"></class></span>
+ <span class="nt"></value></span>
+ <span class="nt"></valueStack></span>
+<span class="nt"></debug></span>
</code></pre>
</div>
-<p>file, like:</p>
-<div class="highlighter-rouge"><pre class="highlight"><code><constant
name="struts.devMode" value="true" />
-
-</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>- <debug>
- <parameters />
-- <context>
-- <struts.actionMapping>
- <class>class
org.apache.struts2.dispatcher.mapper.ActionMapping</class>
- <name>showcase</name>
- <namespace>/</namespace>
- </struts.actionMapping>
- <attr />
- <__devMode>true</__devMode>
- <report.conversion.errors>false</report.conversion.errors>
- </context>
- <request />
- <session />
-- <valueStack>
-- <value>
- <actionErrors />
- <actionMessages />
- <class>class com.opensymphony.xwork2.ActionSupport</class>
- <errorMessages />
- <errors />
- <fieldErrors />
-- <locale>
- <ISO3Country>USA</ISO3Country>
- <ISO3Language>eng</ISO3Language>
- <class>class java.util.Locale</class>
- <country>US</country>
- <displayCountry>United States</displayCountry>
- <displayLanguage>English</displayLanguage>
- <displayName>English (United States)</displayName>
- <displayVariant />
- <language>en</language>
- <variant />
- </locale>
- </value>
-- <value>
- <class>class com.opensymphony.xwork2.DefaultTextProvider</class>
- </value>
- </valueStack>
- </debug>
-
-</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"><constant name="struts.devMode" value="true"
/></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: <constant
name=âstruts.devModeâ value=âtrueâ />.</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><constant
name="struts.devMode" value="true" />
-<constant name="struts.i18n.reload" value="false"/>
-<constant name="struts.configuration.xml.reload" value="false"/>
-<constant name="struts.freemarker.templatesCache" value="true"/>
-<constant name="struts.freemarker.templatesCache.updateDelay"
value="120"/>
-<constant name="struts.freemarker.mru.max.strong.size" value="120"/>
-
-</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"><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">/></span>
+<span class="nt"><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">/></span>
+<span class="nt"><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">/></span>
+<span class="nt"><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">/></span>
+<span class="nt"><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">/></span>
+<span class="nt"><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">/></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>