struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r869821 [32/43] - in /websites/production/struts/content/development/2.x/docs: ./ ajax-validation.data/ big-picture.data/ chaining-interceptor.data/ colophon.data/ config-browser-plugin.data/ create-struts-2-web-application-using-maven-to-m...
Date Wed, 17 Jul 2013 09:31:13 GMT
Added: websites/production/struts/content/development/2.x/docs/stringlength-validator.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/stringlength-validator.html (added)
+++ websites/production/struts/content/development/2.x/docs/stringlength-validator.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,194 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. 
+-->
+<html>
+<head>
+    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <style type="text/css">
+        .dp-highlighter {
+            width:95% !important;
+        }
+    </style>
+    <style type="text/css">
+        .footer {
+            background-image:      url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+            background-repeat:     repeat-x;
+            background-position:   left top;
+            padding-top:           4px;
+            color:                 #666;
+        }
+    </style>
+    <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
+    <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
+    <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
+            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+            <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
+    
+    <script type="text/javascript">
+        SyntaxHighlighter.defaults['toolbar'] = false;
+        SyntaxHighlighter.all();
+    </script>
+    <script type="text/javascript" language="javascript">
+        var hide = null;
+        var show = null;
+        var children = null;
+
+        function init() {
+            /* Search form initialization */
+            var form = document.forms['search'];
+            if (form != null) {
+                form.elements['domains'].value = location.hostname;
+                form.elements['sitesearch'].value = location.hostname;
+            }
+
+            /* Children initialization */
+            hide = document.getElementById('hide');
+            show = document.getElementById('show');
+            children = document.all != null ?
+                    document.all['children'] :
+                    document.getElementById('children');
+            if (children != null) {
+                children.style.display = 'none';
+                show.style.display = 'inline';
+                hide.style.display = 'none';
+            }
+        }
+
+        function showChildren() {
+            children.style.display = 'block';
+            show.style.display = 'none';
+            hide.style.display = 'inline';
+        }
+
+        function hideChildren() {
+            children.style.display = 'none';
+            show.style.display = 'inline';
+            hide.style.display = 'none';
+        }
+    </script>
+    <title>stringlength validator</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+    <tr class="topBar">
+        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a href="core-developers-guide.html">Core Developers Guide</a>&nbsp;&gt;&nbsp;<a href="validation.html">Validation</a>&nbsp;&gt;&nbsp;<a href="stringlength-validator.html">stringlength validator</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="http://www.google.com/search" method="get">
+                <input type="hidden" name="ie" value="UTF-8" />
+                <input type="hidden" name="oe" value="UTF-8" />
+                <input type="hidden" name="domains" value="" />
+                <input type="hidden" name="sitesearch" value="" />
+                <input type="text" name="q" maxlength="255" value="" />
+                <input type="submit" name="btnG" value="Google Search" />
+            </form>
+        </td>
+    </tr>
+</table>
+
+<div id="PageContent">
+    <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+        <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">stringlength validator</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14006">
+                <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14006">Edit Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+                <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14006">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14006">Add Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14006">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14006">Add News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><h1><a shape="rect" name="stringlengthvalidator-Description"></a>Description</h1>
+<p>StringLengthFieldValidator checks that a String field is of a certain length.  If the "minLength"
+parameter is specified, it will make sure that the String has at least that many characters.  If
+the "maxLength" parameter is specified, it will make sure that the String has at most that many
+characters.  The "trim" parameter determines whether it will {@link String#trim() trim} the
+String before performing the length check.  If unspecified, the String will be trimmed.</p>
+
+<h1><a shape="rect" name="stringlengthvalidator-Parameters"></a>Parameters</h1>
+<p></p><ul><li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li><li>maxLength - Integer. The max length of the field value. Default ignore.</li><li>minLength - Integer. The min length of the field value. Default ignore.</li><li>trim - (Optional) Boolean, default true. Trim the field value before evaluating its min/max length. Default true.</li><li>maxLengthExpression - (Optional) String. Defines the max length param as an OGNL expression</li><li>minLengthExpression - (Optional) String. Defines the min length param as an OGNL expression</li><li>trimExpression - (Optional) String. Defines th trim param as an OGNL expression</li></ul>
+
+<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Warning</b><br clear="none"><p>Do not use ${minLengthExpression}, ${maxLengthExpression} and ${trimExpression} as an expression as this will turn into infinitive loop!</p></td></tr></table></div>
+
+<h1><a shape="rect" name="stringlengthvalidator-Examples"></a>Examples</h1>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;validators&gt;
+    &lt;!-- Plain Validator Syntax --&gt;
+    &lt;validator type="stringlength"&gt;
+        &lt;param name="fieldName"&gt;myPurchaseCode&lt;/param&gt;
+        &lt;param name="minLength"&gt;10&lt;/param&gt;
+        &lt;param name="maxLength"&gt;10&lt;/param&gt;
+        &lt;param name="trim"&gt;true&lt;/param&gt;
+        &lt;message&gt;Your purchase code needs to be 10 characters long&lt;/message&gt;
+    &lt;/validator&gt;
+
+    &lt;!-- Field Validator Syntax --&gt;
+    &lt;field name="myPurchaseCode"&gt;
+        &lt;field-validator type="stringlength"&gt;
+             &lt;param name="minLength"&gt;10&lt;/param&gt;
+             &lt;param name="maxLength"&gt;10&lt;/param&gt;
+             &lt;param name="trim"&gt;true&lt;/param&gt;
+             &lt;message&gt;Your purchase code needs to be 10 characters long&lt;/message&gt;
+        &lt;/field-validator&gt;
+    &lt;/field&gt;
+
+    &lt;!-- Field Validator Syntax with expression --&gt;
+    &lt;field name="myPurchaseCode"&gt;
+        &lt;field-validator type="stringlength"&gt;
+             &lt;param name="minLengthExpression"&gt;${minLengthValue}&lt;/param&gt; &lt;!-- will be evaluated as: Integer getMinLengthValue() --&gt;
+             &lt;param name="maxLengthExpression"&gt;${maxLengthValue}&lt;/param&gt; &lt;!-- will be evaluated as: Integer getMaxLengthValue() --&gt;
+             &lt;param name="trimExpression"&gt;${trimValue}&lt;/param&gt; &lt;!-- will be evaluated as: boolean getTrimValue() --&gt;
+             &lt;message&gt;Your purchase code needs to be 10 characters long&lt;/message&gt;
+        &lt;/field-validator&gt;
+    &lt;/field&gt;
+&lt;/validators&gt;
+]]></script>
+</div></div></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file

