struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1009449 [6/10] - in /websites/production/struts/content: ./ bootstrap/css/ fonts/ getting-started/ getting-started/attachments/
Date Fri, 31 Mar 2017 05:44:40 GMT
Added: websites/production/struts/content/getting-started/form-validation.html
==============================================================================
--- websites/production/struts/content/getting-started/form-validation.html (added)
+++ websites/production/struts/content/getting-started/form-validation.html Fri Mar 31 05:44:39 2017
@@ -0,0 +1,309 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8"/>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+  <meta name="Date-Revision-yyyymmdd" content="20140918"/>
+  <meta http-equiv="Content-Language" content="en"/>
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+
+  <title>Form Validation</title>
+
+  <link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,400italic,600italic,700italic" rel="stylesheet" type="text/css">
+  <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
+  <link href="/css/main.css" rel="stylesheet">
+  <link href="/css/custom.css" rel="stylesheet">
+
+  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
+  <script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script>
+  <script type="text/javascript" src="/js/community.js"></script>
+</head>
+<body>
+
+<a href="http://github.com/apache/struts" class="github-ribbon">
+  <img style="position: absolute; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
+</a>
+
+<header>
+  <nav>
+    <div role="navigation" class="navbar navbar-default navbar-fixed-top">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" data-toggle="collapse" data-target="#struts-menu" class="navbar-toggle">
+            Menu
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a href="/index.html" class="navbar-brand logo"><img src="/img/struts-logo.svg"></a>
+        </div>
+        <div id="struts-menu" class="navbar-collapse collapse">
+          <ul class="nav navbar-nav">
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Home<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/index.html">Welcome</a></li>
+                <li><a href="/downloads.html">Downloads</a></li>
+                <li><a href="/announce.html">Announcements</a></li>
+                <li><a href="http://www.apache.org/licenses/">License</a></li>
+                <li><a href="http://apache.org/foundation/thanks.html">Thanks!</a></li>
+                <li><a href="http://apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Support<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/mail.html">User Mailing List</a></li>
+                <li><a href="https://issues.apache.org/jira/browse/WW">Issue Tracker</a></li>
+                <li><a href="/security.html">Reporting Security Issues</a></li>
+                <li class="divider"></li>
+                <li><a href="/maven/project-info.html">Project info</a></li>
+                <li><a href="/maven/struts2-core/dependencies.html">Struts Core dependencies</a></li>
+                <li><a href="/maven/struts2-plugins/modules.html">Plugin dependencies</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Documentation<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/birdseye.html">Birds Eye</a></li>
+                <li><a href="/primer.html">Key Technologies</a></li>
+                <li><a href="/kickstart.html">Kickstart FAQ</a></li>
+                <li><a href="https://cwiki.apache.org/confluence/display/WW/Home">Wiki</a></li>
+                <li class="divider"></li>
+                <li><a href="/docs/home.html">Getting started</a></li>
+                <li><a href="/docs/tutorials.html">Tutorials</a></li>
+                <li><a href="/docs/faqs.html">FAQs</a></li>
+                <li><a href="/docs/guides.html">Guides</a></li>
+                <li class="divider"></li>
+                <li><a href="/maven/struts2-core/apidocs/index.html">Struts Core API</a></li>
+                <li><a href="/docs/plugins.html">Plugin APIs</a></li>
+                <li><a href="/docs/tag-reference.html">Tag reference</a></li>
+                <li><a href="http://cwiki.apache.org/S2PLUGINS/home.html">Plugin registry</a></li>
+                <li class="divider"></li>
+                <li><a href="/getting-started/getting-started.html">Getting Started (WIP)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Contributing<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/youatstruts.html">You at Struts</a></li>
+                <li><a href="/helping.html">How to Help FAQ</a></li>
+                <li><a href="/dev-mail.html">Development Lists</a></li>
+                <li class="divider"></li>
+                <li><a href="/submitting-patches.html">Submitting patches</a></li>
+                <li><a href="/builds.html">Source Code</a></li>
+                <li><a href="/coding-standards.html">Coding standards</a></li>
+                <li class="divider"></li>
+                <li><a href="/releases.html">Release Guidelines</a></li>
+                <li><a href="/bylaws.html">PMC Charter</a></li>
+                <li><a href="/volunteers.html">Volunteers</a></li>
+                <li><a href="https://git-wip-us.apache.org/repos/asf?p=struts.git">Source Repository</a></li>
+              </ul>
+            </li>
+            <li class="apache"><a href="http://www.apache.org/"><img src="/img/apache.png"></a></li>
+          </ul>
+        </div>
+      </div>
+    </div>
+  </nav>
+</header>
+
+
+<article class="container">
+  <section class="col-md-12">
+    <h2 id="form-validation">Form Validation</h2>
+
+<p>This tutorial assumes you’ve completed the <em>Processing Forms</em>  tutorial and have a working form_processing project. The example code for this tutorial, form_validation, is available for checkout from the Struts 2 GitHub repository: <a href="https://github.com/apache/struts-examples">https://github.com/apache/struts-examples</a>.</p>
+
+<blockquote>
+
+</blockquote>
+
+<p><strong>Introduction</strong></p>
+
+<p>In this tutorial we’ll explore using Struts 2 to validate the user’s input on a form. There are two ways you can use Struts 2 to do form validation. This tutorial will cover the more basic method, where the validation is included in the Struts 2 Action class.</p>
+
+<table>
+  <tbody>
+    <tr>
+      <td>The <a href="http://struts.apache.org/mail.html">Struts 2 user mailing list</a>^[http://struts.apache.org/mail.html] is an excellent place to get help. If you are having a problem getting the tutorial example applications to work search the Struts 2 mailing list. If you don’t find an answer to your problem, post a question on the mailing list.</td>
+    </tr>
+  </tbody>
+</table>
+
+<table>
+  <tbody>
+    <tr>
+    </tr>
+  </tbody>
+</table>
+
+<p><strong>Add validate Method</strong></p>
+
+<p>To enable the Struts 2 Action class to validate a user’s input on a Struts 2 form, you must define a validate method in your Action class. Using the example from <em>Processing Forms</em>  tutorial, let’s say that we have these business rules:</p>
+
+<ol>
+  <li>User must provide a first name</li>
+  <li>User must provide an email address</li>
+  <li>User younger then 18 cannot register</li>
+</ol>
+
+<p>If you recall from the <em>Processing Forms</em>  tutorial the user’s input into the form fields is placed by Struts 2 into the Java model class personBean. So a user’s input into the firstName field would end up as the value for personBean’s firstName instance field (via the personBean.setFirstName method).</p>
+
+<p>In the validate method we can refer to get the values of personBean’s instance fields by using the appropriate get methods. Once we have the values we can employ logic to enforce our business rules.</p>
+
+<p>Add the following validate method to Register.java (the Action class).</p>
+
+<p><strong>validate method</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>	public void validate(){
+		
+		if ( personBean.getFirstName().length() == 0 ){	
+
+			addFieldError( "personBean.firstName", "First name is required." );
+			
+		}
+		
+				
+		if ( personBean.getEmail().length() == 0 ){	
+
+			addFieldError( "personBean.email", "Email is required." );
+			
+		}
+		
+		if ( personBean.getAge() &lt; 18 ){	
+
+			addFieldError( "personBean.age", "Age is required and must be 18 or older" );
+			
+		}
+		
+		
+	}
+
+</code></pre>
+</div>
+
+<p>When the user presses the submit button on the register form, Struts 2 will transfer the user’s input to the personBean’s instance fields. Then Struts 2 will automatically execute the validate method. If any of the if statements are true, Struts 2 will call its addFieldError method (which our Action class inherited by extending ActionSupport).</p>
+
+<p>If any errors have been added then Struts 2 will not proceed to call the execute method. Rather the Struts 2 framework will return “input” as the result of calling the action.</p>
+
+<p><strong>Handle Input Being Returned</strong></p>
+
+<p>So what should we do if Struts 2 returns “input” indicating that the user’s input in the form is not valid? In most cases we will want to redisplay the web page that has the form and include in the form error messages to inform the user what is wrong.</p>
+
+<p>To handle the return value of “input” we need to add the following result to our action node in struts.xml.</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>&lt;result name="input"&gt;/register.jsp&lt;/result&gt;
+
+</code></pre>
+</div>
+
+<p>The above result node goes just after the success result node for the register action and before the closing of the action node.</p>
+
+<p><strong>Error Messages</strong></p>
+
+<p>So when validation fails and Struts 2 returns input, the Struts 2 framework will redisplay the register.jsp. Since we used Struts 2 form tags, automatically Struts 2 will add the error messages. These error messages are the ones we specified in the addFieldError method call. The addFieldError method takes two arguments. The first is the form field name to which the error applies and the second is the error message to display above that form field.</p>
+
+<p>So the following addFieldError method call:</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>addFieldError( "personBean.firstName", "First name is required.")
+
+</code></pre>
+</div>
+
+<p>will cause the message “First name is required” to be displayed above the firstName field on the form.</p>
+
+<p>If you have made the above changes to the <em>Processing Forms</em>  tutorial or you have downloaded from <a href="http://code.google.com/p/struts2-examples/downloads/list">Google Code</a>^[http://code.google.com/p/struts2-examples/downloads/list] either the Form_Validation_Struts2_Ant or Form_Validation_Struts2_Mvn projects run the application (see the README.txt in the project root folder). Click on the Please register link. On the registration form, just click the submit button and you should see:</p>
+
+<p><img src="attachments/att14975003_form_errors.png" alt="form_errors.png" /></p>
+
+<p>Struts 2 called the validate method, validation failed, the register.jsp was displayed with the error messages.</p>
+
+<p><strong>Styling The Error Messages</strong></p>
+
+<p>The Struts 2 s:head tag can be used to provide CSS that includes a style for the error message. Add</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>&lt;s:head /&gt;
+</code></pre>
+</div>
+<p>to register.jsp before the closing HTML</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>&lt;/head&gt;
+</code></pre>
+</div>
+<p>tag. Go through the same steps as above and you should see:</p>
+
+<p><img src="attachments/att14975001_form_errors_styled.png" alt="form_errors_styled.png" /></p>
+
+<p><strong>Summary</strong></p>
+
+<p>This tutorial covered validating a user’s form input by adding a validate method to an Action class. There is another more sophisticated way to validate user input using XML. If you want to learn more about using XML for validation in Struts 2 see <em>Validation</em> .</p>
+
+<p><strong>Up Next</strong></p>
+
+<p>In our next tutorial we’ll cover how to use message resource files to separate out the text from the view page.</p>
+
+  </section>
+</article>
+
+
+<footer class="container">
+  <div class="col-md-12">
+    Copyright &copy; 2000-2016 <a href="http://www.apache.org/">The Apache Software Foundation </a>.
+    All Rights Reserved.
+  </div>
+  <div class="col-md-12">
+    Apache Struts, Struts, Apache, the Apache feather logo, and the Apache Struts project logos are
+    trademarks of The Apache Software Foundation.
+  </div>
+  <div class="col-md-12">Logo and website design donated by <a href="https://softwaremill.com/">SoftwareMill</a>.</div>
+</footer>
+
+<script>!function (d, s, id) {
+  var js, fjs = d.getElementsByTagName(s)[0];
+  if (!d.getElementById(id)) {
+    js = d.createElement(s);
+    js.id = id;
+    js.src = "//platform.twitter.com/widgets.js";
+    fjs.parentNode.insertBefore(js, fjs);
+  }
+}(document, "script", "twitter-wjs");</script>
+<script src="https://apis.google.com/js/platform.js" async="async" defer="defer"></script>
+
+<div id="fb-root"></div>
+
+<script>(function (d, s, id) {
+  var js, fjs = d.getElementsByTagName(s)[0];
+  if (d.getElementById(id)) return;
+  js = d.createElement(s);
+  js.id = id;
+  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
+  fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
+
+
+<script>
+$(function() {
+  return $("h2, h3, h4, h5, h6").each(function(i, el) {
+    var $el, icon, id;
+    $el = $(el);
+    id = $el.attr('id');
+    icon = '<i class="fa fa-link"></i>';
+    if (id) {
+      return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
+    }
+  });
+});
+</script>
+
+</body>
+</html>

Added: websites/production/struts/content/getting-started/getting-started.html
==============================================================================
--- websites/production/struts/content/getting-started/getting-started.html (added)
+++ websites/production/struts/content/getting-started/getting-started.html Fri Mar 31 05:44:39 2017
@@ -0,0 +1,237 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8"/>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+  <meta name="Date-Revision-yyyymmdd" content="20140918"/>
+  <meta http-equiv="Content-Language" content="en"/>
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+
+  <title>Getting started</title>
+
+  <link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,400italic,600italic,700italic" rel="stylesheet" type="text/css">
+  <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
+  <link href="/css/main.css" rel="stylesheet">
+  <link href="/css/custom.css" rel="stylesheet">
+
+  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
+  <script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script>
+  <script type="text/javascript" src="/js/community.js"></script>
+</head>
+<body>
+
+<a href="http://github.com/apache/struts" class="github-ribbon">
+  <img style="position: absolute; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
+</a>
+
+<header>
+  <nav>
+    <div role="navigation" class="navbar navbar-default navbar-fixed-top">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" data-toggle="collapse" data-target="#struts-menu" class="navbar-toggle">
+            Menu
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a href="/index.html" class="navbar-brand logo"><img src="/img/struts-logo.svg"></a>
+        </div>
+        <div id="struts-menu" class="navbar-collapse collapse">
+          <ul class="nav navbar-nav">
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Home<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/index.html">Welcome</a></li>
+                <li><a href="/downloads.html">Downloads</a></li>
+                <li><a href="/announce.html">Announcements</a></li>
+                <li><a href="http://www.apache.org/licenses/">License</a></li>
+                <li><a href="http://apache.org/foundation/thanks.html">Thanks!</a></li>
+                <li><a href="http://apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Support<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/mail.html">User Mailing List</a></li>
+                <li><a href="https://issues.apache.org/jira/browse/WW">Issue Tracker</a></li>
+                <li><a href="/security.html">Reporting Security Issues</a></li>
+                <li class="divider"></li>
+                <li><a href="/maven/project-info.html">Project info</a></li>
+                <li><a href="/maven/struts2-core/dependencies.html">Struts Core dependencies</a></li>
+                <li><a href="/maven/struts2-plugins/modules.html">Plugin dependencies</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Documentation<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/birdseye.html">Birds Eye</a></li>
+                <li><a href="/primer.html">Key Technologies</a></li>
+                <li><a href="/kickstart.html">Kickstart FAQ</a></li>
+                <li><a href="https://cwiki.apache.org/confluence/display/WW/Home">Wiki</a></li>
+                <li class="divider"></li>
+                <li><a href="/docs/home.html">Getting started</a></li>
+                <li><a href="/docs/tutorials.html">Tutorials</a></li>
+                <li><a href="/docs/faqs.html">FAQs</a></li>
+                <li><a href="/docs/guides.html">Guides</a></li>
+                <li class="divider"></li>
+                <li><a href="/maven/struts2-core/apidocs/index.html">Struts Core API</a></li>
+                <li><a href="/docs/plugins.html">Plugin APIs</a></li>
+                <li><a href="/docs/tag-reference.html">Tag reference</a></li>
+                <li><a href="http://cwiki.apache.org/S2PLUGINS/home.html">Plugin registry</a></li>
+                <li class="divider"></li>
+                <li><a href="/getting-started/getting-started.html">Getting Started (WIP)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Contributing<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/youatstruts.html">You at Struts</a></li>
+                <li><a href="/helping.html">How to Help FAQ</a></li>
+                <li><a href="/dev-mail.html">Development Lists</a></li>
+                <li class="divider"></li>
+                <li><a href="/submitting-patches.html">Submitting patches</a></li>
+                <li><a href="/builds.html">Source Code</a></li>
+                <li><a href="/coding-standards.html">Coding standards</a></li>
+                <li class="divider"></li>
+                <li><a href="/releases.html">Release Guidelines</a></li>
+                <li><a href="/bylaws.html">PMC Charter</a></li>
+                <li><a href="/volunteers.html">Volunteers</a></li>
+                <li><a href="https://git-wip-us.apache.org/repos/asf?p=struts.git">Source Repository</a></li>
+              </ul>
+            </li>
+            <li class="apache"><a href="http://www.apache.org/"><img src="/img/apache.png"></a></li>
+          </ul>
+        </div>
+      </div>
+    </div>
+  </nav>
+</header>
+
+
+<article class="container">
+  <section class="col-md-12">
+    <h1 id="getting-started">Getting Started</h1>
+
+<p>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 <a href="/primer.html">Key Technologies Primer</a>.</p>
+
+<p>Follow along with these tutorials to get started using Struts 2. The example code for the tutorials 
+available for checkout from the Struts 2 GitHub repository at <a href="https://github.com/apache/struts-examples">struts-examples</a>.
+The example projects use Maven to manage the artifact dependencies and to build the .war files.</p>
+
+<blockquote>
+  <p>The <a href="/mail.html">Struts 2 user mailing list</a> is an excellent place to get help. If you are having a problem getting 
+the tutorial example applications to work search the Struts 2 mailing list. If you don’t find an answer to your problem, 
+post a question on the mailing list.</p>
+</blockquote>
+
+<h2 id="examples">Examples</h2>
+
+<p><a href="how-to-create-a-struts2-web-application.html">How to create a Struts 2 web application</a></p>
+
+<p><a href="hello-world-using-struts2.html">Hello World Using Struts 2</a></p>
+
+<p><a href="using-tags.html">Using Tags</a></p>
+
+<p><a href="coding-actions.html">Coding Actions</a></p>
+
+<p><a href="processing-forms.html">Processing Forms</a></p>
+
+<p><a href="form-validation.html">Form Validation</a></p>
+
+<p><a href="message-resource-files.html">Message Resource Files</a></p>
+
+<p><a href="exception-handling.html">Exception Handling</a></p>
+
+<p><a href="debugging-struts.html">Debugging Struts</a></p>
+
+<p><a href="form-tags.html">Form Tags</a></p>
+
+<p><a href="form-validation-using-xml.html">Form Validation Using XML</a></p>
+
+<p><a href="control-tags.html">Control Tags</a></p>
+
+<p><a href="wildcard-method-selection.html">Wildcard Method Selection</a></p>
+
+<p><a href="themes.html">Themes</a></p>
+
+<p><a href="spring.html">Spring and Struts 2</a></p>
+
+<p><a href="annotations.html">Annotations</a></p>
+
+<p><a href="introducing-interceptors.html">Introducing Interceptors</a></p>
+
+<p><a href="unit-testing.html">Unit Testing</a></p>
+
+<p><a href="http-session.html">HTTP Session</a></p>
+
+<p><a href="preperable-interface.html">Preparable Interface</a></p>
+
+<p><a href="exclude-parameters.html">Exclude Parameters</a></p>
+
+  </section>
+</article>
+
+
+<footer class="container">
+  <div class="col-md-12">
+    Copyright &copy; 2000-2016 <a href="http://www.apache.org/">The Apache Software Foundation </a>.
+    All Rights Reserved.
+  </div>
+  <div class="col-md-12">
+    Apache Struts, Struts, Apache, the Apache feather logo, and the Apache Struts project logos are
+    trademarks of The Apache Software Foundation.
+  </div>
+  <div class="col-md-12">Logo and website design donated by <a href="https://softwaremill.com/">SoftwareMill</a>.</div>
+</footer>
+
+<script>!function (d, s, id) {
+  var js, fjs = d.getElementsByTagName(s)[0];
+  if (!d.getElementById(id)) {
+    js = d.createElement(s);
+    js.id = id;
+    js.src = "//platform.twitter.com/widgets.js";
+    fjs.parentNode.insertBefore(js, fjs);
+  }
+}(document, "script", "twitter-wjs");</script>
+<script src="https://apis.google.com/js/platform.js" async="async" defer="defer"></script>
+
+<div id="fb-root"></div>
+
+<script>(function (d, s, id) {
+  var js, fjs = d.getElementsByTagName(s)[0];
+  if (d.getElementById(id)) return;
+  js = d.createElement(s);
+  js.id = id;
+  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
+  fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
+
+
+<script>
+$(function() {
+  return $("h2, h3, h4, h5, h6").each(function(i, el) {
+    var $el, icon, id;
+    $el = $(el);
+    id = $el.attr('id');
+    icon = '<i class="fa fa-link"></i>';
+    if (id) {
+      return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
+    }
+  });
+});
+</script>
+
+</body>
+</html>

Added: websites/production/struts/content/getting-started/hello-world-using-struts2.html
==============================================================================
--- websites/production/struts/content/getting-started/hello-world-using-struts2.html (added)
+++ websites/production/struts/content/getting-started/hello-world-using-struts2.html Fri Mar 31 05:44:39 2017
@@ -0,0 +1,694 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8"/>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+  <meta name="Date-Revision-yyyymmdd" content="20140918"/>
+  <meta http-equiv="Content-Language" content="en"/>
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+
+  <title>Hello World using Struts 2</title>
+
+  <link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,400italic,600italic,700italic" rel="stylesheet" type="text/css">
+  <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
+  <link href="/css/main.css" rel="stylesheet">
+  <link href="/css/custom.css" rel="stylesheet">
+
+  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
+  <script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script>
+  <script type="text/javascript" src="/js/community.js"></script>
+</head>
+<body>
+
+<a href="http://github.com/apache/struts" class="github-ribbon">
+  <img style="position: absolute; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
+</a>
+
+<header>
+  <nav>
+    <div role="navigation" class="navbar navbar-default navbar-fixed-top">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" data-toggle="collapse" data-target="#struts-menu" class="navbar-toggle">
+            Menu
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a href="/index.html" class="navbar-brand logo"><img src="/img/struts-logo.svg"></a>
+        </div>
+        <div id="struts-menu" class="navbar-collapse collapse">
+          <ul class="nav navbar-nav">
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Home<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/index.html">Welcome</a></li>
+                <li><a href="/downloads.html">Downloads</a></li>
+                <li><a href="/announce.html">Announcements</a></li>
+                <li><a href="http://www.apache.org/licenses/">License</a></li>
+                <li><a href="http://apache.org/foundation/thanks.html">Thanks!</a></li>
+                <li><a href="http://apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Support<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/mail.html">User Mailing List</a></li>
+                <li><a href="https://issues.apache.org/jira/browse/WW">Issue Tracker</a></li>
+                <li><a href="/security.html">Reporting Security Issues</a></li>
+                <li class="divider"></li>
+                <li><a href="/maven/project-info.html">Project info</a></li>
+                <li><a href="/maven/struts2-core/dependencies.html">Struts Core dependencies</a></li>
+                <li><a href="/maven/struts2-plugins/modules.html">Plugin dependencies</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Documentation<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/birdseye.html">Birds Eye</a></li>
+                <li><a href="/primer.html">Key Technologies</a></li>
+                <li><a href="/kickstart.html">Kickstart FAQ</a></li>
+                <li><a href="https://cwiki.apache.org/confluence/display/WW/Home">Wiki</a></li>
+                <li class="divider"></li>
+                <li><a href="/docs/home.html">Getting started</a></li>
+                <li><a href="/docs/tutorials.html">Tutorials</a></li>
+                <li><a href="/docs/faqs.html">FAQs</a></li>
+                <li><a href="/docs/guides.html">Guides</a></li>
+                <li class="divider"></li>
+                <li><a href="/maven/struts2-core/apidocs/index.html">Struts Core API</a></li>
+                <li><a href="/docs/plugins.html">Plugin APIs</a></li>
+                <li><a href="/docs/tag-reference.html">Tag reference</a></li>
+                <li><a href="http://cwiki.apache.org/S2PLUGINS/home.html">Plugin registry</a></li>
+                <li class="divider"></li>
+                <li><a href="/getting-started/getting-started.html">Getting Started (WIP)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Contributing<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/youatstruts.html">You at Struts</a></li>
+                <li><a href="/helping.html">How to Help FAQ</a></li>
+                <li><a href="/dev-mail.html">Development Lists</a></li>
+                <li class="divider"></li>
+                <li><a href="/submitting-patches.html">Submitting patches</a></li>
+                <li><a href="/builds.html">Source Code</a></li>
+                <li><a href="/coding-standards.html">Coding standards</a></li>
+                <li class="divider"></li>
+                <li><a href="/releases.html">Release Guidelines</a></li>
+                <li><a href="/bylaws.html">PMC Charter</a></li>
+                <li><a href="/volunteers.html">Volunteers</a></li>
+                <li><a href="https://git-wip-us.apache.org/repos/asf?p=struts.git">Source Repository</a></li>
+              </ul>
+            </li>
+            <li class="apache"><a href="http://www.apache.org/"><img src="/img/apache.png"></a></li>
+          </ul>
+        </div>
+      </div>
+    </div>
+  </nav>
+</header>
+
+
+<article class="container">
+  <section class="col-md-12">
+    <h2 id="hello-world-using-struts-2">Hello World Using Struts 2</h2>
+
+<p>When you click on a hyperlink or submit an HTML form in a Struts 2 web application, the input is not sent to another server page, but to a Java class that you provide. These classes are called Actions. After the Action fires, a Result selects a resource to render the response. The resource is generally a server page, but it can also be a PDF file, an Excel spreadsheet, or a Java applet window.</p>
+
+<p>Suppose you want to create a simple “Hello World” example that displays a welcome message. After setting up an empty basic Struts 2 web application (see <a href="#PAGE_14811860">How To Create A Struts 2 Web Application</a>), to create a “Hello World” example, you need to do four things:</p>
+
+<ol>
+  <li>
+    <p>Create a class to store the welcome message (the model)</p>
+  </li>
+  <li>
+    <p>Create a server page to present the message (the view)</p>
+  </li>
+  <li>
+    <p>Create an Action class to control the interaction between the user, the model, and the view (the controller)</p>
+  </li>
+  <li>
+    <p>Create a mapping (struts.xml) to couple the Action class and view</p>
+  </li>
+</ol>
+
+<p>By creating these components, we are separating the work flow into three well-known concerns: the View, the Model, and the Controller. Separating concerns makes it easier to manage applications as they become more complex.</p>
+
+<table>
+  <tbody>
+    <tr>
+    </tr>
+  </tbody>
+</table>
+
+<p>Let’s look at an example model class, Action, server page, and mapping. If you like, fire up your Java IDE, and enter the code as we go.</p>
+
+<blockquote>
+  <p>This tutorial assumes you’ve completed the <a href="#PAGE_14811860">How To Create A Struts 2 Web Application</a> tutorial and have a working basic Struts project. The example code for this tutorial, helloworld, is available for checkout from the</p>
+</blockquote>
+
+<blockquote>
+  <p>Struts 2 GitHub repository at <a href="https://github.com/apache/struts-examples">https://github.com/apache/struts-examples</a>. The example projects use Maven</p>
+</blockquote>
+
+<blockquote>
+  <p>to manage the artifact dependencies and to build the .war files.</p>
+</blockquote>
+
+<blockquote>
+
+</blockquote>
+
+<p><strong>The Code</strong></p>
+
+<p>Let’s modify either the basic_struts project to add a model class to store our message, a view that displays our message, an Action class to act as the controller, and a configuration that ties everything together.</p>
+
+<table>
+  <tbody>
+    <tr>
+      <td>The <a href="http://struts.apache.org/mail.html">Struts 2 user mailing list</a>^[http://struts.apache.org/mail.html] is an excellent place to get help. If you are having a problem getting this application to work search the Struts 2 mailing list. If you don’t find an answer to your problem, post a question on the mailing list.</td>
+    </tr>
+  </tbody>
+</table>
+
+<table>
+  <tbody>
+    <tr>
+    </tr>
+  </tbody>
+</table>
+
+<p><strong>Step 1 - Create The Model Class MessageStore.java</strong></p>
+
+<p>If you’re using the Basic_Struts2_Ant project to start with create the MessageStore class in the src folder and if you’re using the Basic_Struts2_Mvn class create the MessageStore class in src/main/java. Be sure to note the package statement below.</p>
+
+<blockquote>
+
+</blockquote>
+
+<blockquote>
+
+</blockquote>
+
+<blockquote>
+  <p>Note that in the code shown below the JavaDoc comments are omitted. In the download example, JavaDoc comments are included.</p>
+</blockquote>
+
+<blockquote>
+
+</blockquote>
+
+<p><strong>MessageStore.java</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>package org.apache.struts.helloworld.model;
+
+public class MessageStore {
+	
+	private String message;
+	
+	public MessageStore() {
+		
+		setMessage("Hello Struts User");
+	}
+
+	public String getMessage() {
+
+		return message;
+	}
+
+	public void setMessage(String message) {
+
+		this.message = message;
+	}
+
+}
+
+</code></pre>
+</div>
+
+<p>In the model class above note the use of public set and get methods to allow access to the private message String attribute. The Struts 2 framework requires that objects you want to expose to the view (HelloWorld.jsp) follow the <a href="http://en.wikipedia.org/wiki/JavaBean\#JavaBean_conventions">JavaBean-style conventions</a>^[http://en.wikipedia.org/wiki/JavaBean#JavaBean_conventions].</p>
+
+<p><strong>Step 2 - Create The Action Class HelloWorldAction.java</strong></p>
+
+<p>We need an Action class to act as the Controller. The Action class responds to a user action (in this example that action will be clicking an HTML hyperlink and sending a specific URL to the Servlet container). One or more of the Action class’s methods are executed and a String result is returned. Based on the value of the result, a specific view page (in this example that view page is HelloWorld.jsp) is rendered.</p>
+
+<p>Note the package and import statements below.</p>
+
+<p><strong>HelloWorldAction.java</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>package org.apache.struts.helloworld.action;
+
+import org.apache.struts.helloworld.model.MessageStore;
+import com.opensymphony.xwork2.ActionSupport;
+
+public class HelloWorldAction extends ActionSupport {
+
+	private static final long serialVersionUID = 1L;
+
+	private MessageStore messageStore;
+	
+	public String execute() throws Exception {
+		
+		messageStore = new MessageStore() ;
+		return SUCCESS;
+	}
+
+	public MessageStore getMessageStore() {
+		return messageStore;
+	}
+
+	public void setMessageStore(MessageStore messageStore) {
+		this.messageStore = messageStore;
+	}
+
+}
+
+</code></pre>
+</div>
+
+<p>The Struts 2 framework will create an object of the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>HelloWorldAction
+</code></pre>
+</div>
+<p> class and call the execute method in response to a user’s action (clicking on a hyperlink that sends a specific URL to the Servlet container).</p>
+
+<p>In this example, the execute method creates an object of class</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>MessageStore
+</code></pre>
+</div>
+<p> and then returns the String constant</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>SUCCESS
+</code></pre>
+</div>
+<p>.</p>
+
+<p>Note also the public getter and setter methods for the private</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>MessageStore
+</code></pre>
+</div>
+<p> object. Since we want to make the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>MessageStore
+</code></pre>
+</div>
+<p> object available to the view page,</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>HelloWorld.jsp
+</code></pre>
+</div>
+<p> we need to follow the <a href="http://en.wikipedia.org/wiki/JavaBean\#JavaBean_conventions">JavaBean-style</a>^[http://en.wikipedia.org/wiki/JavaBean#JavaBean_conventions] of providing get and set methods.</p>
+
+<p><strong>Step 3 - Create The View HelloWorld.jsp</strong></p>
+
+<p>We need a server page to present the message that is stored in the model class</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>MessageStore
+</code></pre>
+</div>
+<p>. Create the below JSP in the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>WebContent
+</code></pre>
+</div>
+<p> folder (if using Ant) or in</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>src/main/webapp
+</code></pre>
+</div>
+<p>(if using Maven).</p>
+
+<p><strong>HelloWorld.jsp</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="err">&lt;</span>%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%&gt;
+<span class="err">&lt;</span>%@ taglib prefix="s" uri="/struts-tags" %&gt;
+<span class="cp">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;</span>
+<span class="nt">&lt;html&gt;</span>
+  <span class="nt">&lt;head&gt;</span>
+    <span class="nt">&lt;meta</span> <span class="na">http-equiv=</span><span class="s">"Content-Type"</span> <span class="na">content=</span><span class="s">"text/html; charset=ISO-8859-1"</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;title&gt;</span>Hello World!<span class="nt">&lt;/title&gt;</span>
+  <span class="nt">&lt;/head&gt;</span>
+
+  <span class="nt">&lt;body&gt;</span>
+    <span class="nt">&lt;h2&gt;&lt;s:property</span> <span class="na">value=</span><span class="s">"messageStore.message"</span> <span class="nt">/&gt;&lt;/h2&gt;</span>
+  <span class="nt">&lt;/body&gt;</span>
+<span class="nt">&lt;/html&gt;</span>
+
+</code></pre>
+</div>
+
+<p>The taglib directive tells the Servlet container that this page will be using the Struts 2 tags and that these tags will be preceded by an</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>s
+</code></pre>
+</div>
+<p>.</p>
+
+<p>The</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>&lt;s:property&gt;
+</code></pre>
+</div>
+<p> tag displays the value returned by calling the method</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>getMessageStore
+</code></pre>
+</div>
+<p> of the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>HelloWorldAction
+</code></pre>
+</div>
+<p> controller class. That method returns a</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>MessageStore
+</code></pre>
+</div>
+<p> object. By adding the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>.message
+</code></pre>
+</div>
+<p> onto the messageStore part of the value attribute we are telling the Struts 2 framework to call the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>getMessage
+</code></pre>
+</div>
+<p> method of that</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>MessageStore
+</code></pre>
+</div>
+<p> object. The</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>getMessage
+</code></pre>
+</div>
+<p> method of class</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>MessageStore
+</code></pre>
+</div>
+<p> returns a String. It is that String that will be displayed by the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>&lt;s:property&gt;
+</code></pre>
+</div>
+<p> tag.</p>
+
+<p>We’ll learn more about tags in the next tutorial. See the <em>Struts Tags</em>  for more information about tags.</p>
+
+<p><strong>Step 4 - Add The Struts Configuration In struts.xml</strong></p>
+
+<p>We need a mapping to tie the URL, the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>HelloWorldAction
+</code></pre>
+</div>
+<p> class (controller), and 
+ the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>HelloWorld.jsp
+</code></pre>
+</div>
+<p> (the view) together. The mapping tells the Struts 2 framework which class will respond to the user’s action (the URL), which method of that class will be executed, and what view to render based on the String result that method returns.</p>
+
+<p>Edit the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>struts.xml
+</code></pre>
+</div>
+<p>file (in the Mvn project that file is in the src/main/resources folder) to add the action mapping. Place the action node (action name=”hello”) between the opening and closing package node, just after the action mapping with the name=”index”. Your complete struts.xml should look like:</p>
+
+<p><strong>struts.xml</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="cp">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
+<span class="cp">&lt;!DOCTYPE struts PUBLIC
+    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+    "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;</span>
+
+<span class="nt">&lt;struts&gt;</span>
+
+  <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;package</span> <span class="na">name=</span><span class="s">"basicstruts2"</span> <span class="na">extends=</span><span class="s">"struts-default"</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"index"</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;result&gt;</span>/index.jsp<span class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;/action&gt;</span>
+		
+    <span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"hello"</span> <span class="na">class=</span><span class="s">"org.apache.struts.helloworld.action.HelloWorldAction"</span> <span class="na">method=</span><span class="s">"execute"</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;result</span> <span class="na">name=</span><span class="s">"success"</span><span class="nt">&gt;</span>/HelloWorld.jsp<span class="nt">&lt;/result&gt;</span>
+    <span class="nt">&lt;/action&gt;</span>
+  <span class="nt">&lt;/package&gt;</span>
+<span class="nt">&lt;/struts&gt;</span>
+
+</code></pre>
+</div>
+
+<p><strong>Step 5 - Create The URL Action</strong></p>
+
+<p>In index.jsp (see WebContent folder for Ant project and src/main/webapp for Mvn project) let’s add an Action URL the user can click on to tell the Struts 2 framework to run the execute method of the HelloWorldAction class and render the HelloWorld.jsp view.</p>
+
+<p>First add the taglib directive at the top of the jsp</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>&lt;%@ taglib prefix="s" uri="/struts-tags" %&gt;
+</code></pre>
+</div>
+<p>. Next add this p tag</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>&lt;p&gt;&lt;a href="&lt;s:url action='hello'/&gt;"&gt;Hello World&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+</div>
+<p>after the h1 tag. Your new index.jsp should look like:</p>
+
+<p><strong>index.jsp</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="err">&lt;</span>%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+    pageEncoding="ISO-8859-1"%&gt;
+<span class="err">&lt;</span>%@ taglib prefix="s" uri="/struts-tags" %&gt;
+<span class="cp">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;</span>
+<span class="nt">&lt;html&gt;</span>
+<span class="nt">&lt;head&gt;</span>
+<span class="nt">&lt;meta</span> <span class="na">http-equiv=</span><span class="s">"Content-Type"</span> <span class="na">content=</span><span class="s">"text/html; charset=ISO-8859-1"</span><span class="nt">&gt;</span>
+<span class="nt">&lt;title&gt;</span>Basic Struts 2 Application - Welcome<span class="nt">&lt;/title&gt;</span>
+<span class="nt">&lt;/head&gt;</span>
+<span class="nt">&lt;body&gt;</span>
+<span class="nt">&lt;h1&gt;</span>Welcome To Struts 2!<span class="nt">&lt;/h1&gt;</span>
+<span class="nt">&lt;p&gt;&lt;a</span> <span class="na">href=</span><span class="s">"&lt;s:url action='hello'/&gt;"</span><span class="nt">&gt;</span>Hello World<span class="nt">&lt;/a&gt;&lt;/p&gt;</span>
+<span class="nt">&lt;/body&gt;</span>
+<span class="nt">&lt;/html&gt;</span>
+
+
+</code></pre>
+</div>
+
+<p>The Struts url tag creates the URL with an action of hello. The hello action was mapped to the HelloWorldAction class and its execute method. When the user clicks on the above URL it will cause the Struts 2 framework to run the execute method of the HelloWorldAction class. After that method returns the String success, the view page HelloWorld.jsp will be rendered.</p>
+
+<p><strong>Step 6 - Build the WAR File and Run The Application</strong></p>
+
+<p>Execute mvn clean package to create the war file.</p>
+
+<p>Copy the war file to your Servlet container. After your Servlet container successfully deploys the war file go to this URL <a href="http://localhost:8080/helloworld/index.action">http://localhost:8080/helloworld/index.action</a> where you should see the following:</p>
+
+<p><img src="attachments/att14974994_Struts2HelloWorld.png" alt="Struts2HelloWorld.png" /></p>
+
+<p>Click on the Hello World link and you should get the HelloWorld.jsp page:</p>
+
+<p><img src="attachments/att14974993_Hello.png" alt="Hello.png" /></p>
+
+<p><strong>Getting Help</strong></p>
+
+<p>The <a href="http://struts.apache.org/mail.html">Struts 2 user mailing list</a>^[http://struts.apache.org/mail.html] is an excellent place to get help. If you are having a problem getting this application to work search the Struts 2 mailing list. If you don’t find an answer to your problem, post a question on the mailing list.</p>
+
+<p><strong>How the Code Works</strong></p>
+
+<p>Your browser sends to the web server a request for the URL <a href="http://localhost:8080/Hello_World_Struts2_Ant/hello.action">http://localhost:8080/Hello_World_Struts2_Ant/hello.action</a>.</p>
+
+<ol>
+  <li>The container receives from the web server a request for the resource</li>
+</ol>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>hello.action
+</code></pre>
+</div>
+<p>. According to the settings loaded from the <em>web.xml</em> , the container finds that all requests are being routed to</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
+</code></pre>
+</div>
+<p>, including the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>*.action
+</code></pre>
+</div>
+<p>requests. The StrutsPrepareAndExecuteFilter is the entry point into the framework.</p>
+
+<ol>
+  <li>The framework looks for an action mapping named “hello”, and it finds that this mapping corresponds to the class “HelloWorldAction”. The framework instantiates the Action and calls the Action’s</li>
+</ol>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>execute
+</code></pre>
+</div>
+<p>method.</p>
+
+<ol>
+  <li>The</li>
+</ol>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>execute
+</code></pre>
+</div>
+<p>method creates the MessageStore object and returns</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>SUCCESS
+</code></pre>
+</div>
+<p>. The framework checks the action mapping to see what page to load if</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>SUCCESS
+</code></pre>
+</div>
+<p>is returned. The framework tells the container to render as the response to the request, the resource</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>HelloWorld.jsp
+</code></pre>
+</div>
+<p>.</p>
+
+<ol>
+  <li>As the page</li>
+</ol>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>HelloWorld.jsp
+</code></pre>
+</div>
+<p>is being processed, the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>&lt;s:property value="messageStore.message" /&gt;
+</code></pre>
+</div>
+<p>tag calls the getter</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>getMessageStore
+</code></pre>
+</div>
+<p>of the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>HelloWorld
+</code></pre>
+</div>
+<p>Action and then calls the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>getMessage
+</code></pre>
+</div>
+<p>of the MessageStore object returned by</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>getMessageStore
+</code></pre>
+</div>
+<p>, and the tag merges into the response the value of the message attribute.</p>
+
+<ol>
+  <li>A pure HTML response is sent back to the browser.</li>
+</ol>
+
+<p><strong>What to Remember</strong></p>
+
+<p>The framework uses Actions to process HTML forms and other requests. The</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>Action
+</code></pre>
+</div>
+<p>class returns a result-name such as</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>SUCCESS
+</code></pre>
+</div>
+<p>,</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>ERROR
+</code></pre>
+</div>
+<p>, or</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>INPUT
+</code></pre>
+</div>
+<p>. Based on the mappings loaded from the</p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>struts.xml
+</code></pre>
+</div>
+<p>, a given result-name may select a page (as in this example), another action, or some other web resource (image, PDF).</p>
+
+<p>When a server page is rendered, most often it will include dynamic data provided by the Action. To make it easy to display dynamic data, the framework provides a set of tags that can be used along with HTML markup to create a server page.</p>
+
+  </section>
+</article>
+
+
+<footer class="container">
+  <div class="col-md-12">
+    Copyright &copy; 2000-2016 <a href="http://www.apache.org/">The Apache Software Foundation </a>.
+    All Rights Reserved.
+  </div>
+  <div class="col-md-12">
+    Apache Struts, Struts, Apache, the Apache feather logo, and the Apache Struts project logos are
+    trademarks of The Apache Software Foundation.
+  </div>
+  <div class="col-md-12">Logo and website design donated by <a href="https://softwaremill.com/">SoftwareMill</a>.</div>
+</footer>
+
+<script>!function (d, s, id) {
+  var js, fjs = d.getElementsByTagName(s)[0];
+  if (!d.getElementById(id)) {
+    js = d.createElement(s);
+    js.id = id;
+    js.src = "//platform.twitter.com/widgets.js";
+    fjs.parentNode.insertBefore(js, fjs);
+  }
+}(document, "script", "twitter-wjs");</script>
+<script src="https://apis.google.com/js/platform.js" async="async" defer="defer"></script>
+
+<div id="fb-root"></div>
+
+<script>(function (d, s, id) {
+  var js, fjs = d.getElementsByTagName(s)[0];
+  if (d.getElementById(id)) return;
+  js = d.createElement(s);
+  js.id = id;
+  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
+  fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
+
+
+<script>
+$(function() {
+  return $("h2, h3, h4, h5, h6").each(function(i, el) {
+    var $el, icon, id;
+    $el = $(el);
+    id = $el.attr('id');
+    icon = '<i class="fa fa-link"></i>';
+    if (id) {
+      return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
+    }
+  });
+});
+</script>
+
+</body>
+</html>

Added: websites/production/struts/content/getting-started/how-to-create-a-struts2-web-application.html
==============================================================================
--- websites/production/struts/content/getting-started/how-to-create-a-struts2-web-application.html (added)
+++ websites/production/struts/content/getting-started/how-to-create-a-struts2-web-application.html Fri Mar 31 05:44:39 2017
@@ -0,0 +1,402 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8"/>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+  <meta name="Date-Revision-yyyymmdd" content="20140918"/>
+  <meta http-equiv="Content-Language" content="en"/>
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+
+  <title>How to create a Struts 2 web application</title>
+
+  <link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,400italic,600italic,700italic" rel="stylesheet" type="text/css">
+  <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
+  <link href="/css/main.css" rel="stylesheet">
+  <link href="/css/custom.css" rel="stylesheet">
+
+  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
+  <script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script>
+  <script type="text/javascript" src="/js/community.js"></script>
+</head>
+<body>
+
+<a href="http://github.com/apache/struts" class="github-ribbon">
+  <img style="position: absolute; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
+</a>
+
+<header>
+  <nav>
+    <div role="navigation" class="navbar navbar-default navbar-fixed-top">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" data-toggle="collapse" data-target="#struts-menu" class="navbar-toggle">
+            Menu
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a href="/index.html" class="navbar-brand logo"><img src="/img/struts-logo.svg"></a>
+        </div>
+        <div id="struts-menu" class="navbar-collapse collapse">
+          <ul class="nav navbar-nav">
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Home<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/index.html">Welcome</a></li>
+                <li><a href="/downloads.html">Downloads</a></li>
+                <li><a href="/announce.html">Announcements</a></li>
+                <li><a href="http://www.apache.org/licenses/">License</a></li>
+                <li><a href="http://apache.org/foundation/thanks.html">Thanks!</a></li>
+                <li><a href="http://apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Support<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/mail.html">User Mailing List</a></li>
+                <li><a href="https://issues.apache.org/jira/browse/WW">Issue Tracker</a></li>
+                <li><a href="/security.html">Reporting Security Issues</a></li>
+                <li class="divider"></li>
+                <li><a href="/maven/project-info.html">Project info</a></li>
+                <li><a href="/maven/struts2-core/dependencies.html">Struts Core dependencies</a></li>
+                <li><a href="/maven/struts2-plugins/modules.html">Plugin dependencies</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Documentation<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/birdseye.html">Birds Eye</a></li>
+                <li><a href="/primer.html">Key Technologies</a></li>
+                <li><a href="/kickstart.html">Kickstart FAQ</a></li>
+                <li><a href="https://cwiki.apache.org/confluence/display/WW/Home">Wiki</a></li>
+                <li class="divider"></li>
+                <li><a href="/docs/home.html">Getting started</a></li>
+                <li><a href="/docs/tutorials.html">Tutorials</a></li>
+                <li><a href="/docs/faqs.html">FAQs</a></li>
+                <li><a href="/docs/guides.html">Guides</a></li>
+                <li class="divider"></li>
+                <li><a href="/maven/struts2-core/apidocs/index.html">Struts Core API</a></li>
+                <li><a href="/docs/plugins.html">Plugin APIs</a></li>
+                <li><a href="/docs/tag-reference.html">Tag reference</a></li>
+                <li><a href="http://cwiki.apache.org/S2PLUGINS/home.html">Plugin registry</a></li>
+                <li class="divider"></li>
+                <li><a href="/getting-started/getting-started.html">Getting Started (WIP)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown">
+              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+                Contributing<b class="caret"></b>
+              </a>
+              <ul class="dropdown-menu">
+                <li><a href="/youatstruts.html">You at Struts</a></li>
+                <li><a href="/helping.html">How to Help FAQ</a></li>
+                <li><a href="/dev-mail.html">Development Lists</a></li>
+                <li class="divider"></li>
+                <li><a href="/submitting-patches.html">Submitting patches</a></li>
+                <li><a href="/builds.html">Source Code</a></li>
+                <li><a href="/coding-standards.html">Coding standards</a></li>
+                <li class="divider"></li>
+                <li><a href="/releases.html">Release Guidelines</a></li>
+                <li><a href="/bylaws.html">PMC Charter</a></li>
+                <li><a href="/volunteers.html">Volunteers</a></li>
+                <li><a href="https://git-wip-us.apache.org/repos/asf?p=struts.git">Source Repository</a></li>
+              </ul>
+            </li>
+            <li class="apache"><a href="http://www.apache.org/"><img src="/img/apache.png"></a></li>
+          </ul>
+        </div>
+      </div>
+    </div>
+  </nav>
+</header>
+
+
+<article class="container">
+  <section class="col-md-12">
+    <h2 id="how-to-create-a-struts-2-web-application">How To Create A Struts 2 Web Application</h2>
+
+<p>This tutorial walks through installing the framework and creating a simple application.</p>
+
+<div class="alert alert-block alert-error">
+
+While the Struts 2 framework is simple to use, creating non-trivial applications assumes a working knowledge 
+of many J2EE technologies, including:
+
+  <ul>
+    <li>Java</li>
+    <li>Filters, JSP, and Tag Libraries</li>
+    <li>JavaBeans</li>
+    <li>HTML and HTTP</li>
+    <li>Web Containers (such as Tomcat)</li>
+    <li>XML</li>
+  </ul> 
+
+</div>
+
+<p><i class="glyphicon glyphicon-info-sign alert-info" aria-hidden="true"></i> For more about supporting technologies, 
+see the <a href="/primer.html">Key Technologies Primer</a>.</p>
+
+<h4 id="java-requirements">Java Requirements</h4>
+
+<p>Struts 2 requires Servlet API 2.4 or higher, JSP 2.0 or higher, and Java 7 or higher.</p>
+
+<h4 id="our-first-application">Our First Application</h4>
+
+<p>To get started using Struts 2 we will create a web application using Maven to manage the artifact dependencies.
+You can checkout all the example applications from the Struts 2 GitHub repository 
+at <a href="https://github.com/apache/struts-examples">struts-examples</a>.</p>
+
+<h3 id="create-struts-2-web-application-using-maven-to-manage-artifacts-and-to-build-the-application">Create Struts 2 Web Application Using Maven To Manage Artifacts and To Build The Application</h3>
+
+<blockquote>
+  <p>This tutorial assumes you know how to create a Java web application that uses Maven to manage artifacts and build 
+the web application archive (war) file.</p>
+</blockquote>
+
+<p><strong>Step 1 - Create A Java Web Application</strong></p>
+
+<p>In your Java IDE create a Java web application with a project name of basic_struts that follows the standard Maven
+project folder structure. In your pom.xml include the following:</p>
+
+<p><strong>pom.xml build node</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;build&gt;</span>
+    <span class="nt">&lt;finalName&gt;</span>basic_struts<span class="nt">&lt;/finalName&gt;</span>
+<span class="nt">&lt;/build&gt;</span>
+</code></pre>
+</div>
+
+<p><strong>Step 2 - Add index.jsp</strong></p>
+
+<p>Our next step is to add a simple <code class="highlighter-rouge">index.jsp</code> to this web application. Create an <code class="highlighter-rouge">index.jsp</code> under <code class="highlighter-rouge">src/main/webapp</code>
+with a title of <strong>Basic Struts 2 Application - Welcome</strong> and in the body add an h1 heading of <strong>Welcome to Struts 2!</strong></p>
+
+<p>Run <code class="highlighter-rouge">mvn clean package</code> to create the war file. Copy the war file into your Servlet container so that it will deploy the war file.</p>
+
+<p>Start up your Servlet container and in a web browser go to <a href="http://localhost:8080/Basic_Struts2_Mvn/index.jsp">http://localhost:8080/Basic_Struts2_Mvn/index.jsp</a>. 
+You should see the following:</p>
+
+<p><img src="attachments/att14974992_Basic_Struts2_Mvn.png" alt="Basic_Struts2_Mvn.png" /></p>
+
+<p><strong>Step 3 - Add Struts 2 Jar Files To Class Path</strong></p>
+
+<p>Now that we know we have a working Java web application, lets add the minimal required Struts 2 framework Jar files 
+to our web application’s class path. In <code class="highlighter-rouge">pom.xml</code> add the following dependency node:</p>
+
+<p><strong>pom.xml dependency node</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;dependency&gt;</span>
+    <span class="nt">&lt;groupId&gt;</span>org.apache.struts<span class="nt">&lt;/groupId&gt;</span>
+    <span class="nt">&lt;artifactId&gt;</span>struts2-core<span class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;version&gt;</span>X.X.X.X<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
+
+<p>Of course replace the X.X.X.X with the current Struts 2 version. Maven will get the <code class="highlighter-rouge">struts2-core</code> jar and the other jar 
+files struts2-core requires (transitive dependencies).</p>
+
+<p><i class="glyphicon glyphicon-info-sign alert-info" aria-hidden="true"></i> Beginning with Struts version 2.2.3 
+you do not need to specify a separate dependency node for javassist.</p>
+
+<p><strong>Step 4 - Add Logging</strong></p>
+
+<p>To see what’s happening under the hood, the example application for this tutorial uses log4j. You’ll need to add to pom.xml a dependency node for the log4j jar file:</p>
+
+<p><strong>pom.xml log4j dependency node</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;dependency&gt;</span>
+    <span class="nt">&lt;groupId&gt;</span>log4j<span class="nt">&lt;/groupId&gt;</span>
+    <span class="nt">&lt;artifactId&gt;</span>log4j<span class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;version&gt;</span>1.2.14<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
+
+<p>Setup a <code class="highlighter-rouge">log4j.xml</code> configuration in the <code class="highlighter-rouge">src/main/resources</code> folder. You can copy the one from the example application, 
+which contains the following</p>
+
+<p><strong>log4j.xml</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="cp">&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span>
+<span class="cp">&lt;!DOCTYPE log4j:configuration PUBLIC "-//log4j/log4j Configuration//EN" "log4j.dtd"&gt;</span>
+
+<span class="nt">&lt;log4j:configuration</span> <span class="na">xmlns:log4j=</span><span class="s">"http://jakarta.apache.org/log4j/"</span><span class="nt">&gt;</span>
+    
+    <span class="nt">&lt;appender</span> <span class="na">name=</span><span class="s">"STDOUT"</span> <span class="na">class=</span><span class="s">"org.apache.log4j.ConsoleAppender"</span><span class="nt">&gt;</span>
+       <span class="nt">&lt;layout</span> <span class="na">class=</span><span class="s">"org.apache.log4j.PatternLayout"</span><span class="nt">&gt;</span> 
+          <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">"ConversionPattern"</span> <span class="na">value=</span><span class="s">"%d %-5p %c.%M:%L - %m%n"</span><span class="nt">/&gt;</span> 
+       <span class="nt">&lt;/layout&gt;</span> 
+    <span class="nt">&lt;/appender&gt;</span>
+ 
+    <span class="c">&lt;!-- specify the logging level for loggers from other libraries --&gt;</span>
+    <span class="nt">&lt;logger</span> <span class="na">name=</span><span class="s">"com.opensymphony"</span><span class="nt">&gt;</span>
+    	<span class="nt">&lt;level</span> <span class="na">value=</span><span class="s">"DEBUG"</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;/logger&gt;</span>
+
+    <span class="nt">&lt;logger</span> <span class="na">name=</span><span class="s">"org.apache.struts2"</span><span class="nt">&gt;</span>
+    	 <span class="nt">&lt;level</span> <span class="na">value=</span><span class="s">"DEBUG"</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;/logger&gt;</span>
+  
+   <span class="c">&lt;!-- for all other loggers log only info and above log messages --&gt;</span>
+     <span class="nt">&lt;root&gt;</span>
+        <span class="nt">&lt;priority</span> <span class="na">value=</span><span class="s">"INFO"</span><span class="nt">/&gt;</span> 
+        <span class="nt">&lt;appender-ref</span> <span class="na">ref=</span><span class="s">"STDOUT"</span> <span class="nt">/&gt;</span> 
+     <span class="nt">&lt;/root&gt;</span> 
+    
+<span class="nt">&lt;/log4j:configuration&gt;</span> 
+</code></pre>
+</div>
+
+<p>Note the above log4j configuration specifies the console as the log target.</p>
+
+<p><strong>Step 5 - Add Struts 2 Servlet Filter</strong></p>
+
+<p>To enable the Struts 2 framework to work with your web application you need to add a Servlet filter class and filter 
+mapping to <code class="highlighter-rouge">web.xml</code>. Below is the filter and filter-mapping nodes you should add to <code class="highlighter-rouge">web.xml</code>.</p>
+
+<p><strong>web.xml Servlet Filter</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;filter&gt;</span>
+    <span class="nt">&lt;filter-name&gt;</span>struts2<span class="nt">&lt;/filter-name&gt;</span>
+    <span class="nt">&lt;filter-class&gt;</span>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter<span class="nt">&lt;/filter-class&gt;</span>
+<span class="nt">&lt;/filter&gt;</span>
+
+<span class="nt">&lt;filter-mapping&gt;</span>
+    <span class="nt">&lt;filter-name&gt;</span>struts2<span class="nt">&lt;/filter-name&gt;</span>
+    <span class="nt">&lt;url-pattern&gt;</span>/*<span class="nt">&lt;/url-pattern&gt;</span>
+<span class="nt">&lt;/filter-mapping&gt;</span>
+</code></pre>
+</div>
+
+<p>For more information about configuring the deployment descriptor for Struts 2 see <code class="highlighter-rouge">web.xml</code>. Note the url-pattern node 
+value is <code class="highlighter-rouge">/*</code> meaning the Struts 2 filter will be applied to all URLs for this web application.</p>
+
+<p><strong>Step 6 - Create struts.xml</strong></p>
+
+<p>Struts 2 can use either an XML configuration file or annotations (or both) to specify the relationship between a URL, 
+a Java class, and a view page (such as <code class="highlighter-rouge">index.jsp</code>). For our basic Struts 2 application, we’ll use a minimal xml 
+configuration. Note the file name is <code class="highlighter-rouge">struts.xml</code> and it should be in the <code class="highlighter-rouge">src/main/resources</code> folder (<code class="highlighter-rouge">struts.xml</code> 
+must be on the web application’s root class path).</p>
+
+<p><strong>struts.xml</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="cp">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
+<span class="cp">&lt;!DOCTYPE struts PUBLIC
+    "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
+    "http://struts.apache.org/dtds/struts-2.5.dtd"&gt;</span>
+
+<span class="nt">&lt;struts&gt;</span>
+
+    <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;package</span> <span class="na">name=</span><span class="s">"basicstruts2"</span> <span class="na">extends=</span><span class="s">"struts-default"</span><span class="nt">&gt;</span>
+
+        <span class="nt">&lt;action</span> <span class="na">name=</span><span class="s">"index"</span><span class="nt">&gt;</span>
+            <span class="nt">&lt;result&gt;</span>/index.jsp<span class="nt">&lt;/result&gt;</span>
+        <span class="nt">&lt;/action&gt;</span>
+
+    <span class="nt">&lt;/package&gt;</span>
+
+<span class="nt">&lt;/struts&gt;</span>
+</code></pre>
+</div>
+
+<p>This minimal Struts 2 configuration file tells the framework that if the URL ends in <code class="highlighter-rouge">index.action</code> to redirect 
+the browser to <code class="highlighter-rouge">index.jsp</code>.</p>
+
+<p>For more information about the struts.xml configuration file see <code class="highlighter-rouge">struts.xml</code>.</p>
+
+<p><strong>Step 7 - Build and Run the Application</strong></p>
+
+<p>With all of the above in place run mvn clean package to create the war file. Remove the previously created war file 
+and exploded web application folder from your Servlet container’s webapps folder. Copy to your Servlet container’s webapps 
+folder the new war you just created.</p>
+
+<p>Start up the Servlet container. View the console where you should see numerous debug messages that tell you 
+the Struts 2 framework is being included in the <code class="highlighter-rouge">Basic_Struts2_Mvn</code> web application.</p>
+
+<p>Open a web browser and go to <a href="http://localhost:8080/Basic_Struts2_Mvn/index.action">http://localhost:8080/Basic_Struts2_Mvn/index.action</a> 
+(note that’s <code class="highlighter-rouge">index.action</code> not <code class="highlighter-rouge">index.jsp</code> at the end of the URL). You should see the same web page as when going to 
+<a href="http://localhost:8080/Basic_Struts2_Mvn/index.jsp">http://localhost:8080/Basic_Struts2_Mvn/index.jsp</a>. View the log 
+messages written to the console and you should find several that discuss <code class="highlighter-rouge">index.action</code> and <code class="highlighter-rouge">index.jsp</code>:</p>
+
+<p><strong>Struts 2 Log Messages</strong></p>
+
+<div class="highlighter-rouge"><pre class="highlight"><code>com.opensymphony.xwork2.DefaultActionProxy.debug:57 - Creating an DefaultActionProxy for namespace / and action name index
+...
+org.apache.struts2.dispatcher.ServletDispatcherResult.debug:57 - Forwarding to location /index.jsp
+</code></pre>
+</div>
+
+<p>Note that the xwork2 artifact is one of the Jar files that is a transitive dependency for the struts2-core Jar file. 
+The xwork2 library is used heavily by the Struts 2 framework.</p>
+
+<p><strong>Getting Help</strong></p>
+
+<p>The <a href="/mail.html">Struts 2 user mailing list</a> is an excellent place to get help.  If you are having a problem getting 
+this Basic Struts 2 application to work search the Struts 2 mailing list. If you don’t find an answer to your problem, 
+post a question on the mailing list.</p>
+
+  </section>
+</article>
+
+
+<footer class="container">
+  <div class="col-md-12">
+    Copyright &copy; 2000-2016 <a href="http://www.apache.org/">The Apache Software Foundation </a>.
+    All Rights Reserved.
+  </div>
+  <div class="col-md-12">
+    Apache Struts, Struts, Apache, the Apache feather logo, and the Apache Struts project logos are
+    trademarks of The Apache Software Foundation.
+  </div>
+  <div class="col-md-12">Logo and website design donated by <a href="https://softwaremill.com/">SoftwareMill</a>.</div>
+</footer>
+
+<script>!function (d, s, id) {
+  var js, fjs = d.getElementsByTagName(s)[0];
+  if (!d.getElementById(id)) {
+    js = d.createElement(s);
+    js.id = id;
+    js.src = "//platform.twitter.com/widgets.js";
+    fjs.parentNode.insertBefore(js, fjs);
+  }
+}(document, "script", "twitter-wjs");</script>
+<script src="https://apis.google.com/js/platform.js" async="async" defer="defer"></script>
+
+<div id="fb-root"></div>
+
+<script>(function (d, s, id) {
+  var js, fjs = d.getElementsByTagName(s)[0];
+  if (d.getElementById(id)) return;
+  js = d.createElement(s);
+  js.id = id;
+  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
+  fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
+
+
+<script>
+$(function() {
+  return $("h2, h3, h4, h5, h6").each(function(i, el) {
+    var $el, icon, id;
+    $el = $(el);
+    id = $el.attr('id');
+    icon = '<i class="fa fa-link"></i>';
+    if (id) {
+      return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
+    }
+  });
+});
+</script>
+
+</body>
+</html>



Mime
View raw message