Added: 
websites/production/struts/content/development/2.x/docs/hello-world-using-struts-2.html
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/hello-world-using-struts-2.html
 (added)
+++ 
websites/production/struts/content/development/2.x/docs/hello-world-using-struts-2.html
 Wed Jul 17 09:31:08 2013
@@ -0,0 +1,366 @@
+<!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>Hello World Using Struts 2</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="how-to-create-a-struts-2-web-application.html">How To Create A Struts 2 
Web Application</a>&nbsp;&gt;&nbsp;<a 
href="create-struts-2-web-application-with-artifacts-in-web-inf-lib-and-use-ant-to-build-the-application.html">Create
 Struts 2 Web Application With Artifacts In WEB-INF lib and Use Ant To Build 
The Application</a>&nbsp;&gt;&nbsp;<a 
href="hello-world-using-struts-2.html">Hello World Using Struts 2</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">Hello World 
Using Struts 2</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14811871";>
+                <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=14811871";>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=14811871";>
+                <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=14811871";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14811871";>
+                <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=14811871";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><p>When you click on a hyperlink or 
submit an HTML form in a Struts 2 web application, the input is not sent to 
another server page, but to a Java class that you provide. These classes are 
called Actions. After the Action fires, a Result selects a resource to render 
the response. The resource is generally a server page, but it can also be a PDF 
file, an Excel spreadsheet, or a Java applet window.</p>
+
+<p>Suppose you want to create a simple "Hello World" example that displays a 
welcome message. After setting up an empty basic Struts 2 web application (see 
<a shape="rect" href="how-to-create-a-struts-2-web-application.html" title="How 
To Create A Struts 2 Web Application">How To Create A Struts 2 Web 
Application</a>), to create a "Hello World" example, you need to do four 
things:</p>
+<ol><li>Create a class to store the welcome message (the model)</li><li>Create 
a server page to present the message (the view)</li><li>Create an Action class 
to control the interaction between the user, the model, and the view (the 
controller)</li><li>Create a mapping (struts.xml) to couple the Action class 
and view
+<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">By 
creating these components, we are separating the work flow into three 
well-known concerns: the View, the Model, and the Controller. Separating 
concerns makes it easier to manage applications as they become more 
complex.</td></tr></table></div>
+<p>Let's look at an example model class, Action, server page, and mapping. If 
you like, fire up your Java IDE, and enter the code as we go.</p>
+<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've completed the <a shape="rect" 
href="how-to-create-a-struts-2-web-application.html" title="How To Create A 
Struts 2 Web Application">How To Create A Struts 2 Web Application</a> tutorial 
and have a working basic Struts project.  The example code for this tutorial, 
helloworld, is available for checkout from the <br clear="none">
+Struts 2 subversion sandbox 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>.
 The example projects use Maven<br clear="none">
+to manage the artifact dependencies and to build the .war 
files.</td></tr></table></div></li></ol>
+
+
+<h2><a shape="rect" name="HelloWorldUsingStruts2-TheCode"></a>The Code</h2>
+<p>Let's modify either the basic_struts project to add a model class to store 
our message, a view that displays our message, an Action class to act as the 
controller, and a configuration that ties everything together.</p>
+
+<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 this 
application to work search the Struts 2 mailing list.  If you don't find an 
answer to your problem, post a question on the mailing 
list.</td></tr></table></div>
+
+<h3><a shape="rect" 
name="HelloWorldUsingStruts2-Step1CreateTheModelClassMessageStore.java"></a>Step
 1 - Create The Model Class MessageStore.java</h3>
+
+<p>If you're using the Basic_Struts2_Ant project to start with create the 
MessageStore class in the src folder and if you're using the Basic_Struts2_Mvn 
class create the MessageStore class in src/main/java.  Be sure to note the 
package statement below.</p>
+
+<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">Note 
that in the code shown below the JavaDoc comments are omitted.  In the download 
example, JavaDoc comments are included.</td></tr></table></div>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader 
panelHeader" style="border-bottom-width: 
1px;"><b>MessageStore.java</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+package org.apache.struts.helloworld.model;
+
+public class MessageStore {
+       
+       private String message;
+       
+       public MessageStore() {
+               
+               setMessage("Hello Struts User");
+       }
+
+       public String getMessage() {
+
+               return message;
+       }
+
+       public void setMessage(String message) {
+
+               this.message = message;
+       }
+
+}
+]]></script>
+</div></div>
+<p>In the model class above note the use of public set and get methods to 
allow access to the private message String attribute.  The Struts 2 framework 
requires that objects you want to expose to the view (HelloWorld.jsp) follow 
the <a shape="rect" class="external-link" 
href="http://en.wikipedia.org/wiki/JavaBean#JavaBean_conventions"; 
rel="nofollow">JavaBean-style conventions</a>.</p>
+
+
+<h3><a shape="rect" 
name="HelloWorldUsingStruts2-Step2CreateTheActionClassHelloWorldAction.java"></a>Step
 2 - Create The Action Class HelloWorldAction.java</h3>