Added: websites/production/struts/content/development/2.x/docs/struts-1-plugin.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/struts-1-plugin.html (added)
+++ websites/production/struts/content/development/2.x/docs/struts-1-plugin.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,260 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. 
+-->
+<html>
+<head>
+    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <style type="text/css">
+        .dp-highlighter {
+            width:95% !important;
+        }
+    </style>
+    <style type="text/css">
+        .footer {
+            background-image:      url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+            background-repeat:     repeat-x;
+            background-position:   left top;
+            padding-top:           4px;
+            color:                 #666;
+        }
+    </style>
+    <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
+    <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
+    <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
+            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+            <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
+    
+    <script type="text/javascript">
+        SyntaxHighlighter.defaults['toolbar'] = false;
+        SyntaxHighlighter.all();
+    </script>
+    <script type="text/javascript" language="javascript">
+        var hide = null;
+        var show = null;
+        var children = null;
+
+        function init() {
+            /* Search form initialization */
+            var form = document.forms['search'];
+            if (form != null) {
+                form.elements['domains'].value = location.hostname;
+                form.elements['sitesearch'].value = location.hostname;
+            }
+
+            /* Children initialization */
+            hide = document.getElementById('hide');
+            show = document.getElementById('show');
+            children = document.all != null ?
+                    document.all['children'] :
+                    document.getElementById('children');
+            if (children != null) {
+                children.style.display = 'none';
+                show.style.display = 'inline';
+                hide.style.display = 'none';
+            }
+        }
+
+        function showChildren() {
+            children.style.display = 'block';
+            show.style.display = 'none';
+            hide.style.display = 'inline';
+        }
+
+        function hideChildren() {
+            children.style.display = 'none';
+            show.style.display = 'inline';
+            hide.style.display = 'none';
+        }
+    </script>
+    <title>Struts 1 Plugin</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+    <tr class="topBar">
+        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a href="plugin-developers-guide.html">Plugin Developers Guide</a>&nbsp;&gt;&nbsp;<a href="struts-1-plugin.html">Struts 1 Plugin</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="http://www.google.com/search" method="get">
+                <input type="hidden" name="ie" value="UTF-8" />
+                <input type="hidden" name="oe" value="UTF-8" />
+                <input type="hidden" name="domains" value="" />
+                <input type="hidden" name="sitesearch" value="" />
+                <input type="text" name="q" maxlength="255" value="" />
+                <input type="submit" name="btnG" value="Google Search" />
+            </form>
+        </td>
+    </tr>
+</table>
+
+<div id="PageContent">
+    <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+        <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">Struts 1 Plugin</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=44227">
+                <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=44227">Edit Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+                <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=44227">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=44227">Add Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=44227">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=44227">Add News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><p>The Struts 1 plugin allows you to use existing Struts 1 Actions and ActionForms in Struts 2 applications.</p>
+
+<p>This plugin provides a generic Struts 2 Action class to wrap an existing Struts 1 Action, <tt>org.apache.struts2.s1.Struts1Action</tt>.  The wrapper class provides the expected calls to the legacy Struts 1 Action and ActionForm, converting incoming and outgoing objects into the expected forms.  It works by using the <a shape="rect" href="scoped-model-driven-interceptor.html" title="Scoped Model Driven Interceptor">scoped model driven</a> technique that uses a single Object as the model for every page, very similar to how the Struts 1 ActionForm works.  The plugin also provides several interceptors to emulate Struts 1 logic:</p>
+<ul><li><tt>org.apache.struts2.s1.ActionFormValidatorInterceptor</tt> - Integrates the validation of ActionForms into the workflow of Struts 2</li><li><tt>org.apache.struts2.s1.ActionFormResetInterceptor</tt> - Calls the <tt>reset()</tt> method on any discovered ActionForms</li></ul>
+
+
+<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Warning</b><br clear="none">The Struts 1 plugin is currently only intended to allow you to run Strust 1 actions inside a Struts 2 application. It DOES NOT allow you to continue to use the Struts 1 tag libraries in your JSPs. Your JSPs must be converted to use the Struts 2 tag library.
+
+<p>There is a <a shape="rect" class="external-link" href="https://issues.apache.org/struts/browse/WW-2157">JIRA ticket</a> open for enhancing this plugin to allow a more seamless transition from Struts 1 to Struts 2 by supporting continued use of the Struts 1 tag libraries in JSPs, however, there is not a scheduled time frame for that functionality to be made available. (Patches are welcomed!)</p></td></tr></table></div>
+
+<h2><a shape="rect" name="Struts1Plugin-Features"></a>Features</h2>
+
+<ul><li>Can use Struts 1 Actions and ActionForms with no code changes</li><li>Supports Commons Validator-enabled ActionForms</li></ul>
+
+
+<h2><a shape="rect" name="Struts1Plugin-Usage"></a>Usage</h2>
+
+<p>To use existing Struts 1 Actions and ActionForms in a Struts 2 application, create a normal Struts 2 configuration package in <tt>struts.xml</tt>, but have it extend <tt>struts1-default</tt>.  The <tt>struts1-default</tt> package contains several interceptors and a default interceptor stack that work the plugin into the Struts 2 request process.</p>
+
+<p>In the most simple case, where you have a Struts 1 Action that you want to use in Struts 2, configure a Struts 2 action using the wrapper:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Simple Struts 1 configuration</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;action name="myAction" class="org.apache.struts2.s1.Struts1Action"&gt;
+  &lt;param name="className"&gt;com.mycompany.myapp.MyAction&lt;/param&gt;
+  &lt;result&gt;myAction.jsp&lt;/result&gt;
+&lt;/action&gt;
+]]></script>
+</div></div>
+
+<p>Most likely, you will have an ActionForm that your Struts 1 Action expects.  To use an ActionForm, the setup is a little more complicated because you'll need an interceptor that manages the creation and scope (to support request and session scoping like Struts 1) of the ActionForm. </p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Struts 1 Action with a session-scoped ActionForm</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+
+&lt;action name="myFormAction" class="org.apache.struts2.s1.Struts1Action"&gt;
+  &lt;param name="className"&gt;com.mycompany.myapp.MyAction&lt;/param&gt;
+
+  &lt;interceptor-ref name="scopedModelDriven"&gt;
+    &lt;param name="className"&gt;com.mycompany.myapp.MyForm&lt;/param&gt;
+    &lt;param name="name"&gt;gangsterForm&lt;/param&gt;
+    &lt;param name="scope"&gt;session&lt;/param&gt;
+  &lt;/interceptor-ref&gt;
+  &lt;interceptor-ref name="struts1-default"/&gt;
+
+  &lt;result&gt;myAction.jsp&lt;/result&gt;
+&lt;/action&gt;
+]]></script>
+</div></div>
+
+<h2><a shape="rect" name="Struts1Plugin-Example"></a>Example</h2>
+
+<p>This example shows a few Struts 1 Actions, a session-scoped ActionForm, and validation that uses Commons Validator:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
+&lt;!DOCTYPE struts PUBLIC
+	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
+	"http://struts.apache.org/dtds/struts-2.3.dtd"&gt;
+
+&lt;struts&gt;
+  &lt;package name="integration" extends="struts1-default" namespace="/integration"&gt;
+
+    &lt;interceptors&gt;
+      &lt;interceptor name="gangsterForm" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor"&gt;
+        &lt;param name="className"&gt;org.apache.struts2.showcase.integration.GangsterForm&lt;/param&gt;
+        &lt;param name="name"&gt;gangsterForm&lt;/param&gt;
+      &lt;/interceptor&gt;
+      &lt;interceptor name="gangsterValidation" class="org.apache.struts2.s1.ActionFormValidationInterceptor"&gt;
+        &lt;param name="pathnames"&gt;/org/apache/struts/validator/validator-rules.xml,/WEB-INF/validation.xml&lt;/param&gt;
+      &lt;/interceptor&gt;
+
+      &lt;interceptor-stack name="integration"&gt;
+        &lt;interceptor-ref name="staticParams"/&gt;
+        &lt;interceptor-ref name="gangsterForm"/&gt;
+        &lt;interceptor-ref name="modelDriven"/&gt;
+        &lt;interceptor-ref name="actionForm-reset"/&gt;
+        &lt;interceptor-ref name="basicStack"/&gt;
+        &lt;interceptor-ref name="gangsterValidation"/&gt;
+        &lt;interceptor-ref name="workflow"/&gt;
+      &lt;/interceptor-stack&gt;
+    &lt;/interceptors&gt;
+
+    &lt;default-interceptor-ref name="integration"/&gt;
+    &lt;default-action-ref name="editGangster"/&gt;
+
+    &lt;!-- Display entry page that uses Model-Driven technique --&gt;
+    &lt;action name="editGangster" class="org.apache.struts2.s1.Struts1Action"&gt;
+      &lt;param name="className"&gt;org.apache.struts2.showcase.integration.EditGangsterAction&lt;/param&gt;
+      &lt;result&gt;modelDriven.jsp&lt;/result&gt;
+    &lt;/action&gt;
+
+    &lt;!-- Display the result page whose content is populated using the Model-Driven technique --&gt;
+    &lt;action name="saveGangster" class="org.apache.struts2.s1.Struts1Action"&gt;
+      &lt;param name="className"&gt;org.apache.struts2.showcase.integration.SaveGangsterAction&lt;/param&gt;
+      &lt;param name="validate"&gt;true&lt;/param&gt;
+      &lt;result name="input"&gt;modelDriven.jsp&lt;/result&gt;
+      &lt;result&gt;modelDrivenResult.jsp&lt;/result&gt;
+    &lt;/action&gt;
+
+  &lt;/package&gt;
+&lt;/struts&gt;
+]]></script>
+</div></div>
+
+<h2><a shape="rect" name="Struts1Plugin-Settings"></a>Settings</h2>
+
+<p>This plugin doesn't support any global settings.</p>
+
+<h2><a shape="rect" name="Struts1Plugin-Installation"></a>Installation</h2>
+
+<p>This plugin can be installed by copying the plugin jar into your application's <tt>/WEB-INF/lib</tt> directory.  It will need the Struts 1 jar in order to function correctly.</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file

