Commits

Anonymous committed e902010

Transferred code from SourceForge repository as of 2003.07.23 23:40

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@3e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (212)

+*.ipr
+*.iws
+*.iml
+build
+dist
+test*
+target
+maven.log
+name=xwork
+version=1.0-dev
+<project default="jar" basedir=".">
+    <path id="cp">
+        <fileset dir="lib">
+            <include name="**/*.jar"/>
+        </fileset>
+    </path>
+
+    <path id="jalopy.classpath">
+        <fileset dir="lib/build/jalopy">
+            <include name="*.jar"/>
+        </fileset>
+    </path>
+
+    <property file="build.properties"/>
+
+    <property name="lib" value="lib"/>
+    <property name="lib.core" value="${lib}/core"/>
+    <property name="lib.build" value="${lib}/build"/>
+    <property name="lib.optional" value="${lib}/optional"/>
+
+    <property name="src" value="src"/>
+    <property name="src.java" value="${src}/java"/>
+    <property name="src.test" value="${src}/test"/>
+    <property name="src.etc" value="${src}/etc"/>
+
+    <property name="build" value="build"/>
+    <property name="build.test" value="${build}/test"/>
+    <property name="build.java-test" value="${build}/java-test"/>
+    <property name="build.java" value="${build}/java"/>
+    <property name="build.clover" value="${build}/clover"/>
+    <property name="build.dist" value="${build}/dist"/>
+
+    <property name="clover.initstring" value="${build.clover}/coverage.db"/>
+
+    <property name="docs" value="docs"/>
+
+    <target name="clean">
+        <delete dir="${build}"/>
+    </target>
+
+    <target name="java">
+        <mkdir dir="${build.java}"/>
+        <javac srcdir="${src.java}" destdir="${build.java}" classpathref="cp" debug="on"/>
+        <copy filtering="no" todir="${build.java}">
+            <fileset dir="${src.java}">
+                <exclude name="**/*.java"/>
+                <exclude name="**/package.html"/>
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="test" depends="format, java">
+        <taskdef resource="clovertasks"/>
+        <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
+
+        <mkdir dir="${build.clover}"/>
+
+        <mkdir dir="${build.test}"/>
+        <javac srcdir="${src.test}" destdir="${build.test}" classpath="${build.java}" classpathref="cp" debug="on"/>
+        <copy filtering="no" todir="${build.test}">
+            <fileset dir="${src.test}">
+                <exclude name="**/*.java"/>
+                <exclude name="**/package.html"/>
+            </fileset>
+        </copy>
+
+        <mkdir dir="${build.java-test}"/>
+        <javac srcdir="${src.java}" destdir="${build.java-test}" classpathref="cp" debug="on" compiler="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
+        <copy filtering="no" todir="${build.java-test}">
+            <fileset dir="${src.java}">
+                <exclude name="**/*.java"/>
+                <exclude name="**/package.html"/>
+            </fileset>
+        </copy>
+
+        <mkdir dir="${build.dist}/docs/junit"/>
+        <junit printsummary="yes" haltonfailure="yes" haltonerror="yes" fork="yes">
+            <classpath>
+                <pathelement location="${build.test}"/>
+                <pathelement location="${build.java-test}"/>
+                <pathelement location="${src.etc}/test"/>
+                <pathelement location="${src.etc}"/>
+                <path refid="cp"/>
+            </classpath>
+
+            <formatter type="xml"/>
+            <formatter type="brief" usefile="false"/>
+
+            <batchtest todir="${build.dist}/docs/junit">
+                <fileset dir="${src.test}">
+                    <include name="**/*Test.java"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="format">
+        <taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
+            <classpath refid="jalopy.classpath"/>
+        </taskdef>
+
+        <jalopy fileformat="unix"
+            convention="${basedir}/src/etc/jalopy.xml"
+            history="file"
+            historymethod="adler32"
+            loglevel="error"
+            threads="2"
+            classpathref="cp">
+            <fileset dir="${src.java}">
+                <include name="**/*.java"/>
+            </fileset>
+            <fileset dir="${src.test}">
+                <include name="**/*.java"/>
+            </fileset>
+        </jalopy>
+    </target>
+
+    <target name="jar" depends="java">
+        <mkdir dir="${build}"/>
+
+        <copy todir="${build.java}" file="${src.etc}/xwork-1.0.dtd"/>
+        <copy todir="${build.java}" file="${src.etc}/xwork-validator-1.0.dtd"/>
+
+        <jar basedir="${build.java}" jarfile="${build}/${name}-${version}.jar"/>
+    </target>
+
+    <target name="javadocs">
+        <mkdir dir="${build.dist}/docs/api"/>
+        <javadoc sourcepath="${src.java}"
+            destdir="${build.dist}/docs/api"
+            packagenames="com.opensymphony.*"
+            classpathref="cp"
+            author="true"
+            version="true"
+            windowTitle="${name} ${version} API"
+            doctitle="${name}"
+            footer="See &lt;a href=&quot;http://www.opensymphony.com&quot;&gt;www.opensymphony.com&lt;/a&gt; for more information."
+            use="true"
+            verbose="false"/>
+        <!-- <copy overwrite="yes" file="${docs}/main.css" tofile="${docs}/api/stylesheet.css"/> -->
+    </target>
+
+    <target name="clover.report" depends="test">
+        <clover-report>
+            <current outfile="${build.dist}/docs/clover">
+                <format type="html"/>
+            </current>
+        </clover-report>
+    </target>
+
+    <target name="clover.historical" depends="clover.report">
+        <clover-historypoint historyDir="${build.clover}"/>
+
+        <clover-report>
+            <historical outfile="${build.dist}/docs/clover" historyDir="${build.clover}">
+                <format type="html"/>
+            </historical>
+        </clover-report>
+    </target>
+
+    <target name="junit.report" depends="test">
+        <junitreport todir="${build.dist}/docs/junit">
+            <fileset dir="${build.dist}/docs/junit">
+                <include name="TEST-*.xml"/>
+            </fileset>
+            <report format="frames" todir="${build.dist}/docs/junit"/>
+        </junitreport>
+    </target>
+
+    <target name="docs" depends="javadocs, clover.report, junit.report">
+        <copy todir="${build.dist}/docs">
+            <fileset dir="${docs}"/>
+        </copy>
+    </target>
+
+    <target name="dist" depends="jar, docs">
+        <copy file="${build}/${name}-${version}.jar" todir="${build.dist}"/>
+        <zip zipfile="${build}/${name}-${version}.zip" basedir="${build.dist}"/>
+    </target>
+
+    <!--
+      - A happy target to allow anthill to kick off a maven build.  As this does a site:deploy, you'll need to specify
+      - the user who should be doing the deploy
+      -
+      - ant -Dmaven.username=build site:deploy
+      -->
+    <target name="site:deploy">
+        <exec executable="maven" failonerror="true">
+            <arg line="-Dmaven.username=${maven.username} site:deploy"/>
+        </exec>
+    </target>
+
+</project>
+
+
+
+<html>
+<head>
+<title>XWork Basics</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="main.css" type="text/css">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+<h1>XWork Basics </h1>
+<p><b>Actions </b></p>
+<p>Actions are the basic unit of execution...</p>
+<p><b>The Action Interface</b></p>
+<p><b>ActionSupport </b></p>
+<p><b>ActionContext </b></p>
+<p><b>Lifecycle </b></p>
+<p><b>No FormBeans? </b></p>
+</body>
+</html>

docs/configuration.html

