http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/can-we-use-junit-with-the-framework.html
----------------------------------------------------------------------
diff --git a/content/docs/can-we-use-junit-with-the-framework.html 
b/content/docs/can-we-use-junit-with-the-framework.html
new file mode 100644
index 0000000..687975e
--- /dev/null
+++ b/content/docs/can-we-use-junit-with-the-framework.html
@@ -0,0 +1,138 @@
+<!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>
+    <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>Can we use JUnit with the framework</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="faqs.html">FAQs</a>&nbsp;&gt;&nbsp;<a 
href="can-we-use-junit-with-the-framework.html">Can we use JUnit with the 
framework</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">Can we use 
JUnit with the framework</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14037";>
+                <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=14037";>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=14037";>
+                <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=14037";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14037";>
+                <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=14037";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><p>Yes.  Struts 2 provides built-in 
support for JUnit 3.8 via an abstract StrutsTestCase, which provides common 
Struts variables and setup code.  To learn what approaches you can take when 
testing your Struts Actions, see <a shape="rect" 
href="how-can-we-test-actions.html">How can we test Actions</a>.</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/can-we-use-testng-with-the-framework.html
----------------------------------------------------------------------
diff --git a/content/docs/can-we-use-testng-with-the-framework.html 
b/content/docs/can-we-use-testng-with-the-framework.html
new file mode 100644
index 0000000..86ea133
--- /dev/null
+++ b/content/docs/can-we-use-testng-with-the-framework.html
@@ -0,0 +1,138 @@
+<!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>
+    <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>Can we use TestNG with the framework</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="faqs.html">FAQs</a>&nbsp;&gt;&nbsp;<a 
href="can-we-use-testng-with-the-framework.html">Can we use TestNG with the 
framework</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">Can we use 
TestNG with the framework</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=31503";>
+                <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=31503";>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=31503";>
+                <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=31503";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=31503";>
+                <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=31503";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><p>Yes.  Struts 2 provides built-in 
support for TestNG via an abstract TestNGStrutsTestCase, which provides common 
Struts variables and setup code.  To learn what approaches you can take when 
testing your Struts Actions, see <a shape="rect" 
href="how-can-we-test-actions.html">How can we test Actions</a>.</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/can-you-suggest-an-elevator-pitch.html
----------------------------------------------------------------------
diff --git a/content/docs/can-you-suggest-an-elevator-pitch.html 
b/content/docs/can-you-suggest-an-elevator-pitch.html
new file mode 100644
index 0000000..0c163b2
--- /dev/null
+++ b/content/docs/can-you-suggest-an-elevator-pitch.html
@@ -0,0 +1,168 @@
+<!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>
+    <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>Can you suggest an elevator pitch</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="faqs.html">FAQs</a>&nbsp;&gt;&nbsp;<a 
href="can-you-suggest-an-elevator-pitch.html">Can you suggest an elevator 
pitch</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">Can you 
suggest an elevator pitch</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14012";>
+                <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=14012";>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=14012";>
+                <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=14012";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14012";>
+                <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=14012";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><p>
+</p><p>Here's the Who, What, When, Where, and Why of Struts 2.</p>
+
+<h3 id="Canyousuggestanelevatorpitch-Whoshouldusetheframework?">Who should use 
the framework?</h3>
+
+<p>Struts 2 is designed to help Java web developers create enterprise-class 
applications using accepted industry standards and design patterns. </p>
+
+<h3 id="Canyousuggestanelevatorpitch-Whatdoestheframeworkdo?">What does the 
framework do? </h3>
+
+<p>The framework provides a flexible front controller and a set of custom 
tags. The controller's job is to map requests to actions.  This helps 
developers organize their business logic.  The Struts 2 tags help page authors 
create interactive pages. </p>
+
+<h3 
id="Canyousuggestanelevatorpitch-Howlonghavepeoplebeenusingtheframework?">How 
long have people been using the framework? </h3>
+
+<p>The original Struts framework shipped in June 2001.  WebWork came out in 
March 2002 with the goal of improving Struts 1 and adopting the best ideas from 
other frameworks.  In December 2005, the WebWork and Struts communities joined 
forces to create the Struts 2 framework.  The initial release of Struts 2 is 
expected in the first quarter of 2007.</p>
+
+<h3 id="Canyousuggestanelevatorpitch-Whereistheframeworkhosted?">Where is the 
framework hosted? </h3>
+
+<p>Struts is a project of the Apache Software Foundation. The framework is 
made available to the public at no charge under the open source Apache License. 
The official Struts website is located at <a shape="rect" class="external-link" 
href="http://struts.apache.org";>http://struts.apache.org</a>.</p>
+
+<p><img class="emoticon emoticon-light-on" 
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/lightbulb_on.png";
 data-emoticon-name="light-on" alt="(lightbulb)"> Visit the <a shape="rect" 