+<p>We need an Action class to act as the Controller.  The Action class 
responds to a user action (in this example that action will be clicking an HTML 
hyperlink and sending a specific URL to the Servlet container).  One or more of 
the Action class's methods are executed and a String result is returned.  Based 
on the value of the result, a specific view page (in this example that view 
page is HelloWorld.jsp) is rendered.</p>
+
+<p>Note the package and import statements below.</p>
+<div class="code panel" style="border-style: solid;border-width: 1px;"><div 
class="codeHeader panelHeader" style="border-bottom-width: 
1px;border-bottom-style: solid;"><b>HelloWorld.java</b></div><div 
class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+package org.apache.struts.helloworld.action;
+
+import org.apache.struts.helloworld.model.MessageStore;
+import com.opensymphony.xwork2.ActionSupport;
+
+public class HelloWorldAction extends ActionSupport {
+
+       private static final long serialVersionUID = 1L;
+
+       private MessageStore messageStore;
+       
+       public String execute() throws Exception {
+               
+               messageStore = new MessageStore() ;
+               return SUCCESS;
+       }
+
+       public MessageStore getMessageStore() {
+               return messageStore;
+       }
+
+       public void setMessageStore(MessageStore messageStore) {
+               this.messageStore = messageStore;
+       }
+
+}
+]]></script>
+</div></div>
+<p>The Struts 2 framework will create an object of the HelloWorldAction class 
and call the execute method in response to a user's action (clicking on a 
hyperlink that sends a specific URL to the Servlet container).</p>
+
+<p>In this example, the execute method creates an object of class MessageStore 
and then returns the String constant SUCCESS.</p>
+
+<p>Note also the public set and get methods for the private MessageStore 
object.  Since we want to make the MessageStore object available to the view 
page (HelloWorld.jsp) we need to follow the <a shape="rect" 
class="external-link" 
href="http://en.wikipedia.org/wiki/JavaBean#JavaBean_conventions"; 
rel="nofollow">JavaBean-style</a> of providing get and set methods.</p>
+
+<h3><a shape="rect" 
name="HelloWorldUsingStruts2-Step3CreateTheViewHelloWorld.jsp"></a>Step 3 - 
Create The View HelloWorld.jsp</h3>
+<p>We need a server page to present the message that is stored in the model 
class MessageStore. Create the below jsp in the WebContent folder (for the Ant 
project) and in src/main/webapp for the Mvn project).</p>
+<div class="code panel" style="border-style: solid;border-width: 1px;"><div 
class="codeHeader panelHeader" style="border-bottom-width: 
1px;border-bottom-style: solid;"><b>HelloWorld.jsp</b></div><div 
class="codeContent panelContent">
+<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+    pageEncoding="ISO-8859-1"%&gt;
+&lt;%@ taglib prefix="s" uri="/struts-tags" %&gt;
+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd"&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
+&lt;title&gt;Hello World!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;h2&gt;&lt;s:property value="messageStore.message" /&gt;&lt;/h2&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+]]></script>
+</div></div>
+<p>The taglib directive tells the Servlet container that this page will be 
using the Struts 2 tags and that these tags will be preceded by s.  </p>
+
+<p>The s:property tag displays the value returned by calling the method 
getMessageStore of the HelloWorldAction controller  class.  That method returns 
a MessageStore object. By adding the .message onto the messageStore part of the 
value attribute we are telling the Struts 2 framework to then call the 
getMessage method of that MessageStore object.  The getMessage method of class 
MessageStore returns a String.  It is that String that will be displayed by the 
s:property tag.</p>
+
+<p>We'll learn more about tags in the next tutorial.  See the <a shape="rect" 
href="struts-tags.html" title="Struts Tags">Struts Tags</a> for more 
information about tags.</p>
+
+<h3><a shape="rect" 
name="HelloWorldUsingStruts2-Step4AddTheStrutsConfigurationInstruts.xml"></a>Step
 4 - Add The Struts Configuration In struts.xml</h3>
