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/5cc381e2
Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/5cc381e2
Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/5cc381e2

Branch: refs/heads/master
Commit: 5cc381e2eb48477a8fc29a6a26086e0ec304eb47
Parents: 55ee066
Author: Lukasz Lenart <[email protected]>
Authored: Wed Jun 28 17:35:49 2017 +0200
Committer: Lukasz Lenart <[email protected]>
Committed: Wed Jun 28 17:35:49 2017 +0200

----------------------------------------------------------------------
 source/core-developers/nutshell.md | 171 +++++++++++++++-----------------
 1 file changed, 81 insertions(+), 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-site/blob/5cc381e2/source/core-developers/nutshell.md
----------------------------------------------------------------------
diff --git a/source/core-developers/nutshell.md 
b/source/core-developers/nutshell.md
index d780136..a70022a 100644
--- a/source/core-developers/nutshell.md
+++ b/source/core-developers/nutshell.md
@@ -5,29 +5,27 @@ title: Nutshell
 
 # Nutshell
 
- The framework documentation is written for active web developers and assumes 
a working knowledge about how Java web applications are built\. For more about 
the underlying nuts and bolts, see the [Key Technologies 
Primer](http://struts\.apache\.org/primer\.html)^[http://struts\.apache\.org/primer\.html]\.
+The framework documentation is written for active web developers and assumes a 
working knowledge about how 
+Java web applications are built. For more about the underlying nuts and bolts, 
see 
+the [Key Technologies Primer](../primer.html).
 
-> 
-
-####Apache Struts 2 Architecture in a Nutshell####
+## Apache Struts 2 Architecture in a Nutshell
 
 ![struts2-arch.png](attachments/struts2-arch.png)
 
-1. The web browser requests a resource (/mypage.action, /reports/myreport.pdf, 
et cetera)\
-2. The Filter Dispatcher looks at the request and determines the appropriate 
Action\
-3. The Interceptors automatically apply common functionality to the request, 
like workflow, validation, and file upload handling\
-4. The Action method executes, usually storing and/or retrieving information 
from a database\
-5. The Result renders the output to the browser, be it HTML, images, PDF, or 
something else\
-
-|
-|------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+1. The web browser requests a resource - `/mypage.action`, 
`/reports/myreport.pdf`, etc
+2. The Filter Dispatcher looks at the request and determines the appropriate 
Action
+3. The Interceptors automatically apply common functionality to the request, 
like workflow, validation, and file upload handling
+4. The Action method executes, usually storing and/or retrieving information 
from a database
+5. The Result renders the output to the browser, be it HTML, images, PDF, or 
something else
 
-####Struts Tags in a nutshell####
+## Struts Tags in a nutshell
 
-The Struts Tags help you create rich web applications with a minimum of 
coding\. Often, much of the coding effort in a web application goes into the 
pages\. The Struts Tags reduce effort by reducing code\.
+The Struts Tags help you create rich web applications with a minimum of 
coding. Often, much of the coding effort 
+in a web application goes into the pages. The Struts Tags reduce effort by 
reducing code.
 
 
-~~~~~~~
+```html
 
 <% User user = ... %>
 <form action="Profile_update.action" method="post">
@@ -44,59 +42,42 @@ The Struts Tags help you create rich web applications with 
a minimum of coding\.
     </table>
 </form>
 ...
-
-~~~~~~~
-
-Looking over the markup, it's easy to see why Java web development without the 
aid from a modern framework is hard\!  So far, we've only coded two controls, 
and there are six more to go\! Let's rewrite and finish the form using Struts 
Tags\.
-
-|\
-\
-![nutshell\.GIF](/Users/lukaszlenart/Projects/Apache/struts\-site/target/md/attachments/att1846\_nutshell\.GIF)
-|\
-\<s:actionerror/\>\
-\<s:form action="Profile\_update" validate="true"\>\
-    \<s:textfield label="Username" name="username"/\>\
-    \<s:password label="Password" name="password"/\>\
-    \<s:password label="(Repeat) Password" name="password2"/\>\
-    \<s:textfield label="Full Name" name="fullName"/\>\
-    \<s:textfield label="From Address" name="fromAddress"/\>\
-    \<s:textfield label="Reply To Address" name="replyToAddress"/\>\
-    \<s:submit value="Save" name="Save"/\>\
-    \<s:submit action="Register\_cancel" value="Cancel" name="Cancel"  
onclick="form\.onsubmit=null"/\>\
-\</s:form\>\
- The Struts Tags also support validation and localization as first\-class 
features\. So not only is there less code, but there is _more_  utility\. \
-In about the same amount of code as two conventional controls, the Struts Tags 
can create an entire data\-input form with eight controls\. Not only is there 
less code, but the code is easier to read and maintain\. |
-|--------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
----------------------------------------------------------------------------------|
-
-####Struts Configuration in a Nutshell####
-
-A web application uses a deployment descriptor to initialize resources like 
filters and listeners\. The web deployment descriptor is formatted as a XML 
document and named 
-
-~~~~~~~
-web.xml
-~~~~~~~
-\. Struts can either initialize its resources by scanning your classes using 
Java packages declared in this 
-
-~~~~~~~
-web.xml
-~~~~~~~
- file, or you can have full control over the configuration via a configuration 
file, named 
-
-~~~~~~~
-struts.xml
-~~~~~~~
-\. These resources include action mappings, to direct input to server\-side 
Action classes, and result types, to select output pages\. 
-
-Here's a typical configuration (
-
-~~~~~~~
-struts.xml
-~~~~~~~
-) for a login workflow:
-
-
-~~~~~~~
-
+```
+
+Looking over the markup, it's easy to see why Java web development without the 
aid from a modern framework is hard!
+So far, we've only coded two controls, and there are six more to go! Let's 
rewrite and finish the form using Struts Tags.
+
+![nutshell.gif](attachments/att1846_nutshell.gif)
+
+```html
+<s:actionerror/>
+<s:form action="Profile\_update" validate="true">
+    <s:textfield label="Username" name="username"/>
+    <s:password label="Password" name="password"/>
+    <s:password label="(Repeat) Password" name="password2"/>
+    <s:textfield label="Full Name" name="fullName"/>
+    <s:textfield label="From Address" name="fromAddress"/>
+    <s:textfield label="Reply To Address" name="replyToAddress"/>
+    <s:submit value="Save" name="Save"/>
+    <s:submit action="Register_cancel" value="Cancel" name="Cancel"  
onclick="form.onsubmit=null"/>
+</s:form>
+```
+
+The Struts Tags also support validation and localization as first-class 
features. So not only is there less code, 
+but there is _more_ utility. In about the same amount of code as two 
conventional controls, the Struts Tags can create 
+an entire data-input form with eight controls. Not only is there less code, 
but the code is easier to read and maintain.
+
+## Struts Configuration in a Nutshell
+
+A web application uses a deployment descriptor to initialize resources like 
filters and listeners. The web deployment 
+descriptor is formatted as a XML document and named `web.xml`. Struts can 
either initialize its resources by scanning 
+your classes using Java packages declared in this `web.xml` file, or you can 
have full control over the configuration 
+via a configuration file, named `struts.xml`. These resources include action 
mappings, to direct input to server-side 
+Action classes, and result types, to select output pages. 
+
+Here's a typical configuration (`struts.xml`) for a login workflow:
+
+```xml
 <struts>
     <package name="default" extends="struts-default">
         <action name="Logon" class="mailreader2.Logon">
@@ -111,40 +92,50 @@ struts.xml
         </action>
     </package>
 </struts>
+```
 
-~~~~~~~
+> The framework provides general-purpose defaults, so we can start using 
Struts right away, "out of the box". 
+Any factory defaults can be overridden in an application's configuration, as 
needed.
 
-(light\-on) The framework provides general\-purpose defaults, so we can start 
using Struts right away, "out of the box"\. Any factory defaults can be 
overridden in an application's configuration, as needed\.
+## Struts MVC in a Nutshell
 
-####Struts MVC in a Nutshell####
+Struts is a [Model View Controller](../primer.html#mvc) framework. Struts 
provides Controller and View components, 
+and integrates with other technologies to provide the Model. The framework's 
Controller acts as a bridge between 
+the application's Model and the web View. 
 
-Struts is a [Model View 
Controller](http://struts\.apache\.org/primer\.html\#mvc)^[http://struts\.apache\.org/primer\.html\#mvc]
 framework\. Struts provides Controller and View components, and integrates 
with other technologies to provide the Model\. The framework's Controller acts 
as a bridge between the application's Model and the web View\. 
+To make it easier to present dynamic data, the framework includes a library of 
markup tags. The tags interact with 
+the framework's validation and internationalization features, to ensure that 
input is correct and output is localized. 
+The tag library can be used with JSP, FreeMarker, or Velocity. Of course, 
other tag libraries, JSTL, and AJAX can also 
+be used, with or without the Struts tags. JavaServer Faces components are also 
supported.
 
-To make it easier to present dynamic data, the framework includes a library of 
markup tags\. The tags interact with the framework's validation and 
internationalization features, to ensure that input is correct and output is 
localized\. The tag library can be used with JSP, FreeMarker, or Velocity\. Of 
course, other tag libraries, JSTL, and AJAX can also be used, with or without 
the Struts tags\. JavaServer Faces components are also supported\.
+When a request is received, the Controller invokes an Action class. The Action 
class examines or updates 
+the application's state by consulting the Model (or, preferably, an interface 
representing the Model). To transfer 
+data between the Model and the View, properties can be placed on the Action 
class, or on a plain old JavaBean. 
 
-When a request is received, the Controller invokes an Action class\. The 
Action class examines or updates the application's state by consulting the 
Model (or, preferably, an interface representing the Model)\. To transfer data 
between the Model and the View, properties can be placed on the Action class, 
or on a plain old JavaBean\. 
+Most often, the Model is represented as a graph of JavaBean objects. The Model 
should do the "heavy lifting", 
+and the Action will act as a "traffic cop" or adapter. The framework provides 
sophisticated, automatic type conversion 
+to simplify transferring data between rich domain objects and text-only HTTP 
requests. 
 
-Most often, the Model is represented as a graph of JavaBean objects\. The 
Model should do the "heavy lifting", and the Action will act as a "traffic cop" 
or adapter\. The framework provides sophisticated, automatic type conversion to 
simplify transfering data between rich domain objects and text\-only HTTP 
requests\. 
+Struts is extensible. _Very_  extensible. Every class deployed by the 
framework is based on an interface. We provide 
+all the base classes an application may ever need, but if we missed something, 
it's easy to add your own. We provide 
+the general-purpose framework, but you can still write _your_  application 
_your_  way.
 
-Struts is extensible\. _Very_  extensible\. Every class deployed by the 
framework is based on an interface\. We provide all the base classes an 
application may ever need, but if we missed something, it's easy to add your 
own\. We provide the general\-purpose framework, but you can still write _your_ 
 application _your_  way\.
+## Is Struts the best choice for every project?
 
-####Is Struts the best choice for every project?####
+Apache Struts 2 helps you create an extensible development environment for 
enterprise-grade applications, based on 
+industry standards and proven design patterns. If you need to write a very 
simple application, with a handful of pages, 
+then you might consider a "Model 1" solution that uses only server pages.
 
-Apache Struts 2 helps you create an extensible development environment for 
enterprise\-grade applications, based on industry standards and proven design 
patterns\. If you need to write a very simple application, with a handful of 
pages, then you might consider a "Model 1" solution that uses only server 
pages\.
+But, if you are writing a more complicated application, with dozens of pages, 
that need to be maintained over time, 
+then Struts can help. For more about whether Model 1 or MVC/Model 2 is right 
for you, 
+see [Understanding JavaServer Pages Model 2 
architecture](http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html).
 
 
-But, if you are writing a more complicated application, with dozens of pages, 
that need to be maintained over time, then Struts can help\. For more about 
whether Model 1 or MVC/Model 2 is right for you, see [Understanding JavaServer 
Pages Model 2 
architecture](http://www\.javaworld\.com/javaworld/jw\-12\-1999/jw\-12\-ssj\-jspmvc\.html)^[http://www\.javaworld\.com/javaworld/jw\-12\-1999/jw\-12\-ssj\-jspmvc\.html]\.
 
-
-####Platform Requirements####
+## Platform Requirements
 
 Struts 2 requires 
 
-+ Servlet API 2\.4
-
-+ JSP API 2\.0
-
-+ Java 5
-
-For a full list of requirements, including dependencies used by optional 
plugins, see [Project 
Dependencies](http://struts\.apache\.org/2\.x/struts2\-core/dependencies\.html)^[http://struts\.apache\.org/2\.x/struts2\-core/dependencies\.html]
-
- (ok)  An alternate set of JARs for Java 4 are also available\. See the "J4" 
distribution\. 
+- Servlet API 2.4
+- JSP API 2.0
+- Java 7
 
+For a full list of requirements, including dependencies used by optional 
plugins, see [Project Dependencies](../maven/dependencies.html).

Reply via email to