class="external-link" href="http://struts.apache.org/download.html";>Struts 
download page</a> to obtain a distribution. </p>
+
+<h3 
id="Canyousuggestanelevatorpitch-Whyistheframeworkagoodchoiceformyapplication?">Why
 is the framework a good choice for my application? </h3>
+
+<p><em>Reliability. Flexibility. Performance.</em> </p>
+
+<p><strong>Reliability.</strong> The Struts project has been serving the Java 
web development community since May 2000.  We have earned a reputation for 
shipping software that is long on features and short on defects. </p>
+
+<p><strong>Flexibility.</strong> The Struts 2 framework is designed to be 
pluggable from the ground up.  The controller's lifecycle can be customized for 
each application, and even for each action within an application.  The tag 
library is stylesheet-driven and easy to customize, either all at once or tag 
by tag.  Struts 2 does what you want it to do, but <em>only</em> what you want 
it to do. </p>
+
+<p><strong>Performance.</strong> From field experience, we know that 
Struts-like, action-oriented frameworks perform well and are maintainable. </p>
+</div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/cdi-plugin.html
----------------------------------------------------------------------
diff --git a/content/docs/cdi-plugin.html b/content/docs/cdi-plugin.html
new file mode 100644
index 0000000..1113c32
--- /dev/null
+++ b/content/docs/cdi-plugin.html
@@ -0,0 +1,539 @@
+<!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='https://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
+    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
+    <script src='https://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushCss.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>CDI 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="cdi-plugin.html">CDI Plugin</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">CDI 
Plugin</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27842284";>
+                <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=27842284";>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=27842284";>
+                <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=27842284";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=27842284";>
+                <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=27842284";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><style type="text/css">/*<![CDATA[*/
+div.rbtoc1488974266631 {padding: 0px;}
+div.rbtoc1488974266631 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1488974266631 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style><div class="toc-macro rbtoc1488974266631">
+<ul class="toc-indentation"><li><a shape="rect" 
href="#CDIPlugin-Overview">Overview</a></li><li><a shape="rect" 
href="#CDIPlugin-Setup">Setup</a>
+<ul class="toc-indentation"><li><a shape="rect" 
href="#CDIPlugin-MavenSetup">Maven Setup</a></li><li><a shape="rect" 
href="#CDIPlugin-ManualIntegration">Manual Integration</a></li><li><a 
shape="rect" href="#CDIPlugin-Configuration">Configuration</a></li></ul>
+</li><li><a shape="rect" href="#CDIPlugin-Usage">Usage</a>
+<ul class="toc-indentation"><li><a shape="rect" 
href="#CDIPlugin-ExampleUsage">Example Usage</a></li></ul>
+</li></ul>
+</div>
+
+<h1 id="CDIPlugin-Overview">Overview</h1>
+
+<p>CDI - short for Contexts and Dependency Injection - is the new standard for 
Java EE (though not limited to it) dependency injection frameworks. It was 
introduced as <a shape="rect" class="external-link" 
href="http://jcp.org/en/jsr/summary?id=299"; rel="nofollow">JSR 299</a>, being a 
part of the <a shape="rect" class="external-link" 
href="http://jcp.org/en/jsr/detail?id=316"; rel="nofollow">Java EE 6</a> 
umbrella specification. It is also important to note that it builds on top of 
JSR 330 (Dependency Injection for Java SE), often referenced as <a shape="rect" 
class="external-link" href="http://jcp.org/en/jsr/summary?id=330"; 
rel="nofollow">@Inject</a>.</p>
+
+<p>It can be used as standalone solution packed with your web applications to 
run in lightweight servlet containers such as Apache Tomcat or Jetty, utilizing 
standalone CDI implementations such as <a shape="rect" class="external-link" 
href="http://seamframework.org/Weld"; rel="nofollow">JBoss Weld</a> (the JSR 299 
reference implementation) or <a shape="rect" class="external-link" 
href="http://openwebbeans.apache.org/";>Apache OpenWebBeans</a>. On the other 
hand, each JEE 6 compliant application server such as <a shape="rect" 
class="external-link" href="http://glassfish.java.net/"; 
rel="nofollow">Glassfish</a>, <a shape="rect" class="external-link" 
href="http://www.jboss.org/jbossas"; rel="nofollow">JBoss AS</a> or <a 
shape="rect" class="external-link" 
href="http://openejb.apache.org/apache-tomee.html";>Apache TomEE</a> is required 
to have a CDI container on board, making it easy for developers to pack 
lightweight web or enterprise archives while being able to use a compelling 
dependency 
 injection feature set.</p>