Added: websites/production/struts/content/development/2.x/docs/struts-1-solutions.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/struts-1-solutions.html (added)
+++ websites/production/struts/content/development/2.x/docs/struts-1-solutions.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,253 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. 
+-->
+<html>
+<head>
+    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <style type="text/css">
+        .dp-highlighter {
+            width:95% !important;
+        }
+    </style>
+    <style type="text/css">
+        .footer {
+            background-image:      url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+            background-repeat:     repeat-x;
+            background-position:   left top;
+            padding-top:           4px;
+            color:                 #666;
+        }
+    </style>
+    <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
+    <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
+    <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
+            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+    
+    <script type="text/javascript">
+        SyntaxHighlighter.defaults['toolbar'] = false;
+        SyntaxHighlighter.all();
+    </script>
+    <script type="text/javascript" language="javascript">
+        var hide = null;
+        var show = null;
+        var children = null;
+
+        function init() {
+            /* Search form initialization */
+            var form = document.forms['search'];
+            if (form != null) {
+                form.elements['domains'].value = location.hostname;
+                form.elements['sitesearch'].value = location.hostname;
+            }
+
+            /* Children initialization */
+            hide = document.getElementById('hide');
+            show = document.getElementById('show');
+            children = document.all != null ?
+                    document.all['children'] :
+                    document.getElementById('children');
+            if (children != null) {
+                children.style.display = 'none';
+                show.style.display = 'inline';
+                hide.style.display = 'none';
+            }
+        }
+
+        function showChildren() {
+            children.style.display = 'block';
+            show.style.display = 'none';
+            hide.style.display = 'inline';
+        }
+
+        function hideChildren() {
+            children.style.display = 'none';
+            show.style.display = 'inline';
+            hide.style.display = 'none';
+        }
+    </script>
+    <title>Struts 1 Solutions</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+    <tr class="topBar">
+        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a href="migration-guide.html">Migration Guide</a>&nbsp;&gt;&nbsp;<a href="struts-1-solutions.html">Struts 1 Solutions</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="http://www.google.com/search" method="get">
+                <input type="hidden" name="ie" value="UTF-8" />
+                <input type="hidden" name="oe" value="UTF-8" />
+                <input type="hidden" name="domains" value="" />
+                <input type="hidden" name="sitesearch" value="" />
+                <input type="text" name="q" maxlength="255" value="" />
+                <input type="submit" name="btnG" value="Google Search" />
+            </form>
+        </td>
+    </tr>
+</table>
+
+<div id="PageContent">
+    <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+        <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">Struts 1 Solutions</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14240">
+                <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14240">Edit Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+                <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14240">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14240">Add Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14240">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14240">Add News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><p>This page is meant to be a list of issues and solutions that users ave encountered while migrating existing Struts 1 application to Struts 2, or developing new Webwork-based applications. If you have a solution to the issue that will of course be most helpful, but even if you don't it is worth noting what you encountered none the less in the hopes that someone else can come along and answer it for you, and the rest of us.</p>
+
+<ul><li>How do we change the location of the <tt>struts.xml</tt> file?</li><li>How do we set checkboxes to false (on uncheck)?</li><li>How can we set the focus on a form field?</li><li>What is the analogy to ForwardAction?</li><li>How do we extend an action mapping in struts.xml?</li><li>Can we use DynaBeans?</li><li>How do we set a token to track duplicate submits?</li></ul>
+
+
+<h2><a shape="rect" name="Struts1Solutions-Howdowechangethelocationofthestruts.xmlfile%3F"></a>How do we change the location of the struts.xml file? </h2>
+
+<p>Struts 2 uses a different approach to loading the configuration. The initial <tt>struts.xml</tt> is loaded from the root of the classpath. The easiest way to set that up is to put the <tt>struts.xml</tt> under the <tt>classes</tt> folder. </p>
+
+<p>If maintaining the <tt>struts.xml</tt> under <tt>classes</tt> doesn't work for you, then use the "bootstrap" <tt>struts.xml</tt> to include whatever other <tt>struts.xml</tt>'s you'd like.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;struts&gt;
+   &lt;include file="..\struts.xml"/&gt;
+&lt;/struts&gt;
+]]></script>
+</div></div>
+
+<p>Or, chuck it all and use <a shape="rect" href="zero-configuration.html" title="Zero Configuration">Zero Configuration</a> <img align="middle" class="emoticon" src="https://cwiki.apache.org/confluence/images/icons/emoticons/smile.gif" height="20" width="20" alt="" border="0"></p>
+
+<h2><a shape="rect" name="Struts1Solutions-Howdowesetcheckboxesfalse%28onuncheck%29%3F"></a>How do we set checkboxes false (on uncheck)?</h2>
+
+<p>In Struts 2, checkboxes are stateful, and we don't need to do that anymore. </p>
+
+<p>Just treat the checkbox like any other tag. The framework will notice if a checkbox is "missing" from a request and inject a false value for that checkbox. </p>
+
+<h2><a shape="rect" name="Struts1Solutions-Howcanwesetthefocusonaformfield%3F"></a>How can we set the focus on a form field?</h2>
+
+<p>Struts 1 generates a little JavaScript that helps set the focus, if you specify the field in the JSP.</p>
+
+<p>Another solution is to use a <a shape="rect" class="external-link" href="http://www.codeproject.com/jscript/FocusFirstInput.asp" rel="nofollow">generic Javascript</a> that automatically seeks the first enabled form field on page.</p>
+
+<p>(<a shape="rect" class="external-link" href="http://issues.apache.org/struts/browse/WW-1350">Building this script into Struts 2 is being considered.</a>)</p>
+<ul><li><a shape="rect" class="external-link" href="http://forums.opensymphony.com/thread.jspa?threadID=23777&amp;tstart=0" rel="nofollow">http://forums.opensymphony.com/thread.jspa?threadID=23777&amp;tstart=0</a></li></ul>
+
+
+<h2><a shape="rect" name="Struts1Solutions-WhatistheanalogytoForwardAction%3F"></a>What is the analogy to ForwardAction?</h2>
+
+<p>The default Action class (ActionSupport) returns SUCCESS by default, and SUCCESS is the default result. Using an action to forward directly to a page is easy:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;action name="Welcome" class="com.company.Foo"&gt;
+&lt;result&gt;/pages/Welcome.jsp&lt;/result&gt;
+&lt;/action&gt;
+]]></script>
+</div></div>
+
+<h2><a shape="rect" name="Struts1Solutions-Howdoweemulatethedefault%3D%22true%22attributeofaStruts1.xActionmapping%3F"></a>How do we emulate the default="true" attribute of a Struts 1.x Action mapping?</h2>
+
+<p>Rather than tag the action as being the default, the default action is set by name using <tt>default-action-ref</tt> element.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;default-action-ref name="defaultAction"&gt;
+]]></script>
+</div></div>
+<p>By using an element, rather than an attribute, packages can inherit the default action name.</p>
+
+<h2><a shape="rect" name="Struts1Solutions-Howdoweextendanactionmappinginstruts.xml%3F"></a>How do we extend an action mapping in struts.xml?</h2>
+
+<p>Starting in Struts 1.3, we can use the "extends" attribute in our Struts configuration Action mapping to have it inherit properties from a base mapping.  In Struts 2, that technique is no longer necessary because we have packages.  We can create a package, then set for that package the default Result type, Interceptor chain, and global results.  This leaves very little information to actually be included in an action element.</p>
+
+<p>Here is an example of declaring a custom package:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;package name="chat" extends="struts-default" namespace="/chat"&gt;
+  &lt;global-results&gt;
+    &lt;result name="login" type="freemarker"&gt;/chat/chatLogin.ftl&lt;/result&gt;
+  &lt;/global-results&gt;
+  &lt;default-interceptor-ref name="basicStack"/&gt;
+  ...
+&lt;/package&gt;
+]]></script>
+</div></div>
+<p>In fact, packages themselves can extend other packages, as the "chat" package extends "struts-default" in the above example.</p>
+
+<h2><a shape="rect" name="Struts1Solutions-CanweuseDynaBeans%3F"></a>Can we use DynaBeans?</h2>
+
+<p>Sure, but first, ask "Do we <b>want</b> to use DynaBeans at all?" </p>
+
+<p>Typically, DynaBeans are used to emulate a plain old JavaBean that is utilized by the business logic. If that is the case, then we can just use the plain old JavaBean directly. Struts 2 will happily cope with rich properties, like date fields. We don't have to reduce everything to a String anymore. </p>
+
+<p>Otherwise, DynaBeans can be treated as a regular Java object, if the particular implementation contains a getMap() method.  This method lets OGNL, the Struts 2 expression language, know how to access and set data.  DynaBean variants like the LazyDynaBean can create themselves on-the-fly, where other more static types might need to be created in your Action's constructor before being used.  </p>
+
+<h2><a shape="rect" name="Struts1Solutions-Howdowesetatokentotrackduplicatesubmits%3F"></a>How do we set a token to track duplicate submits? </h2>
+
+<p>In Struts 2,  there shouldn't be any token code in an Action class at all. The Interceptors are designed to do all the work. There are three flavors, the Token Interceptor, the Token Session Interceptor, and the Execute and Wait Interceptor.</p>
+
+<h3><a shape="rect" name="Struts1Solutions-TokenInterceptor"></a>Token Interceptor </h3>
+
+<p>The <a shape="rect" href="token-interceptor.html" title="Token Interceptor">Token Interceptor</a> is most like the Struts 1 approach, except that we don't have to change the Action class to add a lot of busy code. The trade off is that we  <b>do</b> have to include the <a shape="rect" href="token.html" title="token">token</a> tag in the form, to bootstrap the process. In Struts 1, we set the token in the Action, and the form tag detected it. In Struts 2, we set the token in the page, and the Interceptor detects it. </p>
+
+<p>If the Interceptor does detect a duplicate submit, then it automatically returns an "invalid.token" result code, which can be handled via the action mapping. </p>
+
+<h3><a shape="rect" name="Struts1Solutions-TokenSession"></a>Token Session </h3>
+
+<p>The <a shape="rect" href="token-session-interceptor.html" title="Token Session Interceptor">Token Session Interceptor</a> tries to be even more automatic by attempting to display the same response that the original, valid action invocation would have displayed if no multiple requests were submitted in the first place.</p>
+
+<h3><a shape="rect" name="Struts1Solutions-ExecuteandWait"></a>Execute and Wait </h3>
+
+<p>The <a shape="rect" href="execute-and-wait-interceptor.html" title="Execute and Wait Interceptor">Execute and Wait Interceptor</a> embraces long-running taks by presenting a progress meter as the Action runs in the background. </p>
+
+<h2><a shape="rect" name="Struts1Solutions-Next%3AWhatistheActionContext%3F"></a>Next: <a shape="rect" href="what-is-the-actioncontext.html" title="What is the ActionContext?">What is the ActionContext?</a></h2>
+
+
+<hr>
+<p>This material originally adopted from: <a shape="rect" class="external-link" href="http://wiki.apache.org/struts/IssuesAndSolutions">http://wiki.apache.org/struts/IssuesAndSolutions</a>.</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file