+<p>We need a mapping to tie the URL, the HelloWorldAction class (controller), 
and <br clear="none">
+the HelloWorld.jsp (the view)  together.  The mapping tells the Struts 2 
framework which class will respond to the user's action (the URL), which method 
of that class will be executed, and what view to render based on the String 
result that method returns.</p>
+
+<p>Edit the <tt>struts.xml</tt> file (in the Mvn project that file is in the 
src/main/resources folder) to add the action mapping.  Place the action node 
(action name="hello") between the opening and closing package node, just after 
the action mapping with the name="index".  Your complete struts.xml should look 
like:</p>
+
+<div class="code panel" style="border-style: solid;border-width: 1px;"><div 
class="codeHeader panelHeader" style="border-bottom-width: 
1px;border-bottom-style: solid;"><b>struts.xml</b></div><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.0//EN"
+    "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
+
+&lt;struts&gt;
+
+  &lt;constant name="struts.devMode" value="true" /&gt;
+
+  &lt;package name="basicstruts2" extends="struts-default"&gt;
+
+  &lt;action name="index"&gt;
+    &lt;result&gt;/index.jsp&lt;/result&gt;
+  &lt;/action&gt;
+               
+  &lt;action name="hello" 
class="org.apache.struts.helloworld.action.HelloWorldAction" 
method="execute"&gt;
+    &lt;result name="success"&gt;/HelloWorld.jsp&lt;/result&gt;
+  &lt;/action&gt;
+
+&lt;/package&gt;
+
+&lt;/struts&gt;
+]]></script>
+</div></div>
+
+<h3><a shape="rect" 
name="HelloWorldUsingStruts2-Step5CreateTheURLAction"></a>Step 5 - Create The 
URL Action</h3>
+<p>In index.jsp (see WebContent folder for Ant project and src/main/webapp for 
Mvn project) let's add an Action URL the user can click on to tell the Struts 2 
framework to run the execute method of the HelloWorldAction class and render 
the HelloWorld.jsp view.  </p>
+
+<p>First add the taglib directive at the top of the jsp <tt>&lt;%@ taglib 
prefix="s" uri="/struts-tags" %&gt;</tt>.  Next add this p tag 
<tt>&lt;p&gt;&lt;a href="&lt;s:url action='hello'/&gt;"&gt;Hello 
World&lt;/a&gt;&lt;/p&gt;</tt> after the h1 tag.  Your new index.jsp should 
look like:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader 
panelHeader" style="border-bottom-width: 1px;"><b>index.jsp</b></div><div 
class="codeContent panelContent">
+<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+    pageEncoding="ISO-8859-1"%&gt;
+&lt;%@ taglib prefix="s" uri="/struts-tags" %&gt;
+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd"&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
+&lt;title&gt;Basic Struts 2 Application - Welcome&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;h1&gt;Welcome To Struts 2!&lt;/h1&gt;
+&lt;p&gt;&lt;a href="&lt;s:url action='hello'/&gt;"&gt;Hello 
World&lt;/a&gt;&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+
+]]></script>
+</div></div>
+<p>The Struts url tag creates the URL with an action of hello.  The hello 
action was mapped to the HelloWorldAction class and its execute method.  When 
the user clicks on the above URL it will cause the Struts 2 framework to run 
the execute method of the HelloWorldAction class.  After that method returns 
the String success, the view page HelloWorld.jsp will be rendered.</p>
+
+<h3><a shape="rect" 
name="HelloWorldUsingStruts2-Step6BuildtheWARFileandRunTheApplication"></a>Step 
6 - Build the WAR File and Run The Application</h3>
+<p>Execute mvn clean package to create the war file.</p>
+
+<p>Copy the war file to your Servlet container.  After your Servlet container 
successfully deploys the war file go to this URL <a shape="rect" 
class="external-link" href="http://localhost:8080/helloworld/index.action"; 
rel="nofollow">http://localhost:8080/helloworld/index.action</a> where you 
should see the following:<br clear="none">
+<span class="image-wrap" style=""><img 
src="hello-world-using-struts-2.data/Struts2HelloWorld.png" style="border: 0px 
solid black"></span></p>
+
+<p>Click on the Hello World link and you should get the HelloWorld.jsp 
page:</p>
+
+<p><span class="image-wrap" style=""><img 
src="hello-world-using-struts-2.data/Hello.png" style="border: 0px solid 
black"></span></p>
+
+<h3><a shape="rect" name="HelloWorldUsingStruts2-GettingHelp"></a>Getting 
Help</h3>
+<p>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 this 
application to work search the Struts 2 mailing list.  If you don't find an 
answer to your problem, post a question on the mailing list.</p>
+
+
+<h2><a shape="rect" name="HelloWorldUsingStruts2-HowtheCodeWorks"></a>How the 
Code Works</h2>
+
+<p>Your browser sends to the web server a request for the URL <a shape="rect" 
class="external-link" 
href="http://localhost:8080/Hello_World_Struts2_Ant/hello.action"; 
rel="nofollow">http://localhost:8080/Hello_World_Struts2_Ant/hello.action</a>.</p>
+<ol><li>The container receives from the web server a request for the resource 
<tt>hello.action</tt>. According to the settings loaded from the <a 
shape="rect" href="webxml.html" title="web.xml">web.xml</a>, the container 
finds that all requests are being routed to 
<tt>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</tt>, 
including the <tt>*.action</tt> requests. The StrutsPrepareAndExecuteFilter is 
the entry point into the framework.</li><li>The framework looks for an action 
mapping named "hello", and it finds that this mapping corresponds to the class 
"HelloWorldAction". The framework instantiates the Action and calls the 
Action's <tt>execute</tt> method.</li><li>The <tt>execute</tt> method creates 
the MessageStore object and returns <tt>SUCCESS</tt>. The framework checks the 
action mapping to see what page to load if <tt>SUCCESS</tt> is returned. The 
framework tells the container to render as the response to the request, the 
resource <tt>HelloWorld.jsp</tt>.<
 /li><li>As the page <tt>HelloWorld.jsp</tt> is being processed, the 