+
+<p>With the Struts 2 CDI plugin, your application is open to be embedded into 
this modern, comprehensive and type safe framework and take full use of it.</p>
+
+<h1 id="CDIPlugin-Setup">Setup</h1>
+
+<p>As with all Struts 2 plugins, usage of the CDI plugin is as easy as 
delivering the right jars with your web application. The plugin then registers 
itself as the standard ObjectFactory for your Struts 2 application.</p>
+
+<div class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Don't mess up Object 
Factory Providers</p><span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
+<p>Struts 2 delivers integration into all relevant dependency injection 
containers via plugins, such as the <a shape="rect" 
href="spring-plugin.html">Spring Plugin</a> or the externally provided <a 
shape="rect" class="external-link" 
href="http://code.google.com/p/google-guice/wiki/Struts2Integration"; 
rel="nofollow">Guice Struts 2 Plugin</a>. Be aware that the central feature of 
all those, as well as the CDI plugin, is to register itself as Struts 2 Object 
factory. Usually you will want to use <strong>exactly one of those 
plugins</strong> in your application, since there will only be <strong>one 
ObjectFactory</strong> implementation for Struts 2 to chose. If you pack more 
than one of those plugins, the factory to be chosen will be undetermined. One 
will win in the end, but who knows which ...</p></div></div>
+
+<h2 id="CDIPlugin-MavenSetup">Maven Setup</h2>
+
+<p>The most easy and recommended way use is to simply add a maven dependency 
for it, along with a dependency to the CDI API for development time usage:</p>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 1px;"><b>pom.xml</b></div><div 
class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">
+&lt;dependencies&gt;
+    ...
+    &lt;dependency&gt;
+        &lt;groupId&gt;org.apache.struts&lt;/groupId&gt;
+        &lt;artifactId&gt;struts2-cdi-plugin&lt;/artifactId&gt;
+        &lt;version&gt;${struts2.version}&lt;/version&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+        &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
+        &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
+        &lt;version&gt;1.0-SP1&lt;/version&gt;
+        &lt;scope&gt;provided&lt;/scope&gt;
+    &lt;/dependency&gt;
+    ...
+&lt;/dependencies&gt;
+</pre>
+</div></div>
+
+<p>whereas </p>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">${struts2.version}</pre>
+</div></div>
+<p> should be set either as a property in your pom (recommended) or 
substituted by a concrete version information, such as 2.3.2 by the time of 
writing of this document. If you want to use CDI without an application server 
providing it, you may also want to add a dependency to a CDI implementation of 
your choice, for example Weld:</p>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 1px;"><b>pom.xml with CDI 
implementation</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">
+&lt;dependencies&gt;
+    ...
+    &lt;dependency&gt;
+        &lt;groupId&gt;org.apache.struts&lt;/groupId&gt;
+        &lt;artifactId&gt;struts2-cdi-plugin&lt;/artifactId&gt;
+        &lt;version&gt;${struts2.version}&lt;/version&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+        &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
+        &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
+        &lt;version&gt;1.0-SP1&lt;/version&gt;
+        &lt;scope&gt;provided&lt;/scope&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+        &lt;groupId&gt;org.jboss.weld&lt;/groupId&gt;
+        &lt;artifactId&gt;weld-core&lt;/artifactId&gt;
+        &lt;version&gt;1.0.1-Final&lt;/version&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+        &lt;groupId&gt;org.jboss.weld&lt;/groupId&gt;
+        &lt;artifactId&gt;weld-se&lt;/artifactId&gt;
+        &lt;version&gt;1.0.1-Final&lt;/version&gt;
+    &lt;/dependency&gt;
+    ...
+&lt;/dependencies&gt;
+</pre>
+</div></div>
+
+<h2 id="CDIPlugin-ManualIntegration">Manual Integration</h2>
+
+<p>Ensure that the struts2-cdi-plugin jar matching your used Struts 2 
framework version - it is part of the <a shape="rect" class="external-link" 
href="http://struts.apache.org/download.cgi";>Struts 2 distribution</a> - is 
packed within the application archive that will be delivered. If a CDI 
implementation is provided within your container, no other dependencies are 
needed. If the latter is not the case, you may want to install a CDI container 
into your container (as commmon installation or packed with your app) according 
to the installation instructions of the CDI provider of choice.</p>
+
+<p>For IDE integration, be sure to add both the struts2-cdi-plugin-VERSION.jar 
as well as the cdi-api.jar to your project setup. Remember, the API jar should 
not be delivered with your application archive since you will have the API 
provided by the CDI container your application will be running with.</p>
+
+<h2 id="CDIPlugin-Configuration">Configuration</h2>
+
+<p>Not much to see here. The CDI specification requires the CDI container to 
be exposed via JNDI context, and the CDI plugin will pick it up just there. 
Nevertheless, since there are different JNDI namespaces in use, the plugin will 
try to automatically find the right one among known references, that is</p>
+
+<ul><li>java:comp/BeanManager as the CDI docs point 
out</li><li>java:app/BeanManager as the Weld docs point 
out</li><li>java:comp/env/BeanManager for containers limited to that namespace, 
such as tomcat</li></ul>
+
+
+<p>If your container of choice uses other naming references, the plugin has a 
single configuration option to point to the right name. Just add a constant 
like this to your struts.xml to be on the happy path again:</p>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 1px;"><b>struts.xml</b></div><div 
class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">
+    &lt;constant name="struts.objectFactory.cdi.jndiKey" 
value="java:comp/some/weird/BeanManagerReference" /&gt;
+</pre>
+</div></div>
+
+<h1 id="CDIPlugin-Usage">Usage</h1>
+
+<p>CDI has an extremely rich feature set, and this section is not intended as 
a replacement for the CDI reference documentation or the excellent 
documentation found on the <a shape="rect" class="external-link" 
href="http://seamframework.org/Weld"; rel="nofollow">JBoss Weld</a> homepage. 
The whole Struts 2 CDI integration works just as you would think it works, 
using JSR-299 and JSR-330 Annotations in your Struts 2 actions or interceptors. 
Be aware of the following, though:</p>
+
+<div class="confluence-information-macro confluence-information-macro-note"><p 
class="title">Remember to provide beans.xml</p><span class="aui-icon 
aui-icon-small aui-iconfont-warning 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
+<p>CDI is designed to act in a type safe and modern way, thus using 
annotations for all aspects of the framework. Nevertheless, you are allowed to 
eternalize configuration into a XML file called beans.xml to be placed in your 
WEB-INF directory. Even if you don't intend to use such external configuration, 
it is an <strong>inevitable requirement to provide at least an empty beans.xml 
in WEB-INF !</strong></p></div></div>
+
+<h2 id="CDIPlugin-ExampleUsage">Example Usage</h2>
+
+<p>Implement your Struts 2 actions or interceptors just as usual, enriched 
with CDI and @Inject annotations:</p>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 
1px;"><b>NumberGuess.java</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">
+package org.apache.struts2.example.cdi;
+
+import com.opensymphony.xwork2.ActionSupport;
+import javax.inject.Inject;
+
+public class NumberGuess extends ActionSupport {
+
+    @Inject
+    Game game;
+
+    public Game getGame() {
+        return game;
+    }
+
+    @Override
+    public String execute() throws Exception {
+        return SUCCESS;
+    }
+
+    public String guess() throws Exception {
+        final String errorMessage = game.check();
+        addActionError(errorMessage);
+
+        if (Game.CORRECT.equals(errorMessage)) {
+            game.reset();
+        } else if (game.getRemainingGuesses() == 0) {
+            addActionError("The correct guess was " + game.getGuess() + ". 
Game is reset.");
+            game.reset();
+        }
+
+
+        return SUCCESS;
+    }
+
+
+}
+</pre>
+</div></div>
+
+<p>See the @Inject annotation from javax.inject.Inject? While you could use 
all the other nice stuff, we usually would - following the separation of 
concerns principle - use @Inject most of the time only in our actions, keeping 
the more fancy stuff in the business layer as shown below. Using @Inject brings 
us to the most common pitfall when using Struts 2 together with JSR-330 / 
CDI:</p>
+
+<div class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Use the right 
@Inject</p><span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
+<p>Struts 2 and it's core component XWork use it's own internal dependency 
injection container. Interestingly, you could name it JSR-330's grandma, since 
it is an early pre-release version of <a shape="rect" class="external-link" 
href="http://code.google.com/p/google-guice/"; rel="nofollow">Google Guice</a> 
once developed by <a shape="rect" class="external-link" 
href="http://blog.crazybob.org/"; rel="nofollow">Crazybob Lee</a> - the same Bob 
Lee that, together with SpringSource's Rod Johnson, lead the JSR-330 
specification.</p>
+
+<p>That said, you will find the @Inject annotation both as 
<code>com.opensymphony.xwork2.inject.Inject</code> and 
<code>javax.inject.Inject</code>. <strong>Don't mix up those two - 
<code>javax.inject.Inject</code> is the one you want to use with your Struts 2 
CDI plugin and CDI integration in general!</strong> While you could use Struts' 
internal annotation as well, the effect may be strange to undefined - so check 
your imports!</p></div></div>
+
+<p>Now that you are aware of that, here is the rest of the inevitable 
NumberGuess CDI example in Struts 2 flavour. Add a JSP view similar to this:</p>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: html; gutter: false; theme: Default" 
style="font-size:12px;">
+&lt;%@ page contentType="text/html; charset=UTF-8" %&gt;
+&lt;%@ taglib prefix="s" uri="/struts-tags" %&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;title&gt;Numberguess&lt;/title&gt;
+&lt;/head&gt;
+
+&lt;body&gt;
+&lt;h2&gt;Numberguess Game - Struts 2 CDI Example&lt;/h2&gt;
+
+&lt;h3&gt;I've picked a number between &lt;s:property 
value="game.smallest"/&gt; and &lt;s:property value="game.biggest"/&gt;.
+    You have &lt;s:property value="game.remainingGuesses"/&gt;remaining 
guesses.&lt;/h3&gt;
+
+&lt;s:form action="guess"&gt;
+    &lt;s:textfield name="game.guess" label="Your Guess"/&gt;
+    &lt;s:submit/&gt;
+&lt;/s:form&gt;
+&lt;p/&gt;
+&lt;s:actionerror/&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+</div></div>
+
+<p>along - if not using the fabulous and recommended Struts 2 <a shape="rect" 
href="convention-plugin.html">Convention Plugin</a> - with a struts.xml like 
this</p>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">
+&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;constant name="struts.enable.DynamicMethodInvocation" value="false"/&gt;
+  &lt;constant name="struts.devMode" value="true"/&gt;
+  
+    &lt;package name="numberguess" extends="struts-default"&gt;
+
+        &lt;action name="NumberGuess" 
class="org.apache.struts2.example.cdi.NumberGuess"&gt;
+            &lt;result&gt;/WEB-INF/pages/NumberGuess.jsp&lt;/result&gt;
+        &lt;/action&gt;
+
+        &lt;action name="guess" 
class="org.apache.struts2.example.cdi.NumberGuess" method="guess"&gt;
+            &lt;result&gt;/WEB-INF/pages/NumberGuess.jsp&lt;/result&gt;
+        &lt;/action&gt;
+
+    &lt;/package&gt;
+
+&lt;/struts&gt;
+</pre>
+</div></div>
+
+<p>Now you can add the business logic we want to be managed and injected by 
CDI. Start with two qualifier annotations:</p>
+
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">
+package org.apache.struts2.example.cdi;
+
+import javax.inject.Qualifier;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.*;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+public @interface Random {}
+</pre>
+</div></div>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">
+package org.apache.struts2.example.cdi;
+
+import javax.inject.Qualifier;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.*;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+public @interface MaxNumber {}
+</pre>
+</div></div>
+
+<p>Now on to the actual business beans, the Game and the Generator bean:</p>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">
+package org.apache.struts2.example.cdi;
+
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Instance;
+import javax.inject.Inject;
+import javax.inject.Named;
+import java.io.Serializable;
+
+@Named
+@SessionScoped
+public class Game implements Serializable {
+
+    public static final String CORRECT = "Correct !!!";
+    public static final String WRONG = "Sorry, wrong number !!!";
+
+    private int number;
+    private int guess;
+    private int smallest;
+
+    @MaxNumber
+    @Inject
+    private int maxNumber;
+
+    private int biggest;
+    private int remainingGuesses;
+
+    @Random
+    @Inject
+    Instance&lt;Integer&gt; randomNumber;
+
+    public Game() {
+    }
+
+    public int getNumber() {
+        return number;
+    }
+
+    public int getGuess() {
+        return guess;
+    }
+
+    public void setGuess( int guess ) {
+        this.guess = guess;
+    }
+
+    public int getSmallest() {
+        return smallest;
+    }
+
+    public int getBiggest() {
+        return biggest;
+    }
+
+    public int getRemainingGuesses() {
+        return remainingGuesses;
+    }
+
+    public String check() throws InterruptedException {
+        if (guess &gt; number) {
+            biggest = guess - 1;
+        }
+        if (guess &lt; number) {
+            smallest = guess + 1;
+        }
+        if (guess == number) {
+            return CORRECT;
+        }
+        remainingGuesses--;
+        return WRONG;
+    }
+
+    @PostConstruct
+    public void reset() {
+        this.smallest = 0;
+        this.guess = 0;
+        this.remainingGuesses = 10;
+        this.biggest = maxNumber;
+        this.number = randomNumber.get();
+    }
+
+}
+</pre>
+</div></div>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">
+package org.apache.struts2.example.cdi;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import java.io.Serializable;
+
+@ApplicationScoped
+public class Generator implements Serializable {
+   
+   private java.util.Random random = new java.util.Random( 
System.currentTimeMillis() );
+   
+   private int maxNumber = 100;
+   
+   java.util.Random getRandom() {
+      return random;
+   }
+   
+   @Produces @Random int next() { 
+      return getRandom().nextInt(maxNumber); 
+   }
+   
+   @Produces @MaxNumber int getMaxNumber() {
+      return maxNumber;
+   }
+
+} 
+</pre>
+</div></div>
+
+<p>If you understand that code at a glance, you are either already an CDI 
expert or profit from the readable, natural language oriented way the CDI stack 
works. If neither of this is the case, now it's time to check the CDI and Weld 
documentation. Remember, this is a trivial example - there is much more to know 
about CDI.</p>
+
+<p>Ready you are now - use the Force!</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/cewolf-charts-using-velocity-templates.html
----------------------------------------------------------------------
diff --git a/content/docs/cewolf-charts-using-velocity-templates.html 
b/content/docs/cewolf-charts-using-velocity-templates.html
new file mode 100644
index 0000000..23ca7fa
--- /dev/null
+++ b/content/docs/cewolf-charts-using-velocity-templates.html
@@ -0,0 +1,257 @@
+<!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='https://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
+    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
+    <script src='https://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushCss.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>CeWolf charts using Velocity templates</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="tag-developers-guide.html">Tag Developers Guide</a>&nbsp;&gt;&nbsp;<a 
href="velocity.html">Velocity</a>&nbsp;&gt;&nbsp;<a 
href="cewolf-charts-using-velocity-templates.html">CeWolf charts using Velocity 
templates</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">CeWolf 
charts using Velocity templates</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=13816";>
+                <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=13816";>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=13816";>
+                <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=13816";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=13816";>
+                <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=13816";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent">
+<h2 id="CeWolfchartsusingVelocitytemplates-SetupCeWolf">Setup CeWolf</h2>
+<p><strong>This currently only works with the most recent CVS version of 
WebWork but should be available in the upcoming 2.0 beta2</strong></p>
+<ol><li>Go to <a shape="rect" class="external-link" 
href="http://cewolf.sourceforge.net"; 
rel="nofollow">http://cewolf.sourceforge.net</a> and grab a stable release of 
CeWolf (at the time of writing, the unstable builds do not work with 
WebWork).</li><li>Edit your webwork.properties file and add 
"de.laures.cewolf.taglib.tags" to the  property 
"webwork.velocity.tag.path"</li></ol>
+
+
+<p>Lastly add the CeWolf servlet to web.xml:</p>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">
+&lt;servlet&gt;
+    &lt;servlet-name&gt;CewolfServlet&lt;/servlet-name&gt;
+    &lt;servlet-class&gt;de.laures.cewolf.CewolfRenderer&lt;/servlet-class&gt;
+&lt;/servlet&gt;
+
+&lt;servlet-mapping&gt;
+    &lt;servlet-name&gt;CewolfServlet&lt;/servlet-name&gt;
+    &lt;url-pattern&gt;/cewolf/*&lt;/url-pattern&gt;
+&lt;/servlet-mapping&gt;
+</pre>
+</div></div>
+<h2 id="CeWolfchartsusingVelocitytemplates-CreateaDatasetProducer">Create a 
DatasetProducer</h2>
+<p>This is the default DatasetProducer from the CeWolf tutorial.</p>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Map;
+
+import org.jfree.data.DefaultCategoryDataset;
+
+import de.laures.cewolf.DatasetProduceException;
+import de.laures.cewolf.DatasetProducer;
+
+public class PageViewCountData implements DatasetProducer, Serializable {
+
+       // These values would normally not be hard coded but produced by
+       // some kind of data source like a database or a file
+       private final String[] categories =    {"mon", "tue", "wen", "thu", 
"fri", "sat", "sun"};
+       private final String[] seriesNames =    {"cewolfset.jsp", 
"tutorial.jsp", "testpage.jsp", "performancetest.jsp"};
+       private final Integer[] [] values = new Integer[OS:seriesNames.length] 
[OS:categories.length];
+
+       public Object produceDataset(Map params) throws DatasetProduceException 
{
+               DefaultCategoryDataset dataset = new DefaultCategoryDataset();
+               for (int series = 0; series &lt; seriesNames.length; series ++) 
{
+                       int lastY = (int)(Math.random() * 1000 + 1000);
+                       for (int i = 0; i &lt; categories.length; i++) {
+                               final int y = lastY + (int)(Math.random() * 200 
- 100);
+                               lastY = y;
+                               dataset.addValue((double)y, 
seriesNames[OS:series], categories[i]);
+                       }
+               }
+               return dataset;
+       }
+
+       public boolean hasExpired(Map params, Date since) {             
+               return (System.currentTimeMillis() - since.getTime())  &gt; 
5000;
+       }
+
+       public String getProducerId() {
+               return "PageViewCountData DatasetProducer";
+       }
+}
+</pre>
+</div></div>
+<h2 id="CeWolfchartsusingVelocitytemplates-CreatetheVelocitytemplate">Create 
the Velocity template</h2>
+<p>With the new WebWork refactorings, nested JSP tags with arbitrary 
parameters can be used, so we convert the CeWolf tutorial JSP script to 
Velocity.</p>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">
+&lt;jsp:useBean id="pageViews" 
class="de.laures.cewolf.example.PageViewCountData"/&gt;
+&lt;cewolf:chart 
+    id="line" 
+    title="Page View Statistics" 
+    type="line" 
+    xaxislabel="Page" 
+    yaxislabel="Views"&gt;
+    &lt;cewolf:data&gt;
+        &lt;cewolf:producer id="pageViews"/&gt;
+    &lt;/cewolf:data&gt;
+&lt;/cewolf:chart&gt;
+
+&lt;cewolf:img chartid="line" renderer="cewolf" width="400" height="300"/&gt;
+</pre>
+</div></div>
+
+<p>In Velocity it looks like this:</p>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">
+#set( $pageViews = $stack.findValue("new com.PageViewCountData()") )
+$req.session.setAttribute("pageViews", $pageViews ) 
+
+#bodytag( SimpleChart "id=line" "title=Page View Statistics" "type=line" 
"xaxislabel=Page" "yaxslabel=Views" )
+  #bodytag( Data )
+    #tag( Producer "id=pageViews" )
+  #end
+#end
+
+#tag( ChartImg "chartid=line" "renderer=cewolf" "width=400" "height=300" ) 
+</pre>
+</div></div>
+
+<p>As you may notice, CeWolf looks up it's DatasetProducer in the request 
attributes - it has no knowledge of the Velocity context. That's why we call 
$req.session.setAttribute(). The other attributes (such as the chartid) will be 
set by CeWolf, so we don't need to care about them.</p>
+<h2 
id="CeWolfchartsusingVelocitytemplates-Setupanactiontodisplythetemplate">Setup 
an action to disply the template</h2>
+<p>Now you should be able to fire up an action in the usual way with this 
template as the result and a nice chart should appear.</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/chain-result.html
----------------------------------------------------------------------
diff --git a/content/docs/chain-result.html b/content/docs/chain-result.html
new file mode 100644
index 0000000..786434c
--- /dev/null
+++ b/content/docs/chain-result.html
@@ -0,0 +1,191 @@
+<!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='https://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
+    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
+    <script src='https://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushCss.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>Chain Result</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="result-types.html">Result Types</a>&nbsp;&gt;&nbsp;<a 
href="chain-result.html">Chain Result</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">Chain 
Result</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14254";>
+                <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=14254";>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=14254";>
+                <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=14254";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14254";>
+                <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=14254";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent">
+
+<p>This result invokes an entire other action, complete with it's own 
interceptor stack and result.</p>
+
+
+<h1 id="ChainResult-Parameters">Parameters</h1>
+
+
+<p></p><ul></ul><p></p><ul><li><b>actionName (default)</b> - the name of the 
action that will be chained to</li></ul><p></p><ul><li><b>namespace</b> - used 
to determine which namespace the Action is in that we're chaining. If namespace 
is null,
+this defaults to the current namespace</li></ul><p></p><ul><li><b>method</b> - 
used to specify another method on target action to be invoked.
+If null, this defaults to execute 
method</li></ul><p></p><ul><li><b>skipActions</b> - (optional) the list of 
comma separated action names for the
+actions that could be chained to</li></ul><p></p>
+
+
+<h1 id="ChainResult-Examples">Examples</h1>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
+&lt;package name=&quot;public&quot; extends=&quot;struts-default&quot;&gt;
+    &lt;!-- Chain creatAccount to login, using the default parameter --&gt;
+    &lt;action name=&quot;createAccount&quot; class=&quot;...&quot;&gt;
+        &lt;result type=&quot;chain&quot;&gt;login&lt;/result&gt;
+    &lt;/action&gt;
+
+    &lt;action name=&quot;login&quot; class=&quot;...&quot;&gt;
+        &lt;!-- Chain to another namespace --&gt;
+        &lt;result type=&quot;chain&quot;&gt;
+            &lt;param name=&quot;actionName&quot;&gt;dashboard&lt;/param&gt;
+            &lt;param name=&quot;namespace&quot;&gt;/secure&lt;/param&gt;
+        &lt;/result&gt;
+    &lt;/action&gt;
+&lt;/package&gt;
+
+&lt;package name=&quot;secure&quot; extends=&quot;struts-default&quot; 
namespace=&quot;/secure&quot;&gt;
+    &lt;action name=&quot;dashboard&quot; class=&quot;...&quot;&gt;
+        &lt;result&gt;dashboard.jsp&lt;/result&gt;
+    &lt;/action&gt;
+&lt;/package&gt;
+]]></script>
+</div></div></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/chaining-interceptor.data/HibernateAction.java
----------------------------------------------------------------------
diff --git a/content/docs/chaining-interceptor.data/HibernateAction.java 
b/content/docs/chaining-interceptor.data/HibernateAction.java
new file mode 100644
index 0000000..03c9654
--- /dev/null
+++ b/content/docs/chaining-interceptor.data/HibernateAction.java
@@ -0,0 +1,47 @@
+package cash.action;
+
+import org.apache.log4j.Logger;
+
+import com.opensymphony.xwork.ActionContext;
+import com.opensymphony.xwork.ActionSupport;
+
+/**
+ * Superclass for Hibernate-aware actions.
+ *
+ * @author Joel Hockey
+ * @version $Id: $
+ */
+public abstract class HibernateAction extends ActionSupport {
+    /** xwork action return code */
+    public static final String DBERROR = "dberror";
+
+    private static final Logger LOG = Logger.getLogger(HibernateAction.class);
+
+    private boolean m_rollback = false;
+
+    /** roll back the current session */
+    protected void setRollbackOnly() { m_rollback = true; }
+
+    /** @return whether the current Hibernate Session should be rolled back */
+    public boolean getRollback() { return m_rollback; }
+
+    /**
+     * Sets an object into the web session
+     * @param key Key used to index object
+     * @param object The object to store
+     */
+    public void set(Object key, Object object) {
+        ActionContext.getContext().getSession().put(key, object);
+    }
+
+    /**
+     * Retrieve object from web session
+     * @param key Key used to index object
+     * @return object if it exists, or null
+     */
+    public Object get(Object key) {
+        return ActionContext.getContext().getSession().get(key);
+    }
+}
+
+

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/chaining-interceptor.data/HibernateUtil.java
----------------------------------------------------------------------
diff --git a/content/docs/chaining-interceptor.data/HibernateUtil.java 
b/content/docs/chaining-interceptor.data/HibernateUtil.java
new file mode 100644
index 0000000..4da3da9
--- /dev/null
+++ b/content/docs/chaining-interceptor.data/HibernateUtil.java
@@ -0,0 +1,67 @@
+package cash.util;
+
+import net.sf.hibernate.HibernateException;
+import net.sf.hibernate.SessionFactory;
+import net.sf.hibernate.Session;
+import net.sf.hibernate.cfg.Configuration;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Helper Singleton class to manage Hibernate Sessions.
+ *
+ * @author Joel Hockey
+ * @version $Id: $
+ */
+public class HibernateUtil {
+
+    /** ThreadLocal Session Map */
+    public static final ThreadLocal MAP = new ThreadLocal();
+
+    private static final Logger LOG = Logger.getLogger(HibernateUtil.class);
+
+    private static final SessionFactory SESSION_FACTORY;
+
+    /** Make default construct private */
+    private HibernateUtil() { }
+
+    /** Loads Hibernate config. */
+    static {
+        try {
+            LOG.debug("HibernateUtil.static - loading config");
+            SESSION_FACTORY = new 
Configuration().configure().buildSessionFactory();
+            LOG.debug("HibernateUtil.static - end");
+        } catch (HibernateException ex) {
+            throw new RuntimeException("Exception building SessionFactory: " + 
ex.getMessage(), ex);
+        }
+    }
+
+    /**
+     * Gets Hibernate Session for current thread.  When finished, users
+     * must return session using {@link #closeSession() closeSession()} method.
+     * @return Hibernate Session for current thread.
+     * @throws HibernateException if there is an error opening a new session.
+     */
+    public static Session currentSession() throws HibernateException {
+        Session s = (Session)MAP.get();
+        // Open a new Session, if this Thread has none yet
+        if (s == null) {
+            s = SESSION_FACTORY.openSession();
+            MAP.set(s);
+        }
+        return s;
+    }
+
+    /**
+     * Closes the Hibernate Session.  Users must call this method after calling
+     * {@link #currentSession() currentSession()}.
+     * @throws HibernateException if session has problem closing.
+     */
+    public static void closeSession() throws HibernateException {
+        Session s = (Session)MAP.get();
+        MAP.set(null);
+        if (s != null) {
+            s.close();
+        }
+    }
+}
\ No newline at end of file

Reply via email to