+<html>
+<head>
+<title>XWork Configuration</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="main.css" type="text/css">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+<h1>XWork Configuration </h1>
+<p>Xwork is configured through the use of a file named xwork.xml in the root of 
+  the classpath. This file defines the action and interceptor configurations and 
+  mappings. Here's the test xwork.xml file:</p>
+<table width="90%" border="0" bgcolor="#E9E9E9">
+  <tr>
+    <td> 
+      <pre>&lt;!DOCTYPE xwork PUBLIC &quot;-//OpenSymphony Group//XWork 1.0//EN&quot; &quot;http://www.opensymphony.com/xwork/xwork-1.0.dtd&quot;&gt;<br>&lt;xwork&gt;<br>    &lt;package name=&quot;default&quot;&gt;<br>        &lt;result-types&gt;<br>            &lt;result-type name=&quot;chain&quot; class=&quot;com.opensymphony.xwork.ActionChainResult&quot;/&gt;<br>        &lt;/result-types&gt;<br>        &lt;interceptors&gt;<br>            &lt;interceptor name=&quot;timer&quot; class=&quot;com.opensymphony.xwork.interceptor.TimerInterceptor&quot;/&gt;<br>            &lt;interceptor name=&quot;logger&quot; class=&quot;com.opensymphony.xwork.interceptor.LoggingInterceptor&quot;/&gt;<br>            &lt;interceptor name=&quot;chain&quot; class=&quot;com.opensymphony.xwork.interceptor.ChainingInterceptor&quot;/&gt;<br>            &lt;interceptor name=&quot;params&quot; class=&quot;com.opensymphony.xwork.interceptor.ParametersInterceptor&quot;/&gt;<br>            &lt;interceptor name=&quot;static-params&quot; class=&quot;com.opensymphony.xwork.interceptor.StaticParametersInterceptor&quot;/&gt;<br>            &lt;interceptor name=&quot;component&quot; class=&quot;com.opensymphony.xwork.interceptor.component.ComponentInterceptor&quot;/&gt;<br>            &lt;interceptor name=&quot;result&quot; class=&quot;com.opensymphony.xwork.interceptor.ResultInterceptor&quot;/&gt;<br>            &lt;interceptor name=&quot;stack&quot; class=&quot;com.opensymphony.xwork.interceptor.StackInterceptor&quot;/&gt;<br>            &lt;interceptor-stack name=&quot;defaultStack&quot;&gt;<br>                &lt;interceptor-ref name=&quot;result&quot;/&gt;<br>                &lt;interceptor-ref name=&quot;static-params&quot;/&gt;<br>                &lt;interceptor-ref name=&quot;params&quot;/&gt;<br>                &lt;interceptor-ref name=&quot;stack&quot;/&gt;<br>            &lt;/interceptor-stack&gt;<br>            &lt;interceptor-stack name=&quot;debugStack&quot;&gt;<br>                &lt;interceptor-ref name=&quot;timer&quot;/&gt;<br>                &lt;interceptor-ref name=&quot;logger&quot;/&gt;<br>            &lt;/interceptor-stack&gt;<br>        &lt;/interceptors&gt;<br>        &lt;global-results&gt;<br>            &lt;result name=&quot;login&quot; type=&quot;chain&quot;&gt;<br>                &lt;param name=&quot;actionName&quot;&gt;login&lt;/param&gt;<br>            &lt;/result&gt;<br>        &lt;/global-results&gt;<br>        &lt;action name=&quot;Foo&quot; class=&quot;com.opensymphony.xwork.SimpleAction&quot;&gt;<br>            &lt;param name=&quot;foo&quot;&gt;17&lt;/param&gt;<br>            &lt;param name=&quot;bar&quot;&gt;23&lt;/param&gt;<br>            &lt;result name=&quot;success&quot; type=&quot;chain&quot;&gt;<br>                &lt;param name=&quot;actionName&quot;&gt;Bar&lt;/param&gt;<br>            &lt;/result&gt;<br>            &lt;interceptor-ref name=&quot;debugStack&quot;/&gt;<br>            &lt;interceptor-ref name=&quot;defaultStack&quot;/&gt;<br>        &lt;/action&gt;<br>    &lt;/package&gt;<br>    &lt;package name=&quot;bar&quot; extends=&quot;default&quot; namespace=&quot;/foo/bar&quot;&gt;<br>        &lt;interceptors&gt;<br>            &lt;interceptor-stack name=&quot;barDefaultStack&quot;&gt;<br>                &lt;interceptor-ref name=&quot;debugStack&quot;/&gt;<br>                &lt;interceptor-ref name=&quot;defaultStack&quot;/&gt;<br>            &lt;/interceptor-stack&gt;<br>        &lt;/interceptors&gt;<br>        &lt;action name=&quot;Bar&quot; class=&quot;com.opensymphony.xwork.SimpleAction&quot;&gt;<br>            &lt;interceptor-ref name=&quot;barDefaultStack&quot;/&gt;<br>        &lt;/action&gt;<br>    &lt;/package&gt;<br>    &lt;package name=&quot;abstractPackage&quot; namespace=&quot;/abstract&quot; abstract=&quot;true&quot;&gt;<br>        &lt;action name=&quot;test&quot; class=&quot;com.opensymphony.xwork.SimpleAction&quot;/&gt;<br>    &lt;/package&gt;<br>    &lt;package name=&quot;nonAbstractPackage&quot; extends=&quot;abstractPackage&quot; namespace=&quot;/nonAbstract&quot;/&gt;<br>&lt;/xwork&gt;</pre>
+    </td>
+  </tr>
+</table>
+<ul>
+  <li><b>Packages</b> - All configuration settings are in a package. Result types, 
+    interceptors, and actions are all package context specific, no more global 
+    settings (unless you have a &quot;default&quot; package and have your other 
+    packages extend it). Result, Interceptor, and Action configurations are inherited 
+    by packages which &quot;extend&quot; another package, such as package &quot;bar&quot; 
+    above, which extends &quot;default&quot;. </li>
+  <li><b>Interceptor stacks</b> - Make it easier to have sets of interceptors 
+    you apply together in a certain order. These are also inherited as part of 
+    the interceptor definition inheritance. Essentially these are just name mappings 
+    to lists of interceptors instead of one Interceptor. </li>
+  <li><b>Namespaces</b> - a new idea of mine, this allows actions to be aliased 
+    with the same name, providing they are in different namespaces. With the ServletDispatcher, 
+    this equates to the path before the action name, which will allow for J2EE 
+    declarative security. Namespaces are optional attributes of package definitions 
+    and, if excluded, defaults to &quot;&quot;. If the action configuration is 
+    not found with the supplied namespace, the &quot;&quot; namespace is checked 
+    as the default namespace, which makes it work like we have now (any path works, 
+    you get the action aliased with the name). </li>
+</ul>
+<p>xwork.xml elements </p>
+<p>Package </p>
+<p>The package element has one required attribute, &quot;name&quot;, which acts 
+  as the key for later reference to this package. The &quot;extends&quot; attribute 
+  is optional and allows one package to inherit the configuration of a previous 
+  package including all interceptor, interceptor-stack, and action configurations. 
+  Note that the configuration file is processed sequentially down the document, 
+  so the package referenced by an &quot;extends&quot; should be defined above 
+  the package which extends it. The &quot;abstract&quot; optional attribute allows 
+  you to make a package abstract, which will allow you to extend from it without 
+  the action configurations defined in the abstract package actually being available 
+  at runtime.</p>
+<p>Namespace </p>
+<p>The optional namespace attribute warrants its own discussion section. The namespace 
+  attribute allows you to segregate action configurations into namespaces, so 
+  that you may use the same action alias in more than one namespace with different 
+  classes, parameters, etc. This is in contrast to Webwork 1.x, where all action 
+  names and aliases were global and could not be re-used in an application. The 
+  default namespace, which is &quot;&quot; (an empty string) is used as a &quot;catch-all&quot; 
+  namespace, so if an action configuration is not found in a specified namespace, 
+  the default namespace will also be searched. This allows you to have global 
+  action configurations outside of the &quot;extends&quot; hierarchy, as well 
+  as to allow the previous Webwork 1.x behavior by not specifying namespaces. 
+  It is also intended that the namespace functionality can be used for security, 
+  for instance by having the path before the action name be used as the namespace 
+  by the Webwork 2.0 ServletDispatcher, thus allowing the use of J2EE declarative 
+  security on paths to be easily implemented and maintained.</p>
+<p>Result-Type </p>
+<p>Result types define classes and map them to names to be referred in the action 
+  configuration results. This serves as a shorthand name-value pair for these 
+  classes.</p>
+<p>Interceptors</p>
+<p> Interceptors also serve as a name-value pairing for referring to specific 
+  Interceptor classes by a shorthand name where we use interceptor-ref elements, 
+  such as in Interceptor stacks and action configurations.</p>
+<p>Interceptor-Stack </p>
+<p>The interceptor-stack element allows you to assign a name for later referencing 
+  via interceptor-ref to an ordered list of interceptors. This allows you to create 
+  standard groups of interceptors to be used in a certain order. The interceptor 
+  stack name/value pairs are stored in the same map as the interceptor definitions, 
+  so anywhere you use an interceptor-ref to refer to an interceptor you may also 
+  refer to an interceptor stack.</p>
+<p>Global-results</p>
+<p> The global results allows you to define result mappings which will be used 
+  as defaults for all action configurations and will be automatically inherited 
+  by all action configurations in this package and all packages which extend this 
+  package.</p>
+<p>Action</p>
+<p> The action element allows the mapping of names to action classes. These names 
+  are used, along with the namespace described above, to retrieve the action config 
+  from the configuration. The action may also be parameterized by using the param 
+  elements, as above, which will set parameters into the Action at execution (with 
+  the help of the StaticParametersInterceptor). The action may also have one or 
+  more results mapped to string return codes, such as &quot;success&quot;, &quot;error&quot;, 
+  or &quot;input&quot;, which are the default 3 return states for actions, although 
+  ANY return string may be used and mapped to a result. The result, which is mapped 
+  to a result class by the &quot;type&quot; attribute which refers to the result-type 
+  name defined above, may also be parameterized by using the param element. The 
+  action may also define one or more interceptor refs to either interceptors or 
+  interceptor stacks to be applied before and after the action execution (see 
+  the section on Interceptors below). The ordering of these interceptor refs determines 
+  the order in which they will be applied. </p>
+</body>
+</html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Xwork Documentation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="main.css" type="text/css">
+</head>
+
+<body bgcolor="#FFFFFF">
+<h1>XWork Documentation</h1>
+<ol>
+  <li><b><a href="intro.html">XWork Introduction</a></b> 
+    <ul>
+      <li>What is XWork?</li>
+      <li>How does WebWork 2.0 relate to XWork?</li>
+    </ul>
+  </li>
+  <li><b><a href="basics.html">XWork Basics</a></b> 
+    <ul>
+      <li>Actions</li>
+      <li>The Action Interface</li>
+      <li>ActionSupport</li>
+      <li>ActionContext</li>
+      <li>Lifecycle</li>
+      <li>No Formbeans?</li>
+    </ul>
+  </li>
+  <li><b><a href="configuration.html">XWork Configuration</a></b> </li>
+  <ul>
+    <li>xwork.xml</li>
+  </ul>
+  <li><b><a href="ognl.html">Ognl Expression Language</a></b> 
+    <ul>
+      <li>Extensions beyond Ognl</li>
+    </ul>
+  </li>
+  <li><b><a href="interceptors.html">XWork Interceptors</a></b> 
+    <ul>
+      <li>Utility Interceptors</li>
+      <li>Parameter Interceptors</li>
+      <li>ResultInterceptor, StackInterceptor, ChainingInterceptor</li>
+    </ul>
+  </li>
+  <li><b><a href="components.html">The Component Lifecycle</a></b>
+    <ol>
+      <li>Inversion of Control</li>
+      <li>Resource Management</li>
+    </ol>
+  </li>
+  <li><b><a href="validation.html">XWork Validation Framework</a></b> 
+    <ul>
+      <li>Turning on Validation</li>
+      <li>The ValidationInterceptor</li>
+      <li>Defining validation rules in a validation.xml</li>
+      <li>Building a FieldValidator</li>
+      <li>Localized and Parameterized messages</li>
+      <li>Using the ExpressionValidator</li>
+    </ul>
+  </li>
+</ol>
+</body>
+</html>
+<html>
+<head>
+<title>XWork Introduction</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="main.css" type="text/css">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+<h1>XWork Introduction</h1>
+<p><b>What is XWork?</b></p>
+<p>XWork is a generic command framework that was first conceptualized in WebWork 
+  1.0. Since then a lot of new ideas have been added to both the web portion of 
+  WebWork, as well as the command framework that powered WebWork. XWork follows 
+  many well-known (and some not so well-known) patterns such as the <i>Interceptor 
+  pattern</i>,<i> Inversion of Control</i>, and the <i>Command pattern</i>. You 
+  can learn more about these patterns later in this documentation.</p>
+<p><b>How does XWork relate to WebWork?</b></p>
+<p>XWork was originally created from the core ideas represented in WebWork 1.0. 
+  It was later decided that splitting WebWork up in to two projects would be best. 
+  This means that WebWork 2.0+ will be powered by XWork. Any web-specific stuff 
+  that was in WebWork 1.0 is left to be in WebWork 2.0, while all the generic 
+  framework stuff has been left in XWork. XWork also provides many new framework 
+  features not found in the original WebWork 1.0 framework. </p>
+</body>
+</html>
+li, br, div, p {
+	font-family : Verdana,Arial,Helvetica,"MS Sans Serif";
+}
+
+i, b, em, strong {
+	color: #164a7d;
+}
+
+pre,code {
+	color: #164a7d;
+	font-size : 12px;
+}
+
+h1, h2, h3, h4, h5, h6 {
+	color: #164a7d;
+	text-align: left;
+}
+
+a, a:visited{
+	color: #164a7d;
+}
+
+li {
+	padding-bottom: 2pt;
+}
+
+a { }a:visited { }b { }body { 
+	font-family : Verdana, Arial, Helvetica, sans-serif;
+; font-size: 12px } td { 
+	font-family : Verdana, Arial, Helvetica, sans-serif;
+; font-size: 10px } 