Added: websites/production/struts/content/development/2.x/docs/struts-2-annotations.data/Screen-shot-2010-10-24-at-10.51.45-AM.png
==============================================================================
Binary file - no diff available.

Propchange: websites/production/struts/content/development/2.x/docs/struts-2-annotations.data/Screen-shot-2010-10-24-at-10.51.45-AM.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/production/struts/content/development/2.x/docs/struts-2-annotations.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/struts-2-annotations.html (added)
+++ websites/production/struts/content/development/2.x/docs/struts-2-annotations.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,245 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. 
+-->
+<html>
+<head>
+    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <style type="text/css">
+        .dp-highlighter {
+            width:95% !important;
+        }
+    </style>
+    <style type="text/css">
+        .footer {
+            background-image:      url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+            background-repeat:     repeat-x;
+            background-position:   left top;
+            padding-top:           4px;
+            color:                 #666;
+        }
+    </style>
+    <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
+    <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
+    <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
+            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+    
+    <script type="text/javascript">
+        SyntaxHighlighter.defaults['toolbar'] = false;
+        SyntaxHighlighter.all();
+    </script>
+    <script type="text/javascript" language="javascript">
+        var hide = null;
+        var show = null;
+        var children = null;
+
+        function init() {
+            /* Search form initialization */
+            var form = document.forms['search'];
+            if (form != null) {
+                form.elements['domains'].value = location.hostname;
+                form.elements['sitesearch'].value = location.hostname;
+            }
+
+            /* Children initialization */
+            hide = document.getElementById('hide');
+            show = document.getElementById('show');
+            children = document.all != null ?
+                    document.all['children'] :
+                    document.getElementById('children');
+            if (children != null) {
+                children.style.display = 'none';
+                show.style.display = 'inline';
+                hide.style.display = 'none';
+            }
+        }
+
+        function showChildren() {
+            children.style.display = 'block';
+            show.style.display = 'none';
+            hide.style.display = 'inline';
+        }
+
+        function hideChildren() {
+            children.style.display = 'none';
+            show.style.display = 'inline';
+            hide.style.display = 'none';
+        }
+    </script>
+    <title>Struts 2 Annotations</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+    <tr class="topBar">
+        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a href="tutorials.html">Tutorials</a>&nbsp;&gt;&nbsp;<a href="getting-started.html">Getting Started</a>&nbsp;&gt;&nbsp;<a href="struts-2-annotations.html">Struts 2 Annotations</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="http://www.google.com/search" method="get">
+                <input type="hidden" name="ie" value="UTF-8" />
+                <input type="hidden" name="oe" value="UTF-8" />
+                <input type="hidden" name="domains" value="" />
+                <input type="hidden" name="sitesearch" value="" />
+                <input type="text" name="q" maxlength="255" value="" />
+                <input type="submit" name="btnG" value="Google Search" />
+            </form>
+        </td>
+    </tr>
+</table>
+
+<div id="PageContent">
+    <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+        <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">Struts 2 Annotations</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=24184167">
+                <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=24184167">Edit Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+                <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=24184167">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=24184167">Add Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=24184167">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=24184167">Add News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">The example code for this tutorial, annotations, is available for checkout at <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/">https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/</a></td></tr></table></div>
+
+<h3><a shape="rect" name="Struts2Annotations-Introduction"></a>Introduction</h3>
+
+<p>In our previous tutorials we've been using an XML file (struts.xml) to configure our applications.  The XML file wires up the action names (register), with ActionSupport classes (RegisterAction.java), and with the result to render back to the browser (register.jsp).  Struts 2 provides an alternative to using XML to configure your application by using standard naming conventions and annotations for your action names, ActionSupport classes, and results.  </p>
+
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">This tutorial assumes you understand how to apply annotations to Java classes and methods.  If you're not familiar with annotations, consult the <a shape="rect" class="external-link" href="http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html" rel="nofollow">Java online tutorial</a>.</td></tr></table></div>
+
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">The <a shape="rect" class="external-link" href="http://struts.apache.org/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.</td></tr></table></div>
+
+<h3><a shape="rect" name="Struts2Annotations-Struts2ConventionPlugin"></a>Struts 2 Convention Plugin</h3>
+<p>Struts 2 enables the use of standard naming conventions and annotations when you include the Convention plugin in your application's class path.  If you're using Maven you'll need to add a dependency:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Convention Plugin Dependency</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+
+&lt;dependency&gt;
+  &lt;groupId&gt;org.apache.struts&lt;/groupId&gt;
+  &lt;artifactId&gt;struts2-convention-plugin&lt;/artifactId&gt;
+  &lt;version&gt;2.2.1&lt;/version&gt;
+&lt;/dependency&gt;
+
+]]></script>
+</div></div>
+
+<p>If you're using Ant then copy the struts2-convention-plugin jar file from the Struts 2 download to your WEB-INF/lib folder.</p>
+
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">The convention plugin provide several different ways you can configure your Struts 2 application without using XML.  Consult the <a shape="rect" href="convention-plugin.html" title="Convention Plugin">Convention Plugin</a> documentation for complete details. This tutorial only examines one simple way of following the conventions provided by the Convention plugin.</td></tr></table></div>
+
+<p>When you run the example application you'll see on the index.jsp page a link to Get your hello.  This URL for the link is hello.action.  When you click on this link, the execute method of class HelloAction.java (which is a Struts 2 ActionSupport class) is run.  The view page rendered back to the browser after the execute method returns success is hello-success.jsp.</p>
+
+<p>None of the above is wired up using XML but rather happens because the application follows the standard naming conventions expected by the Convention plugin.  The first convention is that the ActionSupport class, HelloAction.java, is in package org.apache.struts.struts2annotations.action.  One of the Convention plugin's defaults is to look for ActionSupport classes that are in package structure that ends in action.  The next convention the application follows is that HelloAction.java extends the ActionSupport class and defines an execute method.  The link is hello.action.  When the Struts 2 filter sees a request for hello.action it will map that request to the HelloAction class's execute method due to the Convention plugin being used.  </p>
+
+<p>So a link of hello.action causes the execute method of class HelloAction to be run.  That method returns "success."  Because the application is using the Convention plugin, Struts 2 will render back to the browser a view page named hello-success.jsp that is located in WEB-INF/content (by default the Convention plugin expects all view pages to be in this location).  If the execute method returns "input" or "error" then the view page rendered would have been hello-input.jsp or hello-error.jsp.</p>
+
+<h3><a shape="rect" name="Struts2Annotations-Struts2ConfigurationPlugin"></a>Struts 2 Configuration Plugin</h3>
+<p>In a <a shape="rect" href="debugging-struts.html" title="Debugging Struts">previous tutorial</a> we reviewed how to use the Struts 2 Configuration plugin to view the details of how Struts 2 has configured your application.  When using the Convention plugin, it's very handy to also use the Configuration plugin during development.  On the example application's home page is a link to the application's configuration.  Click on that link and then the hello link on the left menu (under Actions in default).  You'll see the configuration for the hello action including it's Action class, result, and view page.</p>
+
+
+<p><span class="image-wrap" style=""><img src="struts-2-annotations.data/Screen+shot+2010-10-24+at+10.51.45+AM.png" style="border: 1px solid black"></span></p>
+
+<h3><a shape="rect" name="Struts2Annotations-Annotations"></a>Annotations</h3>
+
+<p>If you want to go beyond the simple naming conventions provided by the Convention plugin, you can use the Struts 2 annotations also provided by the plugin.  For example, a common work-flow for a Struts 2 application is to first execute the ActionSupport class's input method to setup form field default values and then to run the execute method of the same ActionSupport class when the form is submitted (to validate and save the user's input).</p>
+
+<p>The link to Register for the drawing on the example application's home page follows this work flow.  The link value is register-input.action.  If you examine the RegisterAction.java class you'll find the input method with an Action annotation.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Action Annotation</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+
+@Action("register-input")
+public String input() throws Exception {
+
+	logger.info("In input method of class Register");
+		
+	return INPUT;
+}
+
+]]></script>
+</div></div>
+
+<p>The Action annotation tells Struts 2 to execute the annotated method when the action link value equals the Action annotation's value ("register-input").  So a link of register-input.action will call the input method of class RegisterAction.  On the example application's home page is a link to Register for the drawing with a URL of register-input.action.  </p>
+
+<p>The input method above returns "input".  By the standards of the Convention plugin, the view page rendered will be register-input.jsp (from WEB-INF/content).  On that view page is a Struts 2 form tag with an action attribute value of register.  When submitting the form, the execute method of class RegisterAction will be run.  Since the execute method returns success, the view page rendered is register-success.jsp.</p>
+
+<h3><a shape="rect" name="Struts2Annotations-Struts2ConfigurationValues"></a>Struts 2 Configuration Values</h3>
+<p>In previous examples, we included in struts.xml values for some of the Struts 2 configuration parameters.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>struts.xml parameter configuration</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+
+&lt;constant name="struts.devMode" value="true" /&gt;
+
+]]></script>
+</div></div>
+
+<p>When we don't use a struts.xml file, we can set the value of these Struts 2 parameters by using filter parameters in web.xml:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Struts 2 Parameter Configurate web.xml</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+
+&lt;filter&gt;
+  &lt;filter-name&gt;struts2&lt;/filter-name&gt;
+    &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
+      &lt;init-param&gt;
+	  &lt;param-name&gt;struts.devMode&lt;/param-name&gt;
+	  &lt;param-value&gt;true&lt;/param-value&gt;
+      &lt;/init-param&gt;
+&lt;/filter&gt;
+
+]]></script>
+</div></div>
+
+
+<h3><a shape="rect" name="Struts2Annotations-Summary"></a>Summary</h3>
+
+<p>We've just scratched the surface of what the Struts 2 convention plugin provides to reduce or eliminate the need to use an XML file to configure your Struts 2 application.  The Struts 2 Convention plugin provides ways to map multiple actions to the same method, map results to different view pages, map errors to view pages, and much more.  Be sure to read through the <a shape="rect" href="convention-plugin.html" title="Convention Plugin">Convention Plugin</a> documentation for alternative ways to configure your Struts 2 application.</p>
+
+</div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file