<tt>&lt;s:property value="messageStore.message" /&gt;</tt> tag calls the getter 
<tt>getMessageStore</tt> of the <tt>HelloWorld</tt> Action and then calls the 
<tt>getMessage</tt> of the MessageStore object returned by 
<tt>getMessageStore</tt>, and the tag merges into the response the value of the 
message attribute.</li><li>A pure HTML response is sent back to the 
browser.</li></ol>
+
+
+
+
+
+<h2><a shape="rect" name="HelloWorldUsingStruts2-WhattoRemember"></a>What to 
Remember</h2>
+
+<p>The framework uses Actions to process HTML forms and other requests. The 
<tt>Action</tt> class returns a result-name such as <tt>SUCCESS</tt>, 
<tt>ERROR</tt>, or <tt>INPUT</tt>. Based on the mappings loaded from the 
<tt>struts.xml</tt>, a given result-name may select a page (as in this 
example), another action, or some other web resource (image, PDF). </p>
+
+<p>When a server page is rendered, most often it will include dynamic data 
provided by the Action. To make it easy to display dynamic data, the framework 
provides a set of tags that can be used along with HTML markup to create a 
server page.</p>
+
+<div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Next </th><td colspan="1" rowspan="1" 
class="confluenceTd"> Onward to <a shape="rect" href="using-struts-2-tags.html" 
title="Using Struts 2 Tags">Using Struts 2 Tags</a> </td></tr><tr><th 
colspan="1" rowspan="1" class="confluenceTh"> Prev </th><td colspan="1" 
rowspan="1" class="confluenceTd"> Return to <a shape="rect" 
href="how-to-create-a-struts-2-web-application.html" title="How To Create A 
Struts 2 Web Application">How To Create A Struts 2 Web Application</a> 
</td></tr></tbody></table>
+</div>
+</div>
+        </div>
+
+                    <div class="tabletitle">
+                Children
+            <span class="smalltext" id="show" style="display: inline;">
+              <a href="javascript:showChildren()">Show Children</a></span>
+            <span class="smalltext" id="hide" style="display: none;">
+              <a href="javascript:hideChildren()">Hide Children</a></span>
+            </div>
+            <div class="greybox" id="children" style="display: none;">
+                                                    $page.link($child)
+                    <span class="smalltext">(Apache Struts 2 
Documentation)</span>
+                    <br>
+                            </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/home.data/content-types.css
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/home.data/content-types.css
 (added)
+++ 
websites/production/struts/content/development/2.x/docs/home.data/content-types.css
 Wed Jul 17 09:31:08 2013