lib/build/clover-1.2.jar

Binary file added.

lib/build/jalopy/aelfred-1.2.jar

Binary file added.

lib/build/jalopy/jalopy-1.0b10.jar

Binary file added.

lib/build/jalopy/jalopy-ant-0.6.1.jar

Binary file added.

lib/build/jalopy/jaxp-1.2.jar

Binary file added.

lib/build/jalopy/jdom-1.0b8.jar

Binary file added.

lib/build/jalopy/log4j-1.2.6.jar

Binary file added.

lib/build/jalopy/oro-2.0.6.jar

Binary file added.

lib/build/jalopy/sax-2.0.1.jar

Binary file added.

lib/build/junit-3.8.1.jar

Binary file added.

lib/build/mockobjects-alt-jdk1.3-0.09dev.jar

Binary file added.

lib/build/mockobjects-core-0.09dev.jar

Binary file added.

lib/build/mockobjects-jdk1.3-0.09dev.jar

Binary file added.

lib/build/velocity.jar

Binary file added.

lib/core/commons-logging.jar

Binary file added.

lib/core/mail.jar

Binary file added.

lib/core/ognl-2.5.1.jar

Binary file added.

lib/core/oscore-2.2.1.jar

Binary file added.
+<?xml version="1.0"?>
+
+<project default="java:jar" 
+  xmlns:jxr="jxr" 
+  xmlns:j="jelly:core" 
+  xmlns:deploy="deploy" 
+  xmlns:ant="jelly:ant"
+  xmlns:maven="jelly:maven">
+
+  <!-- 
+    - we want this to happen every time we deploy the site
+    -->
+  <postGoal name="site:deploy">
+    <attainGoal name="deploy-snapshot"/>
+  </postGoal>
+
+  <!-- 
+    - create a snapshot and automatically deploy it to the maven repository
+    -->
+  <goal name="deploy-snapshot">
+    <maven:snapshot project="${pom}"/>
+    <j:set var="maven.final.name" value="${snapshotSignature}"/>
+    <ant:echo>Building snapshot JAR: ${maven.final.name}</ant:echo>
+
+    <attainGoal name="jar:jar"/>
+
+    <!--
+      - xwork.jar.dir is a custom property defined in project.properties that 
+      - indicates which directory on the remote server the snapshot should be 
+      - deployed to
+      -->
+    <echo message="copying to ${maven.username}@${pom.siteAddress}:${xwork.jar.dir}"/>
+    <exec dir="${maven.build.dir}" executable="${maven.scp.executable}">
+      <arg value="${maven.final.name}.jar"/>
+      <arg value="${maven.username}@${pom.siteAddress}:${xwork.jar.dir}"/>
+    </exec>
+    <exec dir="${maven.build.dir}" executable="${maven.scp.executable}">
+      <arg value="${maven.final.name}.jar"/>
+      <arg value="${maven.username}@${pom.siteAddress}:${xwork.jar.dir}/xwork-SNAPSHOT.jar"/>
+    </exec>
+  </goal>
+</project>

