struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject struts-site git commit: Cleans up MD
Date Thu, 29 Jun 2017 13:09:18 GMT
Repository: struts-site
Updated Branches:
  refs/heads/master c9f61f03d -> 5385e4526


Cleans up MD


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

Branch: refs/heads/master
Commit: 5385e4526858c62438b2a6f6f533433b3adad850
Parents: c9f61f0
Author: Lukasz Lenart <lukasz.lenart@gmail.com>
Authored: Thu Jun 29 15:03:47 2017 +0200
Committer: Lukasz Lenart <lukasz.lenart@gmail.com>
Committed: Thu Jun 29 15:03:47 2017 +0200

----------------------------------------------------------------------
 source/core-developers/debugging.md            | 169 +++++++-------------
 source/core-developers/dependency-injection.md |  16 +-
 source/core-developers/development-mode.md     | 107 ++++---------
 3 files changed, 101 insertions(+), 191 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-site/blob/5385e452/source/core-developers/debugging.md
----------------------------------------------------------------------
diff --git a/source/core-developers/debugging.md b/source/core-developers/debugging.md
index eb2304d..8f028a4 100644
--- a/source/core-developers/debugging.md
+++ b/source/core-developers/debugging.md
@@ -5,117 +5,66 @@ title: Debugging
 
 # Debugging
 
-Modern IDEs provide excellent support for debugging\. In addition, the framework provides
support for inspecting framework\-specific objects at runtime\.
+Modern IDEs provide excellent support for debugging. In addition, the framework provides
support for inspecting
+framework-specific objects at runtime.
 
-The [Debugging Interceptor](debugging-interceptor.html) provides three debugging modes to
provide insight into the data behind the page\. The 
+The [Debugging Interceptor](debugging-interceptor.html) provides three debugging modes to
provide insight into the data 
+behind the page. The `xml` mode formats relevant framework objects as an XML document. The
`console` mode provides 
+a OGNL command line that accepts entry of runtime expressions, and the `browser` mode adds
an interactive page that 
+display objects from the Value Stack.
 
-~~~~~~~
-xml
-~~~~~~~
- mode formats relevant framework objects as an XML document\. The 
+To use the debugging, first be sure that `struts.devMode` is set to `true` is enabled through

+the [struts.properties](struts-properties.html) file or `struts.xml` file, like:
 