@@ -0,0 +1,115 @@
+a.content-type-page span, div.content-type-page, span.content-type-page {
+    background-image: url(../../../images/icons/docs_16.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-blogpost span, div.content-type-blogpost, 
span.content-type-blogpost {
+    background-image: url(../../../images/icons/blogentry_16.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-comment span, div.content-type-comment, 
span.content-type-comment {
+    background-image: url(../../../images/icons/comment_16.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-space span, div.content-type-space, span.content-type-space,
+a.content-type-spacedesc span, div.content-type-spacedesc, 
span.content-type-spacedesc {
+    background-image: url(../../../images/icons/web_16.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-personalspacedesc span, div.content-type-personalspacedesc, 
span.content-type-personalspacedesc {
+    background-image: url(../../../images/icons/personal_space_16.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-mail span, div.content-type-mail, span.content-type-mail {
+    background-image: url(../../../images/icons/mail_content_16.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment span, div.content-type-attachment, 
span.content-type-attachment {
+    background-image: url(../../../images/icons/attachments/file.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-file span, div.content-type-file, span.content-type-file {
+    background-image: url(../../../images/icons/attachments/file.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-application-pdf span, 
div.content-type-attachment-application-pdf, 
span.content-type-attachment-application-pdf {
+    background-image: url(../../../images/icons/attachments/pdf.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-image span, div.content-type-attachment-image, 
span.content-type-attachment-image {
+    background-image: url(../../../images/icons/attachments/image.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-text-xml span, div.content-type-attachment-text-xml, 
span.content-type-attachment-text-xml {
+    background-image: url(../../../images/icons/attachments/xml.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-text-html span, 
div.content-type-attachment-text-html, span.content-type-attachment-text-html {
+    background-image: url(../../../images/icons/attachments/html.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-text span, div.content-type-attachment-text, 
span.content-type-attachment-text {
+    background-image: url(../../../images/icons/attachments/text.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-application-zip span, 
div.content-type-attachment-application-zip, 
span.content-type-attachment-application-zip {
+    background-image: url(../../../images/icons/attachments/zip.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-application-excel span, 
div.content-type-attachment-application-excel, 
span.content-type-attachment-application-excel {
+    background-image: url(../../../images/icons/attachments/excel.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-application-powerpoint span, 
div.content-type-attachment-application-powerpoint, 
span.content-type-attachment-application-powerpoint {
+    background-image: url(../../../images/icons/attachments/powerpoint.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-application-word span, 
div.content-type-attachment-application-word, 
span.content-type-attachment-application-word {
+    background-image: url(../../../images/icons/attachments/word.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-java span, div.content-type-attachment-java, 
span.content-type-attachment-java {
+    background-image: url(../../../images/icons/attachments/java.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-attachment-file span, div.content-type-attachment-file, 
span.content-type-attachment-file {
+    background-image: url(../../../images/icons/attachments/file.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-status span, div.content-type-status, span.content-type-status {
+    background-image: url(../../../images/icons/quotes.png);
+    background-repeat: no-repeat;
+}
+
+div.content-type-userinfo, span.content-type-userinfo {
+    background-image: url(../../../images/icons/user_16.gif);
+    background-repeat: no-repeat;
+}
+
+a.content-type-follow span, div.content-type-follow, span.content-type-follow {
+    background-image: url(../../../images/icons/fav_on_16.png);
+    background-repeat: no-repeat;
+}
+
+a.content-type-favourite span, div.content-type-favourite, 
span.content-type-favourite {
+    background-image: url(../../../images/icons/fav_on_16.png);
+    background-repeat: no-repeat;
+}

Added: 
websites/production/struts/content/development/2.x/docs/home.data/default-theme.css
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/home.data/default-theme.css
 (added)
+++ 
websites/production/struts/content/development/2.x/docs/home.data/default-theme.css
 Wed Jul 17 09:31:08 2013
@@ -0,0 +1,273 @@
+/*
+    This stylesheet defines styles that only apply to the Default theme. 
Styles common to all themes should go in
+    master.css
+*/
+html, body {
+    height: 100%;
+}
+
+body {
+    margin: 0;
+    font-family: Helvetica, Arial, sans-serif;
+    background-color:#fff;
+}
+
+#full-height-container {
+    min-height: 100%;
+    position: relative;
+    background-color: #fff;    
+}
+
+#header {
+    margin: 0;
+    padding: 0 10px;
+    min-height: 2em;
+    line-height: 2;
+}
+
+.email{
+    /* offset the negative margin set by the header for emails only */
+    margin: 10px;
+}
+
+#page-view-panel {
+    float: right;
+}
+
+#com-atlassian-confluence h1 img {
+    max-height: 2.5em; /* scale logo image with font size */
+    margin-bottom: 0.3em;
+}
+#com-atlassian-confluence h1 img.custom {
+    height: auto;
+}
+
+h1 span.title-text {
+    display: table; /* page title wrapping drops straight down */
+}
+h1 a:hover {
+    color: inherit; /* inherit the colour instead of hard-coding blue */
+}
+.editable-title {
+    margin: 0 10px 0 58px;
+}
+
+#main {
+    padding: 10px 10px 6em 10px;
+}
+.content-preview #main {
+    padding-bottom: 10px;
+}
+
+#content {
+    clear: left;
+}
+#content.space {
+    margin-top: 10px;
+}
+
+.quick-search-submit {
+    display: none;
+}
+
+#page-view-panel li, #page-prefs-list li {
+    color: #666;
+    float: left;
+    font-size: .9em;
+    margin: 0 0 0 .3em;
+    padding: 0 0 0 .3em;
+}
+
+#navigation {
+    display: inline;
+}
+
+.page-actions {
+    float: right;
+    border: solid 1px #ccc;
+    padding: 5px;
+    margin-left: 10px;
+}
+
+.remove-control {
+    display: none;
+}
+
+.page-metadata {
+    color: #666;
+    font-size: 0.9em;
+    margin: 10px 0;
+}
+.page-metadata a:link,
+.page-metadata a:active,
+.page-metadata a:hover,
+.page-metadata a:visited {
+    color: #666;
+    font-style: normal;
+}
+
+.section-header {
+    margin-bottom: 5px;
+    padding: 2px 0;    
+}
+
+/* All links are set to action.linkColor but section header links are grey */
+.section-header a:link,
+.section-header a:active,
+.section-header a:hover,
+.section-header a:visited {
+    color: #666;
+}
+
+h2.section-title {
+    font-size: 12pt;
+    font-weight: bold;
+    color: black;
+    margin-top: 20px;
+    padding: 0;
+    display: inline;
+}
+
+.section-title a:link,
+.section-title a:active,
+.section-title a:hover,
+.section-title a:visited {
+    color: black;
+}
+
+#sidebar,
+.sidebar {
+    clear: right;
+    float: right;
+    width: 16em;
+    margin-left: 10px;
+}
+
+.has-sidebar #content.space,
+.has-sidebar #content.edit form.markup,
+.has-sidebar .wiki-content {
+    margin-right: 17em;
+}
+
+.has-sidebar .wiki-content .wiki-content {
+    margin-right: 0;
+}
+
+.active-richtext #content.create-page,
+.active-preview #content.create-page {
+    margin-right: 0 !important;
+}
+
+.sidebar-content {
+    margin: 10px 0 0 1em;
+}
+.blogcalendar {
+    width: 16em;
+}
+.blogcalendar th a.calendarhead,
+.blogcalendar th.calendarhead {
+    font-size: 1em;
+}
+.blogcalendar td,
+.blogcalendar th {
+    font-size: .85em;
+}
+
+/* folder tab link styles */
+.tabnav .tabs a {
+    padding: 5px 5px 4px;
+    margin: 5px 3px 0 0;
+    border-width: 1px;
+    border-style: solid;
+    border-bottom: none;
+    text-decoration: none;
+    display: block;
+    float: left;
+}
+
+.tabnav .tabs a.current {
+    background: white;
+    border-bottom: 1px solid white;
+    color: black;
+}
+.tabnav .tabs a.current:link, .tabnav .tabs a.current:visited {
+    color: black;
+}
+.tabnav .tabs a.current:hover {
+    background: white;
+    border-bottom: 1px solid white;
+    color: black;
+}
+
+/* list page navigational tabs */
+.tabnav, .comment .tabnav {
+    padding: 0;
+    margin: 0;
+    border-bottom-width: 1px;
+    border-bottom-style: solid;
+    float: left;
+    display: inline;
+    list-style-position: outside;
+    width: 100%;
+    font-weight: bold;
+    font-size: 10pt;
+}
+
+.after-tabnav {
+    clear: both;
+}
+
+.tabnav li.tabs {
+    list-style: none;
+    margin: 0 0 -1px 10px;
+    float: left;
+    display: block;
+}
+
+
+/* dashboard customization */
+#spacesLabel {
+    padding: 4px 6px;
+    float: left;
+    margin-top: 5px;
+}
+
+#footer {
+    position:absolute;
+    bottom:0;
+    width:100%;
+}
+
+#poweredby,
+#poweredby a {
+    font-size: 11px;
+}
+
+/* We can't have a separate IE css file because the default theme
+   hard codes the location of the theme stylesheet */
+
+/* IE6: treated as min-height*/
+* html #full-height-container {
+    height: 100%;
+    background-color:#F0F0F0;
+}
+
+* html #main {
+    padding-bottom: 1em;
+    height: 88%; /* fake ie6 min height - not perfect but better than 
alternatives */
+}
+
+* html #footer {
+    position: relative;
+}
+
+/* no footer in popups. */
+body.popup-window #footer {
+    display: none;
+}
+
+* html .popup-window #full-height-container {
+    background-color:#fff;
+}
+
+

Added: 
websites/production/struts/content/development/2.x/docs/home.data/information-macros.css
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/home.data/information-macros.css
 (added)
+++ 
websites/production/struts/content/development/2.x/docs/home.data/information-macros.css
 Wed Jul 17 09:31:08 2013
@@ -0,0 +1,124 @@
+/* Information plugin styles */
+
+.noteMessage, .warningMessage, .infoMessage, .tipMessage {
+    border-style: solid;
+    border-width: 1px;
+    text-align: center;
+    padding: 5px;
+    overflow: hidden; /* fix width next to floated content */
+}
+
+.noteMessage {
+    border-color: #f0c000;
+    background: #ffffce;
+}
+
+.warningMessage {
+    border-color: #c00;
+    background: #fcc;
+}
+
+.infoMessage {
+    border-color: #69c;
+    background: #d8e4f1;
+}
+
+.tipMessage {
+    border-color: #090;
+    background-color: #dfd;
+}
+
+table.infoMacro td, table.warningMacro td, table.tipMacro td, table.noteMacro 
td {
+    border: none;
+}
+
+.informationMacroPadding {
+    padding: 5px 0 0 5px;
+}
+
+.noteMacro, .warningPanel {
+    background-color: #ffffce;
+}
+#addition .noteMacro {
+    border-style: solid;
+    border-width: 1px;
+    border-color: #f0c000;
+    background-color: #ffffce;
+    text-align:left;
+    padding: 10px;
+    width: 100%;
+    margin: 5px 20px;
+}
+
+#addition .noteMacro td {
+    font-size: 10pt;
+    padding: 2px;
+    padding-right: 15px;
+}
+
+#addition .noteMacro p {
+    font-size: 10pt;
+}
+
+#addition .noteMacro b {
+    font-size: 10pt;
+}
+
+#addition table.noteMacro td {
+    border: none;
+}
+
+#replying .noteMacro {
+    border-style: solid;
+    border-width: 1px;
+    border-color: #f0c000;
+    background-color: #ffffce;
+    text-align:left;
+    padding: 10px;
+    width: 100%;
+    margin: 5px 20px;
+}
+
+#replying .noteMacro td {
+    font-size: 10pt;
+    padding: 2px;
+    padding-right: 15px;
+}
+
+#replying .noteMacro p {
+    font-size: 10pt;
+}
+
+#replying .noteMacro b {
+    font-size: 10pt;
+}
+
+#replying table.noteMacro td {
+    border: none;
+}
+
+.tipMacro {
+    background-color: #dfd;
+}
+
+.warningMacro {
+    background-color: #fcc;
+}
+
+.infoMacro {
+    background-color: #d8e4f1;
+}
+
+.warningPanel {
+    border-style: solid;
+    border-width: 1px;
+    padding: 8px;
+    margin: 10px;
+}
+
+.warningPanel {
+    border-color: #f0c000;
+}
+
+
+

Added: 
websites/production/struts/content/development/2.x/docs/home.data/layout-macros.css
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/home.data/layout-macros.css
 (added)
+++ 
websites/production/struts/content/development/2.x/docs/home.data/layout-macros.css
 Wed Jul 17 09:31:08 2013
@@ -0,0 +1,18 @@
+/* Layout plugin styles */
+
+.sectionMacro,
+.sectionMacro p,
+.sectionMacro ul,
+.sectionMacro ol {
+    font-size: 10pt;
+}
+
+table.sectionMacro td {
+    border: none;
+}
+
+table.sectionMacroWithBorder td.columnMacro {
+    border-style: dashed;
+    border-width: 1px;
+    border-color: #ccc;
+}
\ No newline at end of file

Added: 
websites/production/struts/content/development/2.x/docs/home.data/login.css
==============================================================================
--- websites/production/struts/content/development/2.x/docs/home.data/login.css 
(added)
+++ websites/production/struts/content/development/2.x/docs/home.data/login.css 
Wed Jul 17 09:31:08 2013
@@ -0,0 +1,146 @@
+body.login,
+body.login #main,
+body.login #full-height-container {
+    background: #fafafa;
+}
+
+* html body.login,
+* html body.login #full-height-container {
+    background: #f0f0f0;
+}
+
+#com-atlassian-confluence.login h1 {
+    width: 560px;
+    margin: 0 auto;
+}
+
+#login-container {
+    margin: 0 auto;
+    width: 500px;
+    padding: 20px 30px;
+    background: #fff;
+}
+
+body.login #header {
+    display: none;
+}
+
+/* Gets rid of the break above the footer */
+body.login .clear {
+    display: none;
+}
+
+body.login #main {
+    overflow: hidden;
+    padding: 10% 0 12%;
+}
+
+#login-container .form-error-block{
+    background: none;
+    border: none;
+    margin: 0;
+    padding: 0;
+}
+
+#login-container,
+#login-container form.aui {
+    color: #333;
+}
+
+#login-container,
+#login-container .captcha-image {
+    border: 1px solid #eee;
+    -moz-border-radius: 3px;
+    -webkit-border-radius: 3px;
+}
+
+#login-container div.login-form-container {
+    margin-bottom: 10px;
+    padding: 0 0 5px 20px;
+}
+
+#login-container .login-form-container fieldset {
+    padding-top: 15px;
+}
+
+#login-container .checkboxes label {
+    left: 0;
+    margin-right: 0;
+    float: none;
+    display: inline;
+}
+
+/* Overide default label styling */
+#com-atlassian-confluence.login #login-container label {
+    color: #333;
+}
+
+#login-container .login-form-container .text,
+#login-container .login-form-container .password {
+    width: 95%;
+}
+
+#login-container .message {
+    padding: 0;
+    width: auto;
+}
+
+#login-container p {
+    margin: 0 0 1em;
+    color: #333;
+}
+
+#login-container p.last {
+    margin: 0;
+}
+
+#login-container p.success-message {
+    color: green;
+}
+
+body.signup #main{
+    padding: 5% 0 7%;
+}
+
+#login-container .captcha-image {
+    margin: 10px 0;
+    width: 200px;
+    height: 100px;
+    float: left;
+}
+
+#captcha-error span.errorMessage {
+    color: #990000;
+    font-weight: normal;
+}
+
+#captcha-container .reload {
+    width: 16px;
+    height: 16px;
+    float: left;
+    position: relative;
+    top: 16px;
+    left: 10px;
+}
+
+#captcha-container label#captcha-reponse-label {
+    float: none;
+    left: 0;
+    margin: 0;
+    width: auto;
+}
+
+#captcha-container input {
+    width: 192px;
+}
+
+#coherence-copyright {
+    margin: 0;
+    text-align: center;
+    font-size: 0.8em;
+    padding-bottom: 3px;
+}
+
+#coherence-copyright a {
+    color: #666;
+}
\ No newline at end of file