project.properties

+maven.repo.remote = http://ibiblio.org/maven, http://opensymphony.indigoegg.com/maven
+
+maven.ui.section.background = #194A7A
+maven.ui.banner.background  = #194A7A
+maven.ui.source.background  = #194A7A
+
+maven.ui.breadcrumbs.background   = #ffffcc
+maven.ui.table.row.odd.background = #ffffcc
+maven.ui.table.row.even.background = #ffffee
+
+maven.xdoc.date=left
+maven.xdoc.version=${pom.currentVersion}
+
+xwork.jar.dir = /vol0/sites/opensymphony.indigoegg.com/maven/xwork/jars
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+
+    <!-- the version of maven's project object model -->
+    <pomVersion>3</pomVersion>
+
+    <!-- a unique name for this project -->
+    <id>xwork</id>
+
+    <!-- a short but descriptive name for the project -->
+    <name>XWork generic command pattern framework</name>
+
+    <!-- The version of the project under development, e.g.
+         1.1, 1.2, 2.0-dev -->
+    <currentVersion>1.0</currentVersion>
+
+    <!-- details about the organization that 'owns' the project -->
+    <organization>
+        <name>Open Symphony</name>
+        <url>http://www.opensymphony.com/</url>
+        <logo>http://www.opensymphony.com/images/logo.gif</logo>
+    </organization>
+
+    <!-- the year the project started -->
+    <inceptionYear>2000</inceptionYear>
+    <package>com.opensymphony.xwork</package>
+    <logo>http://opensymphony.indigoegg.com/xwork.png</logo>
+    <description>
+        XWork is a generic command pattern framework, that was split out of WebWork and forms the core of WebWork2.
+    </description>
+
+    <!-- a short description of what the project does -->
+    <shortDescription>
+        XWork is a generic, reusable, and extensible command pattern framework not tied to any
+        particular usage that provides, flexible and customizable configuration based on a
+        simple Configuration interface, a core command pattern framework which can be customized
+        and extended through the use of interceptors to fit any request / response environment.
+    </shortDescription>
+
+    <!-- the project home page -->
+    <url>http://wiki.opensymphony.com/space/XWork</url>
+    <issueTrackingUrl>http://jira.opensymphony.com/secure/BrowseProject.jspa?id=10030</issueTrackingUrl>
+    <siteAddress>opensymphony.indigoegg.com</siteAddress>
+    <siteDirectory>/vol0/sites/opensymphony.indigoegg.com/xwork/</siteDirectory>
+    <distributionDirectory>/vol0/sites/opensymphony.indigoegg.com/xwork/builds/</distributionDirectory>
+
+    <!-- the version control repository and http url for online access
+         the connection element has the form:
+         scm:<system>:<system specific connection string> -->
+    <repository>
+        <connection>scm:cvs:pserver:anonymous@cvs.sourceforge.net:/cvsroot/opensymphony:xwork</connection>
+        <url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/opensymphony/</url>
+    </repository>
+
+    <!-- any mailing lists for the project -->
+    <mailingLists/>
+
+    <!-- who the developers are for the project -->
+    <developers>
+        <developer>
+            <name>Patrick Lightbody</name>
+            <id>plightbo</id>
+            <email>-</email>
+            <organization>-</organization>
+            <roles>
+                <role>Project Lead</role>
+            </roles>
+        </developer>
+        <developer>
+            <name>Jason Carreira</name>
+            <id>jcarreira</id>
+            <email>-</email>
+            <organization>-</organization>
+            <roles>
+                <role>Developer</role>
+            </roles>
+        </developer>
+        <developer>
+            <name>Mike Cannon-Brookes</name>
+            <id>cybermike</id>
+            <email>-</email>
+            <organization>-</organization>
+            <roles>
+                <role>Developer</role>
+            </roles>
+        </developer>
+        <developer>
+            <name>Matt Ho</name>
+            <id>savaki</id>
+            <email>matt at indigoegg.com</email>
+            <organization>-</organization>
+            <roles>
+                <role>Developer</role>
+            </roles>
+        </developer>
+        <developer>
+            <name>Mathias Bogaert</name>
+            <id>pathoss</id>
+            <email>-</email>
+            <organization>-</organization>
+            <roles>
+                <role>Developer</role>
+            </roles>
+        </developer>
+    </developers>
+
+    <!-- jar files the project is dependent on -->
+    <dependencies>
+        <dependency>
+            <id>oscore</id>
+            <version>2.2.1</version>
+            <properties>
+                <war.bundle.jar>true</war.bundle.jar>
+            </properties>
+        </dependency>
+        <dependency>
+            <id>ognl</id>
+            <version>2.5.1</version>
+            <properties>
+                <war.bundle.jar>true</war.bundle.jar>
+            </properties>
+        </dependency>
+        <dependency>
+            <id>misc:mail</id>
+            <version>unknown</version>
+            <jar>mail.jar</jar>
+            <properties>
+                <war.bundle.jar>true</war.bundle.jar>
+            </properties>
+        </dependency>
+        <dependency>
+            <id>commons-logging</id>
+            <version>1.0.2</version>
+            <properties>
+                <war.bundle.jar>true</war.bundle.jar>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <id>junit</id>
+            <version>3.8.1</version>
+        </dependency>
+        <dependency>
+            <id>clover</id>
+            <version>1.1</version>
+        </dependency>
+        <dependency>
+            <id>velocity</id>
+            <version>1.3.1</version>
+        </dependency>
+        <dependency>
+            <id>mockobjects:mockobjects-core</id>
+            <version>0.09dev</version>
+        </dependency>
+        <dependency>
+            <id>mockobjects:mockobjects-alt-jdk1.3</id>
+            <version>0.09dev</version>
+        </dependency>
+        <dependency>
+            <id>mockobjects:mockobjects-jdk1.3</id>
+            <version>0.09dev</version>
+        </dependency>
+    </dependencies>
+
+    <!-- build information for the project -->
+    <build>
+        <nagEmailAddress>opensymphony-webwork-dev@opensymphony.com</nagEmailAddress>
+        <sourceDirectory>src/java</sourceDirectory>
+        <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+
+        <unitTest>
+            <includes>
+                <include>**/*Test.java</include>
+            </includes>
+            <resources>
+                <resource>
+                    <directory>src/etc</directory>
+                    <includes>
+                        <include>**/*.dtd</include>
+                        <include>**/*.xml</include>
+                    </includes>
+                </resource>
+                <resource>
+                    <directory>src/test</directory>
+                    <includes>
+                        <include>**/*.xml</include>
+                        <include>**/*.properties</include>
+                    </includes>
+                </resource>
+                <resource>
+                    <directory>src/java</directory>
+                    <includes>
+                        <include>**/*.xml</include>
+                        <include>**/*.properties</include>
+                    </includes>
+                </resource>
+            </resources>
+        </unitTest>
+
+        <resources>
+            <resource>
+                <directory>src/java</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+
+
+</project>
+

src/etc/jalopy.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<jalopy>
+    <general>
+        <compliance>
+            <version>14</version>
+        </compliance>
+        <style>
+            <description>OpenSymphony</description>
+            <name>OpenSymphony</name>
+        </style>
+    </general>
+    <inspector>
+        <enable>false</enable>
+        <naming>
+            <classes>
+                <abstract>[A-Z][a-zA-Z0-9]+</abstract>
+                <general>[A-Z][a-zA-Z0-9]+</general>
+            </classes>
+            <fields>
+                <default>[a-z][\w]+</default>
+                <defaultStatic>[a-z][\w]+</defaultStatic>
+                <defaultStaticFinal>[a-zA-Z][\w]+</defaultStaticFinal>
+                <private>[a-z][\w]+</private>
+                <privateStatic>[a-z][\w]+</privateStatic>
+                <privateStaticFinal>[a-zA-Z][\w]+</privateStaticFinal>
+                <protected>[a-z][\w]+</protected>
+                <protectedStatic>[a-z][\w]+</protectedStatic>
+                <protectedStaticFinal>[a-zA-Z][\w]+</protectedStaticFinal>
+                <public>[a-z][\w]+</public>
+                <publicStatic>[a-z][\w]+</publicStatic>
+                <publicStaticFinal>[a-zA-Z][\w]+</publicStaticFinal>
+            </fields>
+            <interfaces>[A-Z][a-zA-Z0-9]+</interfaces>
+            <labels>\w+</labels>
+            <methods>
+                <default>[a-z][\w]+</default>
+                <defaultStatic>[a-z][\w]+</defaultStatic>
+                <defaultStaticFinal>[a-z][\w]+</defaultStaticFinal>
+                <private>[a-z][\w]+</private>
+                <privateStatic>[a-z][\w]+</privateStatic>
+                <privateStaticFinal>[a-z][\w]+</privateStaticFinal>
+                <protected>[a-z][\w]+</protected>
+                <protectedStatic>[a-z][\w]+</protectedStatic>
+                <protectedStaticFinal>[a-z][\w]+</protectedStaticFinal>
+                <public>[a-z][\w]+</public>
+                <publicStatic>[a-z][\w]+</publicStatic>
+                <publicStaticFinal>[a-z][\w]+</publicStaticFinal>
+            </methods>
+            <packages>[a-z]+(?:\.[a-z]+)*</packages>
+            <parameters>
+                <default>[a-z][\w]+</default>
+                <final>[a-z][\w]+</final>
+            </parameters>
+            <variables>[a-z][\w]*</variables>
+        </naming>
+        <tips>
+            <adhereToNamingConvention>false</adhereToNamingConvention>
+            <alwaysOverrideEquals>false</alwaysOverrideEquals>
+            <alwaysOverrideHashCode>false</alwaysOverrideHashCode>
+            <avoidThreadGroups>false</avoidThreadGroups>
+            <declareCollectionComment>false</declareCollectionComment>
+            <dontIgnoreExceptions>false</dontIgnoreExceptions>
+            <dontSubstituteObjectEquals>false</dontSubstituteObjectEquals>
+            <neverDeclareException>false</neverDeclareException>
+            <neverDeclareThrowable>false</neverDeclareThrowable>
+            <neverInvokeWaitOutsideLoop>false</neverInvokeWaitOutsideLoop>
+            <neverReturnZeroArrays>false</neverReturnZeroArrays>
+            <neverUseEmptyFinally>false</neverUseEmptyFinally>
+            <obeyContractEquals>false</obeyContractEquals>
+            <overrideToString>false</overrideToString>
+            <referToObjectsByInterface>false</referToObjectsByInterface>
+            <replaceStructureWithClass>false</replaceStructureWithClass>
+            <stringLiterallI18n>false</stringLiterallI18n>
+            <useInterfaceOnlyForTypes>false</useInterfaceOnlyForTypes>
+            <wrongCollectionComment>false</wrongCollectionComment>
+        </tips>
+    </inspector>
+    <internal>
+        <version>6</version>
+    </internal>
+    <messages>
+        <priority>
+            <general>30000</general>
+            <parser>30000</parser>
+            <parserJavadoc>30000</parserJavadoc>
+            <printer>30000</printer>
+            <printerJavadoc>30000</printerJavadoc>
+            <transform>30000</transform>
+        </priority>
+        <showErrorStackTrace>true</showErrorStackTrace>
+    </messages>
+    <misc>
+        <threadCount>1</threadCount>
+    </misc>
+    <printer>
+        <alignment>
+            <methodCallChain>true</methodCallChain>
+            <parameterMethodDeclaration>false</parameterMethodDeclaration>
+            <ternaryOperator>true</ternaryOperator>
+            <variableAssignment>false</variableAssignment>
+            <variableIdentifier>false</variableIdentifier>
+        </alignment>
+        <backup>
+            <directory>bak</directory>
+            <level>0</level>
+        </backup>
+        <blanklines>
+            <after>
+                <block>1</block>
+                <braceLeft>0</braceLeft>
+                <class>1</class>
+                <declaration>0</declaration>
+                <footer>1</footer>
+                <header>0</header>
+                <interface>1</interface>
+                <lastImport>2</lastImport>
+                <method>1</method>
+                <package>1</package>
+            </after>
+            <before>
+                <block>1</block>
+                <braceRight>0</braceRight>
+                <caseBlock>1</caseBlock>
+                <comment>
+                    <javadoc>1</javadoc>
+                    <multiline>1</multiline>
+                    <singleline>1</singleline>
+                </comment>
+                <controlStatement>1</controlStatement>
+                <declaration>1</declaration>
+                <footer>0</footer>
+                <header>0</header>
+            </before>
+            <keepUpTo>1</keepUpTo>
+        </blanklines>
+        <braces>
+            <empty>
+                <cuddle>false</cuddle>
+                <insertStatement>false</insertStatement>
+            </empty>
+            <insert>
+                <dowhile>true</dowhile>
+                <for>true</for>
+                <ifelse>true</ifelse>
+                <while>true</while>
+            </insert>
+            <remove>
+                <block>true</block>
+                <dowhile>false</dowhile>
+                <for>false</for>
+                <ifelse>false</ifelse>
+                <while>false</while>
+            </remove>
+            <treatDifferent>
+                <methodClass>false</methodClass>
+                <methodClassIfWrapped>false</methodClassIfWrapped>
+            </treatDifferent>
+        </braces>
+        <chunks>
+            <blanklines>true</blanklines>
+            <comments>true</comments>
+        </chunks>
+        <comments>
+            <format>
+                <multiline>false</multiline>
+            </format>
+            <javadoc>
+                <check>
+                    <innerclass>false</innerclass>
+                    <tags>false</tags>
+                    <throwsTags>false</throwsTags>
+                </check>
+                <fieldsShort>true</fieldsShort>
+                <generate>
+                    <class>1</class>
+                    <constructor>0</constructor>
+                    <field>0</field>
+                    <method>0</method>
+                </generate>
+                <parseComments>false</parseComments>
+                <tags>
+                    <in-line />
+                    <standard />
+                </tags>
+                <templates>
+                    <method>
+                        <bottom> */</bottom>
+                        <exception> * @throws $exceptionType$ DOCUMENT ME!</exception>
+                        <param> * @param $paramType$ DOCUMENT ME!</param>
+                        <return> * @return DOCUMENT ME!</return>
+                        <top>/**| * DOCUMENT ME!</top>
+                    </method>
+                </templates>
+            </javadoc>
+            <remove>
+                <javadoc>false</javadoc>
+                <multiline>false</multiline>
+                <singleline>false</singleline>
+            </remove>
+            <separator>
+                <fillCharacter>/</fillCharacter>
+                <insert>true</insert>
+                <insertRecursive>false</insertRecursive>
+                <text>
+                    <class>Inner Classes</class>
+                    <constructor>Constructors</constructor>
+                    <field>Instance fields</field>
+                    <initializer>Instance initializers</initializer>
+                    <interface>Inner Interfaces</interface>
+                    <method>Methods</method>
+                    <static>Static fields/initializers</static>
+                </text>
+            </separator>
+        </comments>
+        <environment />
+        <footer>
+            <keys />
+            <smartMode>0</smartMode>
+            <use>false</use>
+        </footer>
+        <header>
+            <keys>To change template for new class use|OpenSymphon</keys>
+            <smartMode>0</smartMode>
+            <text>/*| * Copyright (c) 2002-2003 by OpenSymphony| * All rights reserved.| */</text>
+            <use>true</use>
+        </header>
+        <history>
+            <policy>disabled</policy>
+        </history>
+        <imports>
+            <grouping>
+                <defaultDepth>3</defaultDepth>
+                <packages>*:0|gnu:2|java:2|javax:2</packages>
+            </grouping>
+            <policy>disabled</policy>
+            <sort>true</sort>
+        </imports>
+        <indentation>
+            <caseFromSwitch>false</caseFromSwitch>
+            <continuation>
+                <block>true</block>
+                <operator>false</operator>
+            </continuation>
+            <firstColumnComments>true</firstColumnComments>
+            <label>false</label>
+            <policy>
+                <deep>false</deep>
+            </policy>
+            <sizes>
+                <braceCuddled>1</braceCuddled>
+                <braceLeft>1</braceLeft>
+                <braceRight>0</braceRight>
+                <braceRightAfter>1</braceRightAfter>
+                <continuation>4</continuation>
+                <deep>55</deep>
+                <extends>-1</extends>
+                <general>4</general>
+                <implements>-1</implements>
+                <leading>0</leading>
+                <tabs>8</tabs>
+                <throws>-1</throws>
+                <trailingComment>1</trailingComment>
+            </sizes>
+            <tabs>
+                <enable>false</enable>
+                <onlyLeading>false</onlyLeading>
+            </tabs>
+        </indentation>
+        <misc>
+            <arrayBracketsAfterIdent>false</arrayBracketsAfterIdent>
+            <forceFormatting>false</forceFormatting>
+            <insertExpressionParentheses>true</insertExpressionParentheses>
+            <insertLoggingConditional>true</insertLoggingConditional>
+            <insertTrailingNewline>true</insertTrailingNewline>
+            <insertUID>false</insertUID>
+        </misc>
+        <sorting>
+            <declaration>
+                <class>true</class>
+                <constructor>true</constructor>
+                <enable>true</enable>
+                <interface>true</interface>
+                <method>true</method>
+                <order>static|field|initializer|constructor|method|interface|class</order>
+                <variable>true</variable>
+            </declaration>
+            <modifier>
+                <enable>false</enable>
+                <order>public|protected|private|abstract|static|final|synchronized|transient|volatile|native|strictfp</order>
+            </modifier>
+        </sorting>
+        <whitespace>
+            <after>
+                <comma>true</comma>
+                <semicolon>true</semicolon>
+                <typeCast>true</typeCast>
+            </after>
+            <before>
+                <braces>true</braces>
+                <brackets>false</brackets>
+                <bracketsTypes>false</bracketsTypes>
+                <caseColon>false</caseColon>
+                <operator>
+                    <not>false</not>
+                </operator>
+                <parentheses>
+                    <methodCall>false</methodCall>
+                    <methodDeclaration>false</methodDeclaration>
+                    <statement>true</statement>
+                </parentheses>
+            </before>
+            <padding>
+                <braces>false</braces>
+                <brackets>false</brackets>
+                <operator>
+                    <assignment>true</assignment>
+                    <bitwise>true</bitwise>
+                    <logical>true</logical>
+                    <mathematical>true</mathematical>
+                    <relational>true</relational>
+                    <shift>true</shift>
+                </operator>
+                <parenthesis>false</parenthesis>
+                <typeCast>false</typeCast>
+            </padding>
+        </whitespace>
+        <wrapping>
+            <always>
+                <after>
+                    <arrayElement>0</arrayElement>
+                    <braceRight>false</braceRight>
+                    <extendsTypes>false</extendsTypes>
+                    <implementsTypes>false</implementsTypes>
+                    <label>true</label>
+                    <methodCallChained>false</methodCallChained>
+                    <ternaryOperator>
+                        <first>false</first>
+                        <second>false</second>
+                    </ternaryOperator>
+                    <throwsTypes>false</throwsTypes>
+                </after>
+                <before>
+                    <braceLeft>false</braceLeft>
+                    <extends>false</extends>
+                    <implements>false</implements>
+                    <throws>false</throws>
+                </before>
+                <parameter>
+                    <methodCall>false</methodCall>
+                    <methodCallNested>false</methodCallNested>
+                    <methodDeclaration>false</methodDeclaration>
+                </parameter>
+            </always>
+            <general>
+                <beforeOperator>false</beforeOperator>
+                <enable>false</enable>
+                <lineLength>80</lineLength>
+            </general>
+            <ondemand>
+                <after>
+                    <assignment>false</assignment>
+                    <leftParenthesis>false</leftParenthesis>
+                    <parameter>false</parameter>
+                    <types>
+                        <extends>false</extends>
+                        <implements>false</implements>
+                        <throws>false</throws>
+                    </types>
+                </after>
+                <before>
+                    <rightParenthesis>false</rightParenthesis>
+                </before>
+                <groupingParentheses>false</groupingParentheses>
+            </ondemand>
+        </wrapping>
+    </printer>
+</jalopy>
+