-~~~~~~~
-console
-~~~~~~~
- mode provides a OGNL command line that accepts entry of runtime expressions, and the 
-
-~~~~~~~
-browser
-~~~~~~~
- mode adds an interactive page that display objects from the Value Stack\.
-
-To use the debugging, first be sure that 
-
-~~~~~~~
-struts.devMode
-~~~~~~~
- is set to 
-
-~~~~~~~
-true
-~~~~~~~
- is enabled through the [struts\.properties](struts-properties.html) file or 
-
-~~~~~~~
-struts.xml
-~~~~~~~
- file, like:
-
-
-~~~~~~~
+```xml
 <constant name="struts.devMode" value="true" />
-
-~~~~~~~
-
-Then, whenever a page needs debugging, add 
-
-~~~~~~~
-?debug=xml
-~~~~~~~
- or 
-
-~~~~~~~
-?debug=console
-~~~~~~~
- or 
-
-~~~~~~~
-?debug=browser
-~~~~~~~
- to the URL\.
-
-
-~~~~~~~
-- <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>
-
-~~~~~~~
-
-
-
-| For ?debug=xml use Internet Explorer or an [IE tab in FireFox](http://ietab\.mozdev\.org/)^[http://ietab\.mozdev\.org/]
-
-| 
-
-
-For ?debug=console you may need to relax any popup blockers
-
-| 
\ No newline at end of file
+```
+
+Then, whenever a page needs debugging, add `?debug=xml` or `?debug=console` or `?debug=browser`
to the URL.
+
+```xml
+<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>
+```
+
+For `?debug=xml` use Internet Explorer or an [IE tab in FireFox](http://ietab.mozdev.org/).
+
+For `?debug=console` you may need to relax any popup blockers.

http://git-wip-us.apache.org/repos/asf/struts-site/blob/5385e452/source/core-developers/dependency-injection.md
----------------------------------------------------------------------
diff --git a/source/core-developers/dependency-injection.md b/source/core-developers/dependency-injection.md
index 6a2e494..6873cad 100644
--- a/source/core-developers/dependency-injection.md
+++ b/source/core-developers/dependency-injection.md
@@ -5,12 +5,16 @@ title: Dependency Injection
 
 # Dependency Injection
 
-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 [Martin Fowler's article](http://www\.martinfowler\.com/articles/injection\.html)^[http://www\.martinfowler\.com/articles/injection\.html]\.
+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 
+[Martin Fowler's article](http://www.martinfowler.com/articles/injection.html).
 
-| 
 
-Internally, the framework uses its own dependency injection container that is very similar
to Google Guice\.  Both were originally developed by [Bob Lee](http://blog\.crazybob\.org/)^[http://blog\.crazybob\.org/]\.
 Plugins are available to integrate applications with other IoC containers (e\.g\. _Spring
Plugin_ , _Plexus Plugin_ )\.  An application can even use a local copy of Google Guice for
dependency injection needs\. 
+Internally, the framework uses its own dependency injection container that is very similar
to Google Guice.  Both were 
+originally developed by [Bob Lee](http://blog.crazybob.org/). Plugins are available to integrate
applications with other 
+IoC containers (e.g. _Spring Plugin_, _Plexus Plugin_ ). An application can even use a local
copy of Google Guice 
+for dependency injection needs. 
 
-(information) Actions can still be instantiated via Spring configuration by way of the _Spring
Plugin_ , but Spring is entirely optional\.
-
- (\!)  The WebWork/XWork IoC container utilized by WebWork 2\.1 is not supported by Struts
2\.
\ No newline at end of file
+> Actions can still be instantiated via Spring configuration by way of the _Spring Plugin_,
but Spring 
+is entirely optional.

http://git-wip-us.apache.org/repos/asf/struts-site/blob/5385e452/source/core-developers/development-mode.md
----------------------------------------------------------------------
diff --git a/source/core-developers/development-mode.md b/source/core-developers/development-mode.md
index 332e107..9184943 100644
--- a/source/core-developers/development-mode.md
+++ b/source/core-developers/development-mode.md
@@ -5,95 +5,52 @@ title: Development Mode
 
 # Development Mode (aka "devMode")
 
-Please turn this option off before deploying application to a production environment \- it
can expose sensitive data of your application\!
+Please turn this option off before deploying application to a production environment - it
can expose sensitive data of your application!
 
-> 
+Struts 2 has a setting (which can be set to `true` or `false` in [struts.properties](struts-properties.html))

+called devMode (= development mode). When this setting is enabled, Struts 2 will provide
additional logging and debug 
+information, which can significantly speed up development.
 
-Struts 2 has a setting (which can be set to 
+You can also set this constant in your struts.xml file: `<constant name="struts.devMode"
value="true" />`.
 
-~~~~~~~
-true
-~~~~~~~
- or 
+This is the preferred method. See [Constant Configuration](constant-configuration.html) for
more information.
 
-~~~~~~~
-false
-~~~~~~~
- in [struts\.properties](struts-properties.html)) called devMode (= development mode)\. When
this setting is enabled, Struts 2 will provide additional logging and debug information, which
can significantly speed up development\.
+## What does it do?
 
+- When enabled, Struts 2 will reload your **resource bundles on every request** (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 `struts.i18n.reload = true`
+- It will also **reload your xml configuration files** ([struts.xml](struts-xml.html)), your
**validation files**, 
+  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 `struts.configuration.xml.reload =
true`
+- And thirdly, perhaps the setting which is less widely known, and therefore a source of
much confusion: it will 
+  **raise the level of debug or normally ignorable problems to errors**. For example: when
you 
+  **submit a field which cannot be set on an action** 'someUnknownField', it will normally
be ignored. However, when 
+  you're in development mode, **an exception will be thrown**, 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 (**warning**:
bad practice, 
+  you should always validate input from the web).
 
+## Don't forget...
 
-| You can also set this constant in your struts\.xml file: \<constant name="struts\.devMode"
value="true" /\>\.
+By default, the development mode is disabled, because it has a significant impact on [performance](performance-tuning.html),

+since the entire configuration will be reloaded on every request.
 
-| 
+## Page rendering is slow
 
-| 
+If you experience slow page rendering when `devMode` is on it's mostly because Freemarker
cache is disabled during 
+`devMode`. You can explicit enable cache and any other options disabled by `devMode`, see
example below:
 
-| This is the preferred method\. See [Constant Configuration](constant-configuration.html)
for more information\.
-
-| 
-
-####What does it do?####
-
-+ When enabled, Struts 2 will reload your **resource bundles on every request** (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 
-
-~~~~~~~
-struts.i18n.reload = true
-~~~~~~~
-
-+ It will also **reload your xml configuration files** ([struts.xml](struts-xml.html)), your
**validation files**, 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 
-
-~~~~~~~
-struts.configuration.xml.reload = true
-~~~~~~~
-
-+ And thirdly, perhaps the setting which is less widely known, and therefore a source of
much confusion: it will **raise the level of debug or normally ignorable problems to errors**\.
For example: when you **submit a field which cannot be set on an action** 'someUnknownField',
it will normally be ignored\. However, when you're in development mode, **an exception will
be thrown**, 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
(**warning**: bad practice, you should always validate input from the web)\.
-
-####Don't forget\.\.\.####
-
-By default, the development mode is disabled, because it has a significant impact on [performance](performance-tuning.html),
since the entire configuration will be reloaded on every request\.
-
-####Page rendering is slow####
-
-If you experience slow page rendering when 
-
-~~~~~~~
-devMode
-~~~~~~~
- is on it's mostly because Freemarker cache is disabled during 
-
-~~~~~~~
-devMode
-~~~~~~~
-\. You can explicit enable cache and any other options disabled by 
-
-~~~~~~~
-devMode
-~~~~~~~
-, see example below:
-
-
-~~~~~~~
+```xml
 <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"/>
+```
+As you can see, you can switch `devMode` on and still have production options on as well.
 
-~~~~~~~
-
-As you can see, you can switch 
-
-~~~~~~~
-devMode
-~~~~~~~
- on and still have production options on as well\.
-
-
-
-| Please remember to use production optimized options which can be different than these used
during development (especially cache related)\!
-
-| 
+Please remember to use production optimized options which can be different than these used
during development 
+(especially cache related)!


Mime
View raw message