Added: 
websites/production/struts/content/development/2.x/docs/home.data/master-ie.css
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/home.data/master-ie.css 
(added)
+++ 
websites/production/struts/content/development/2.x/docs/home.data/master-ie.css 
Wed Jul 17 09:31:08 2013
@@ -0,0 +1,93 @@
+html body { /* HACK: Temporary fix for CONF-15412 */
+    overflow: visible;
+}
+body .dialog .button-panel { /* HACK: Temporary fix for CONF-15421 */
+    bottom: 0;
+    top: auto;
+}
+img {
+    -ms-interpolation-mode: bicubic;
+}
+#header {
+    height: 1%;
+}
+#breadcrumbs {
+    height: 1%; /* IE6 wrapping */
+    overflow: auto;
+    *overflow: visible; /* IE7 and below */
+}
+#breadcrumbs li {
+    white-space: nowrap;
+}
+* html #breadcrumbs li {
+    background-image: 
url(../../../images/decoration/white_breadcrumbs_indicator.gif); /* IE6 */
+}
+* html .page-metadata {
+    height: 1.2em; /* IE6 */
+}
+#breadcrumbs li {
+    background-position: 3px 10px;
+}
+form {
+    margin: 0;
+    padding: 0;
+}
+.tab-navigation .tab {
+    float: left;
+    display: inline;
+    font-weight: bold;
+    margin: 0 5px 0 0;
+    position: relative;
+}
+.tab-navigation .tab a {
+    display: inline-block; /* anchors were making tabs very wide in Clickr 
theme in IE */
+}
+a.icon {
+    height: 16px;
+}
+#tree-div {
+    min-height: 300px;
+    height: auto !important;
+    height: 300px;
+}
+h1 #content-title {
+    margin: 0;
+    display: block;
+    width: 90%; /* 93% and upwards breaks at least one of the IEs */
+}
+h1 span.title-text {
+    height: 1%;
+}
+#com-atlassian-confluence h1 {
+    width: auto;
+}
+
+#com-atlassian-confluence h1 img.logo {
+    *margin-bottom: 0;
+}
+
+* html #com-atlassian-confluence h1 img.custom {
+   /* sets max-height for IE - roughly equivalent to what real browsers do 
with 2.5em max-height */
+   height: expression( this.scrollHeight > 59 ? "60px" : "auto" );
+}
+
+#tab-navigation,
+.tab-navigation {
+    zoom: 1;
+}
+.has-sidebar #content .code {
+    _clear: both; 
+    _overflow: auto; 
+}
+.menu-section-list li a:visited,
+.menu-section-list li a:hover {
+    color: #666;
+}
+.menu-section-list li.active a:visited {
+    color: #fff;
+}
+
+/* Don't remove or dropdowns may break in IE6. CONF-17932 */
+* html #header-menu-bar .hidden {
+    width: 12em;
+}
\ No newline at end of file


Reply via email to