Added: websites/production/struts/content/development/2.x/docs/struts-2-blank-archetype.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/struts-2-blank-archetype.html (added)
+++ websites/production/struts/content/development/2.x/docs/struts-2-blank-archetype.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,312 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. 
+-->
+<html>
+<head>
+    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <style type="text/css">
+        .dp-highlighter {
+            width:95% !important;
+        }
+    </style>
+    <style type="text/css">
+        .footer {
+            background-image:      url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+            background-repeat:     repeat-x;
+            background-position:   left top;
+            padding-top:           4px;
+            color:                 #666;
+        }
+    </style>
+    <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
+    <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
+    <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
+            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+    
+    <script type="text/javascript">
+        SyntaxHighlighter.defaults['toolbar'] = false;
+        SyntaxHighlighter.all();
+    </script>
+    <script type="text/javascript" language="javascript">
+        var hide = null;
+        var show = null;
+        var children = null;
+
+        function init() {
+            /* Search form initialization */
+            var form = document.forms['search'];
+            if (form != null) {
+                form.elements['domains'].value = location.hostname;
+                form.elements['sitesearch'].value = location.hostname;
+            }
+
+            /* Children initialization */
+            hide = document.getElementById('hide');
+            show = document.getElementById('show');
+            children = document.all != null ?
+                    document.all['children'] :
+                    document.getElementById('children');
+            if (children != null) {
+                children.style.display = 'none';
+                show.style.display = 'inline';
+                hide.style.display = 'none';
+            }
+        }
+
+        function showChildren() {
+            children.style.display = 'block';
+            show.style.display = 'none';
+            hide.style.display = 'inline';
+        }
+
+        function hideChildren() {
+            children.style.display = 'none';
+            show.style.display = 'inline';
+            hide.style.display = 'none';
+        }
+    </script>
+    <title>Struts 2 Blank Archetype</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+    <tr class="topBar">
+        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a href="core-developers-guide.html">Core Developers Guide</a>&nbsp;&gt;&nbsp;<a href="struts-2-maven-archetypes.html">Struts 2 Maven Archetypes</a>&nbsp;&gt;&nbsp;<a href="struts-2-blank-archetype.html">Struts 2 Blank Archetype</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="http://www.google.com/search" method="get">
+                <input type="hidden" name="ie" value="UTF-8" />
+                <input type="hidden" name="oe" value="UTF-8" />
+                <input type="hidden" name="domains" value="" />
+                <input type="hidden" name="sitesearch" value="" />
+                <input type="text" name="q" maxlength="255" value="" />
+                <input type="submit" name="btnG" value="Google Search" />
+            </form>
+        </td>
+    </tr>
+</table>
+
+<div id="PageContent">
+    <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+        <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">Struts 2 Blank Archetype</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=108834">
+                <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=108834">Edit Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+                <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=108834">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=108834">Add Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=108834">
+                <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+                     height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=108834">Add News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent">
+<p>The Struts 2 Blank Archetype ("blank-archetype") provides a minimal, but complete, Struts 2 application. It demonstrates some of the most basic Struts 2 concepts.</p>
+
+<h4><a shape="rect" name="Struts2BlankArchetype-Features"></a>Features</h4>
+
+<ul><li>XML-based configuration, demonstrates including additional config file</li><li>Example actions</li><li>Package-level resource bundle</li><li>XML-based validation</li><li>Unit-testing</li></ul>
+
+
+
+<p><b>Contents</b></p>
+
+<style type="text/css">/*<![CDATA[*/
+div.rbtoc1269264018968 {margin-left: 0px;padding: 0px;}
+div.rbtoc1269264018968 ul {list-style: none;margin-left: 0px;padding-left: 1em;}
+div.rbtoc1269264018968 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style><div class="rbtoc1269264018968">
+<ul><li><span class="TOCOutline">1</span> <a shape="rect" href="#Struts2BlankArchetype-CreatingOurblankarchetypeProject">Creating Our blank-archetype Project</a></li><ul><li><span class="TOCOutline">1.1</span> <a shape="rect" href="#Struts2BlankArchetype-Stagingrepository">Staging repository</a></li></ul><li><span class="TOCOutline">2</span> <a shape="rect" href="#Struts2BlankArchetype-ProjectStructure">Project Structure</a></li><ul><li><span class="TOCOutline">2.1</span> <a shape="rect" href="#Struts2BlankArchetype-StructureDifferenceFromNonMavenProjects">Structure Difference From Non-Maven Projects</a></li></ul><li><span class="TOCOutline">3</span> <a shape="rect" href="#Struts2BlankArchetype-BuildingTheProject">Building The Project</a></li><ul><li><span class="TOCOutline">3.1</span> <a shape="rect" href="#Struts2BlankArchetype-Compilation">Compilation</a></li><li><span class="TOCOutline">3.2</span> <a shape="rect" href="#Struts2BlankArchetype-Testing">Testing</a></li><li><span cl
 ass="TOCOutline">3.3</span> <a shape="rect" href="#Struts2BlankArchetype-Assembling%28CreatingaWAR%29">Assembling (Creating a WAR)</a></li><li><span class="TOCOutline">3.4</span> <a shape="rect" href="#Struts2BlankArchetype-Running">Running</a></li></ul><li><span class="TOCOutline">4</span> <a shape="rect" href="#Struts2BlankArchetype-ApplicationDocumentation">Application Documentation</a></li><ul><li><span class="TOCOutline">4.1</span> <a shape="rect" href="#Struts2BlankArchetype-ApplicationConfiguration">Application Configuration</a></li><li><span class="TOCOutline">4.2</span> <a shape="rect" href="#Struts2BlankArchetype-%7B%7BWelcome.action%7D%7D"> <tt>Welcome.action</tt></a></li><li><span class="TOCOutline">4.3</span> <a shape="rect" href="#Struts2BlankArchetype-%7B%7BHelloWorld.action%7D%7D"> <tt>HelloWorld.action</tt></a></li><li><span class="TOCOutline">4.4</span> <a shape="rect" href="#Struts2BlankArchetype-%7B%7BLogin.action%7D%7D"> <tt>Login.action</tt></a></li></ul></ul><
 /div>