src/etc/xwork-1.0.dtd

+<?xml version="1.0" encoding="UTF-8"?>
+<!ELEMENT xwork (package+,include*)>
+
+<!ELEMENT package (result-types?, interceptors?, default-interceptor-ref?, global-results?, action*)>
+<!ATTLIST package
+    name CDATA #REQUIRED
+    extends CDATA #IMPLIED
+    namespace CDATA #IMPLIED
+    abstract CDATA #IMPLIED
+>
+
+<!ELEMENT result-types (result-type+)>
+
+<!ELEMENT result-type (param*)>
+<!ATTLIST result-type
+    name CDATA #REQUIRED
+    class CDATA #REQUIRED
+    default (true|false) "false"
+>
+
+<!ELEMENT interceptors (interceptor*, interceptor-stack*)>
+
+<!ELEMENT interceptor (param*)>
+<!ATTLIST interceptor
+    name CDATA #REQUIRED
+    class CDATA #REQUIRED
+>
+
+<!ELEMENT interceptor-stack (interceptor-ref+)>
+<!ATTLIST interceptor-stack
+    name CDATA #REQUIRED
+>
+
+<!ELEMENT interceptor-ref (param*)>
+<!ATTLIST interceptor-ref
+    name CDATA #REQUIRED
+>
+
+<!ELEMENT default-interceptor-ref (param*)>
+<!ATTLIST default-interceptor-ref
+    name CDATA #REQUIRED
+>
+
+<!ELEMENT global-results (result+)>
+
+<!ELEMENT action (param*, result*, interceptor-ref*)>
+<!ATTLIST action
+name CDATA #REQUIRED
+    class CDATA #REQUIRED
+    method CDATA #IMPLIED
+    converter CDATA #IMPLIED
+>
+
+<!ELEMENT param (#PCDATA)>
+<!ATTLIST param
+    name CDATA #REQUIRED
+>
+
+<!ELEMENT result (param*)>
+<!ATTLIST result
+    name CDATA #REQUIRED
+    type CDATA #IMPLIED
+>
+
+<!ELEMENT include (#PCDATA)>
+<!ATTLIST include
+    file CDATA #REQUIRED
+>
+
+

src/etc/xwork-validator-1.0.dtd

+<?xml version="1.0" encoding="UTF-8"?>
+<!ELEMENT validators (field*,validator*)>
+
+<!ELEMENT field (field-validator+)>
+<!ATTLIST field
+	name CDATA #REQUIRED
+>
+
+<!ELEMENT field-validator (param*, message)>
+<!ATTLIST field-validator
+	type CDATA #REQUIRED
+>
+
+<!ELEMENT validator (param*, message)>
+<!ATTLIST validator
+	type CDATA #REQUIRED
+>
+
+<!ELEMENT param (#PCDATA)>
+<!ATTLIST param
+    name CDATA #REQUIRED
+>
+
+<!ELEMENT message (#PCDATA)>
+<!ATTLIST message
+    key CDATA #IMPLIED
+>
+
+

src/java/com/opensymphony/xwork/Action.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.xwork;
+
+import java.io.Serializable;
+
+
+/**
+ * All Actions must minimally implement this interface. It provides the
+ * execute methodName, which is done by actions to perform whatever their
+ * purpose is.
+ *
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface Action extends Serializable {
+    //~ Static fields/initializers /////////////////////////////////////////////
+
+    /**
+     * The action execution was successful. Show result
+     * view to the end user.
+     */
+    public static final String SUCCESS = "success";
+
+    /**
+     * The action execution was successful but do not
+     * show a view. This is useful for actions that are
+     * handling the view in another fashion like redirect.
+     */
+    public static final String NONE = "none";
+
+    /**
+     * The action execution was a failure.
+     * Show an error view, possibly asking the
+     * user to retry entering data.
+     */
+    public static final String ERROR = "error";
+
+    /**
+     * The action execution require more input
+     * in order to succeed.
+     * This result is typically used if a form
+     * handling action has been executed so as
+     * to provide defaults for a form. The
+     * form associated with the handler should be
+     * shown to the end user.
+     *
+     * This result is also used if the given input
+     * params are invalid, meaning the user
+     * should try providing input again.
+     */
+    public static final String INPUT = "input";
+
+    /**
+     * The action could not execute, since the
+     * user most was not logged in. The login view
+     * should be shown.
+     */
+    public static final String LOGIN = "login";
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    /**
+     * This methodName is where the logic of the action is executed.
+     * Parameters are passed by calling set-methods, or by implementing
+     * the ParameterAware interface.
+     *
+     * @return     a string representing the logical result of the execution.
+     * See constants in this interface for a list of standard result values.
+     * @exception   java.lang.Exception  thrown if a system level exception occurs.
+     * Application level exceptions should be handled by returning
+     * an error value, such as Action.ERROR.
+     */
+    public String execute() throws Exception;
+}

src/java/com/opensymphony/xwork/ActionChainResult.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.xwork;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.HashMap;
+
+
+/**
+ * A special kind of view that invokes GenericDispatch (using the previously existing
+ * ActionContext) and executes another action. This view takes one required parameter:
+ * <ul>
+ *  <li><b>actionName</b> - the name of the action that will be chained to</li>
+ * </ul>
+ *
+ * @author $Author$
+ * @version $Revision$
+ */
+public class ActionChainResult implements Result {
+    //~ Static fields/initializers /////////////////////////////////////////////
+
+    private static final Log log = LogFactory.getLog(ActionChainResult.class);
+
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    private ActionProxy proxy;
+    private String actionName;
+
+    /**
+     * used to determine which namespace the Action is in that we're chaining
+     * to.  if namespace is null, this defaults to the current namespace.
+     */
+    private String namespace;
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void setActionName(String actionName) {
+        this.actionName = actionName;
+    }
+
+    /**
+     * sets the namespace of the Action that we're chaining to.  if namespace
+     * is null, this defaults to the current namespace.
+     * @param namespace the name of the namespace we're chaining to
+     */
+    public void setNamespace(String namespace) {
+        this.namespace = namespace;
+    }
+
+    public ActionProxy getProxy() {
+        return proxy;
+    }
+
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+
+        if (!(o instanceof ActionChainResult)) {
+            return false;
+        }
+
+        final ActionChainResult actionChainResult = (ActionChainResult) o;
+
+        if ((actionName != null) ? (!actionName.equals(actionChainResult.actionName)) : (actionChainResult.actionName != null)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * @param invocation the DefaultActionInvocation calling the action call stack
+     */
+    public void execute(ActionInvocation invocation) throws Exception {
+        HashMap extraContext = new HashMap();
+        extraContext.put(ActionContext.VALUE_STACK, ActionContext.getContext().getValueStack());
+        extraContext.put(ActionContext.PARAMETERS, ActionContext.getContext().getParameters());
+        extraContext.put("com.opensymphony.xwork.interceptor.component.ComponentManager", ActionContext.getContext().get("com.opensymphony.xwork.interceptor.component.ComponentManager"));
+
+        if (log.isDebugEnabled()) {
+            log.debug("Chaining to action " + actionName);
+        }
+
+        // if the namespace wasn't explicitly defined, assume the current one
+        if (this.namespace == null) {
+            this.namespace = invocation.getProxy().getNamespace();
+        }
+
+        proxy = ActionProxyFactory.getFactory().createActionProxy(this.namespace, actionName, extraContext);
+        proxy.execute();
+    }
+
+    public int hashCode() {
+        return ((actionName != null) ? actionName.hashCode() : 0);
+    }
+}

src/java/com/opensymphony/xwork/ActionContext.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.xwork;
+
+import com.opensymphony.xwork.util.OgnlValueStack;
+
+import java.util.Locale;
+import java.util.Map;
+
+
+/**
+ * @author $Author$
+ * @version $Revision$
+ */
+public class ActionContext {
+    //~ Static fields/initializers /////////////////////////////////////////////
+
+    static ThreadLocal actionContext = new ActionContextThreadLocal();
+    public static final String ACTION_NAME = "com.opensymphony.xwork.ActionContext.name";
+    public static final String VALUE_STACK = OgnlValueStack.VALUE_STACK;
+    public static final String SESSION = "com.opensymphony.xwork.ActionContext.session";
+    public static final String APPLICATION = "com.opensymphony.xwork.ActionContext.application";
+    public static final String PARAMETERS = "com.opensymphony.xwork.ActionContext.parameters";
+    public static final String LOCALE = "com.opensymphony.xwork.ActionContext.locale";
+    public static final String TYPE_CONVERTER = "com.opensymphony.xwork.ActionContext.typeConverter";
+    public static final String ACTION_INVOCATION = "com.opensymphony.xwork.ActionContext.actionInvocation";
+
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    Map context;
+
+    //~ Constructors ///////////////////////////////////////////////////////////
+
+    public ActionContext(Map context) {
+        this.context = context;
+    }
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void setActionInvocation(ActionInvocation actionInvocation) {
+        put(ACTION_INVOCATION, actionInvocation);
+    }
+
+    public ActionInvocation getActionInvocation() {
+        return (ActionInvocation) get(ACTION_INVOCATION);
+    }
+
+    /**
+     * Set an application level Map.
+     */
+    public void setApplication(Map application) {
+        put(APPLICATION, application);
+    }
+
+    /**
+     * Returns a Map of the ServletContext when in a servlet environment or
+     * a generic application level Map otherwise.
+     *
+     * @return Map of ServletContext or generic application level Map
+     */
+    public Map getApplication() {
+        return (Map) get(APPLICATION);
+    }
+
+    public static void setContext(ActionContext aContext) {
+        actionContext.set(aContext);
+    }
+
+    /**
+     * Returns the ActionContext specific to the current thread.
+     *
+     * @return ActionContext for the current thread
+     */
+    public static ActionContext getContext() {
+        ActionContext context = (ActionContext) actionContext.get();
+
+        return context;
+    }
+
+    public void setContextMap(Map lookup) {
+        getContext().context = lookup;
+    }
+
+    public Map getContextMap() {
+        return context;
+    }
+
+    /**
+     * Sets the Locale for the current request
+     * @param locale
+     */
+    public void setLocale(Locale locale) {
+        put(LOCALE, locale);
+    }
+
+    /**
+     * Gets the Locale of the current request
+     * @return Locale
+     */
+    public Locale getLocale() {
+        Locale locale = (Locale) get(LOCALE);
+
+        if (locale == null) {
+            locale = Locale.getDefault();
+            setLocale(locale);
+        }
+
+        return locale;
+    }
+
+    /**
+     * Stores the name of the current Action in the ActionContext.
+     *
+     * @param name The name of the current action.
+     */
+    public void setName(String name) {
+        put(ACTION_NAME, name);
+    }
+
+    /**
+     * Returns the name of the current Action.
+     *
+     * @return The current Action name.
+     */
+    public String getName() {
+        return (String) get(ACTION_NAME);
+    }
+
+    /**
+     * Set a Map of parameters.
+     *
+     * @param parameters The parameters for the current action context.
+     */
+    public void setParameters(Map parameters) {
+        put(PARAMETERS, parameters);
+    }
+
+    /**
+     * Returns a Map of the HttpServletRequest parameters when in a servlet
+     * environment or a generic Map of parameters otherwise.
+     *
+     * @return Map of HttpServletRequest parameters, generic Map of parameters or
+     * multipart Map.
+     */
+    public Map getParameters() {
+        return (Map) get(PARAMETERS);
+    }
+
+    /**
+     * Set a session Map.
+     */
+    public void setSession(Map session) {
+        put(SESSION, session);
+    }
+
+    /**
+     * Returns the HttpSession when in a servlet environment or a generic
+     * session map otherwise.
+     *
+     * @return a map of HttpSession or a generic session map
+     */
+    public Map getSession() {
+        return (Map) get(SESSION);
+    }
+
+    public void setValueStack(OgnlValueStack stack) {
+        put(VALUE_STACK, stack);
+    }
+
+    public OgnlValueStack getValueStack() {
+        return (OgnlValueStack) get(VALUE_STACK);
+    }
+
+    /**
+     * Returns a value that is stored in the current ActionContext
+     * by doing a lookup using the value's key.
+     *
+     * @param key The key used to find the value.
+     * @return The value that was found using the key.
+     */
+    public Object get(Object key) {
+        return context.get(key);
+    }
+
+    /**
+     * Stores a value in the current ActionContext.  The value can
+     * be looked up using the key.
+     *
+     * @param key The key of the value.
+     * @param value The value to be stored.
+     */
+    public void put(Object key, Object value) {
+        context.put(key, value);
+    }
+
+    //~ Inner Classes //////////////////////////////////////////////////////////
+
+    private static class ActionContextThreadLocal extends ThreadLocal {
+        protected Object initialValue() {
+            OgnlValueStack vs = new OgnlValueStack();
+
+            return new ActionContext(vs.getContext());
+        }
+    }
+}

src/java/com/opensymphony/xwork/ActionInvocation.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.xwork;
+
+import com.opensymphony.xwork.util.OgnlValueStack;
+
+
+/**
+ * ActionInvocation
+ * @author Jason Carreira
+ * Created Jun 9, 2003 11:37:27 AM
+ */
+public interface ActionInvocation {
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    Action getAction();
+
+    boolean isExecuted();
+
+    ActionProxy getProxy();
+
+    /**
+     * If the DefaultActionInvocation has been executed before and the Result is an instance of ActionChainResult, this method
+     * will walk down the chain of ActionChainResults until it finds a non-chain result, which will be returned. If the
+     * DefaultActionInvocation's result has not been executed before, the Result instance will be created and populated with
+     * the result params.
+     * @return a Result instance
+     * @throws java.lang.Exception
+     */
+    Result getResult() throws Exception;
+
+    String getResultCode();
+
+    OgnlValueStack getStack();
+
+    String invoke() throws Exception;
+}

src/java/com/opensymphony/xwork/ActionProxy.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.xwork;
+
+import com.opensymphony.xwork.config.entities.ActionConfig;
+import com.opensymphony.xwork.util.OgnlValueStack;
+
+
+/**
+ * ActionProxy
+ * @author Jason Carreira
+ * Created Jun 9, 2003 11:27:55 AM
+ */
+public interface ActionProxy {
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    Action getAction();
+
+    String getActionName();
+
+    ActionConfig getConfig();
+
+    void setExecuteResult(boolean executeResult);
+
+    boolean getExecuteResult();
+
+    ActionInvocation getInvocation();
+
+    ActionContext getLastContext();
+
+    String getNamespace();
+
+    OgnlValueStack getValueStack();
+
+    String execute() throws Exception;
+}

src/java/com/opensymphony/xwork/ActionProxyFactory.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.xwork;
+
+import java.util.Map;
+
+
+/**
+ * ActionProxyFactory
+ * @author Jason Carreira
+ * Created Jun 15, 2003 5:18:30 PM
+ */
+public abstract class ActionProxyFactory {
+    //~ Static fields/initializers /////////////////////////////////////////////
+
+    static ActionProxyFactory factory = new DefaultActionProxyFactory();
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public static void setFactory(ActionProxyFactory factory) {
+        ActionProxyFactory.factory = factory;
+    }
+