+
+<h2><a shape="rect" name="Struts2BlankArchetype-CreatingOurblankarchetypeProject"></a>Creating Our blank-archetype Project</h2>
+
+<p>We'll run the following command from our project's parent directory (this is shown using Unix-style commands).</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+$ mvn archetype:generate -B \
+                         -DgroupId=tutorial \
+                         -DartifactId=tutorial \
+                         -DarchetypeGroupId=org.apache.struts \
+                         -DarchetypeArtifactId=struts2-archetype-blank \
+                         -DarchetypeVersion=&lt;version&gt;
+$ ls
+tutorial/
+$ cd tutorial
+$ ls
+pom.xml         src/
+]]></script>
+</div></div>
+
+<p>Depending on the state of your local system you may see Maven downloading various libraries (known as "downloading the internet", which is what it seems Maven does sometimes). Be patient--Maven is basically setting up your required libraries automatically.<br clear="none">
+<b>&lt;version&gt;</b> - is the version of Struts 2 you want to use and archetype was released for, eg. 2.1.8.1 .</p>
+
+<h3><a shape="rect" name="Struts2BlankArchetype-Stagingrepository"></a>Staging repository</h3>
+
+<p>If the above command will fail because of missing archetypes in central repository, you can try to use staging repository like below</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+mvn archetype:generate -B \
+                       -DgroupId=tutorial \
+                       -DartifactId=tutorial \
+                       -DarchetypeGroupId=org.apache.struts \
+                       -DarchetypeArtifactId=struts2-archetype-blank \
+                       -DarchetypeVersion=&lt;version&gt;
+                       -DarchetypeCatalog=http://people.apache.org/builds/struts/&lt;version&gt;/m2-staging-repository/ 
+]]></script>
+</div></div>
+
+<h2><a shape="rect" name="Struts2BlankArchetype-ProjectStructure"></a>Project Structure</h2>
+
+<p>The source code structure follows the normal <a shape="rect" class="external-link" href="http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html">Maven directory structure</a>. The blank-archetype does not include all of the directories listed in the Maven structure reference page.</p>
+
+<p>Our project's structure looks like this:</p>
+
+<div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Directory </th><th colspan="1" rowspan="1" class="confluenceTh"> Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>src</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> All project source</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;- main</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Primary source directory</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#166;- java</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Java source code</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#166;&#160;&#160;`- tutorial</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Package defined by <tt>groupId</tt> parameter</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#166;&#160;&#160;&#160;&#160;&#
 160;`- example</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The example actions from the archetype</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#166;- resources</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Resources (config, property, and validation files, and so on</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#166;&#160;&#160;`-tutorial</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Package defined by <tt>groupId</tt> parameter</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#166;&#160;&#160;&#160;&#160;&#160;`- example</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Example property and validation files from archetype</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;`- webapp</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Web application files (HTML, JSP, etc.)
 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#160;&#160;&#160;&#160;`- WEB-INF</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Typical WEB-INF folder</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;`- example</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Files from archetype</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>`- test</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Test code (unit tests etc.)</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#160;&#160;&#160;`- java</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Java-based test code</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#160;&#160;&#160;&#160;&#160;&#160;`- tutorial</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Package defined by <tt>groupId</tt> parameter</td></tr><tr><td
  colspan="1" rowspan="1" class="confluenceTd"> <tt>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;`- example</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Test code from archetype</td></tr></tbody></table>
+</div>
+
+
+<h3><a shape="rect" name="Struts2BlankArchetype-StructureDifferenceFromNonMavenProjects"></a>Structure Difference From Non-Maven Projects</h3>
+
+<p>One big change for folks not used to the Maven structure is the separation of Java source code and resource files. For example, in a non-Maven project our directory structure might look like this:</p>
+
+<div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>src</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> All project source</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;- tutorial</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Tutorial package</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;`- example</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Example package</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#160;&#160;&#160;&#166;- Login.java</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Login action source</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;&#160;&#160;&#160;&#160;&#166;- package.properties</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Resource file</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;&#160;
 &#160;&#160;&#160;&#160;`- Login-validation.xml</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Validation file</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>`- struts.xml</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Struts 2 config file</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>web</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Web app files</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>&#166;- WEB-INF</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Typical WEB-INF folder</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>`- index.html</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> An HTML file</td></tr></tbody></table>
+</div>
+
+
+<p>It can take a little while to get used to, but ultimately it provides good separation of "types" of things, and becomes second-nature pretty quickly. Note that it's possible to use a non-Maven directory layout with Maven projects, but this can be challenging at some points.</p>
+
+<h2><a shape="rect" name="Struts2BlankArchetype-BuildingTheProject"></a>Building The Project</h2>
+
+<p>There are several different ways we can go about building our project, from simple compilation up to actually running the web application--all from within Maven.</p>
+
+<h3><a shape="rect" name="Struts2BlankArchetype-Compilation"></a>Compilation</h3>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[$ mvn compile]]></script>
+</div></div>
+
+<p>will create a <tt>target</tt> directory containing the compiled classes. By itself this isn't terribly useful.</p>
+
+
+<h3><a shape="rect" name="Struts2BlankArchetype-Testing"></a>Testing</h3>
+
+<p>Running</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[$ mvn test]]></script>
+</div></div>
+
+<p>will compile the application and run the included unit tests. Blank-archetype's unit tests are <em>not</em> extensive, but provide a simple starting point for writing more complex, application-specific tests.</p>
+
+<p>One we've run the Maven test command we'll notice there's a <tt>target/surefire-reports</tt> directory. The <a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-surefire-plugin/">Maven Surefire Plugin</a> is how Maven runs our unit tests. By default it will create test results in XML and text formats in the <tt>target/surefire-reports</tt> directory. These files can be examined to get further information regarding the failed tests.</p>
+
+<h3><a shape="rect" name="Struts2BlankArchetype-Assembling%28CreatingaWAR%29"></a>Assembling (Creating a WAR)</h3>
+
+<h3><a shape="rect" name="Struts2BlankArchetype-Running"></a>Running</h3>
+
+<p>We can run blank-archetype using the <a shape="rect" class="external-link" href="http://www.mortbay.org/jetty/" rel="nofollow">Jetty</a> server via the <a shape="rect" class="external-link" href="http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin" rel="nofollow">Maven Jetty Plugin</a> by executing the Jetty plugin's <tt>run</tt> command:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[$ mvn jetty:run]]></script>
+</div></div>
+
+<p>Once we've run the application we can see that it works by visiting <tt>localhost:8080/tutorial/example/Welcome.action</tt> as a sanity check.</p>
+
+<h2><a shape="rect" name="Struts2BlankArchetype-ApplicationDocumentation"></a>Application Documentation</h2>
+
+<p>The application consists of a few test actions demonstrating simple validation and package-level property (resource) files. The most interesting URLs are as follows (assuming we used <tt>groupId=tutorial</tt>):</p>
+
+<div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> URL </th><th colspan="1" rowspan="1" class="confluenceTh"> Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>/tutorial/example/Welcome.action</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Handled by wildcard mapping</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>/tutorial/example/HelloWorld.action</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Handled by explicit mapping, demonstrates package-level properties</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>/tutorial/example/Login.action</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Handled by explicit mapping with method wilcard (see the <tt>Login.action</tt> documentation for information regarding how to access this URL)</td></tr></tbody></table>
+</div>
+
+
+<h3><a shape="rect" name="Struts2BlankArchetype-ApplicationConfiguration"></a>Application Configuration</h3>
+
+<p>The default Struts 2 configuration file is contained in <tt>src/main/resources/struts.xml</tt>. It includes an additional configuration file, <tt>src/main/resources/example.xml</tt>. The application's mappings are contained in the <tt>example.xml</tt> file. The <tt>struts.xml</tt> file sets some constants.</p>
+
+<p>See the <a shape="rect" href="strutsxml.html" title="struts.xml">struts.xml</a> page for more information about the <tt>struts.xml</tt> file. For more information regarding what's contained in typical <tt>struts.xml</tt> files start at the <a shape="rect" href="configuration-elements.html" title="Configuration Elements">Configuration Elements</a> page, which contains links to a bunch of information. See the <a shape="rect" href="configuration-files.html" title="Configuration Files">Configuration Files</a> page for more information regarding additional Struts 2 configuration files, including links to the files that set all the Struts 2 default configurations.</p>
+
+<h3><a shape="rect" name="Struts2BlankArchetype-%7B%7BWelcome.action%7D%7D"></a><tt>Welcome.action</tt></h3>
+
+<p>The mapping for this action is handled by a "catch-all" mapping in <tt>example.xml</tt>:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;action name="*" class="tutorial2.example.ExampleSupport"&gt;
+  &lt;result&gt;/example/{1}.jsp&lt;/result&gt;
+&lt;/action&gt;
+]]></script>
+</div></div>
+
+<p>This mapping is the last mapping contained in <tt>example.xml</tt>--anything not handled by mappings appearing before it in <tt>example.xml</tt> will be caught by this mapping. This mapping will look for JSP files in <tt>src/main/webapp/example/*.jsp</tt>. Since there's a <tt>Welcome.jsp</tt> in that directory, we're all set. See the <a shape="rect" href="wildcard-mappings.html" title="Wildcard Mappings">Wildcard Mappings</a> page for more information on how Struts 2 can use wildcard mappings.</p>
+
+<h3><a shape="rect" name="Struts2BlankArchetype-%7B%7BHelloWorld.action%7D%7D"></a><tt>HelloWorld.action</tt></h3>
+
+<p>The mapping executes the HelloWorld action, contained in <tt>src/main/java/tutorial/example/HelloWorld.action</tt>. This action retrieves a message from a package-level properties file, contained in <tt>src/main/resources/tutorial/package.properties</tt>. See the <a shape="rect" href="localization.html" title="Localization">Localization</a> page for more information about how Struts 2 handles message resources (it's pretty cool).</p>
+
+<h3><a shape="rect" name="Struts2BlankArchetype-%7B%7BLogin.action%7D%7D"></a><tt>Login.action</tt></h3>
+
+<p>This is another wildcard mapping:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;action name="Login_*" method="{1}" class="tutorial2.example.Login"&gt;
+  &lt;result name="input"&gt;/example/Login.jsp&lt;/result&gt;
+  &lt;result type="redirectAction"&gt;Menu&lt;/result&gt;
+&lt;/action&gt;
+]]></script>
+</div></div>
+
+<p>In the application the Login action is reached via a link, but not directly to <tt>/tutorial/example/Login.action</tt>. The link is actually <tt>/tutorial/example/Login_input.action</tt>. Reaching the Login action this way bypasses validation: if we hit the Login action directly we'll get a validation error.</p>
+
+<p>The validation configuration is contained in <tt>/src/main/resources/tutorial/example/Login-validation.xml</tt>. It checks for the presence of the <tt>username</tt> and <tt>password</tt> properties (form values). It uses messages stored in the <tt>package.properties</tt> file (in the same directory). See the <a shape="rect" href="validation.html" title="Validation">Validation</a> page for more information regarding Struts 2 validation.</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file

Added: websites/production/struts/content/development/2.x/docs/struts-2-form-tags.data/Screen-shot-2010-04-25-at-8.39.59-AM.png
==============================================================================
Binary file - no diff available.

Propchange: websites/production/struts/content/development/2.x/docs/struts-2-form-tags.data/Screen-shot-2010-04-25-at-8.39.59-AM.png
------------------------------------------------------------------------------
    svn:mime-type = image/png



Mime
View raw message