Anonymous avatar Anonymous committed 27af05e

Comments (0)

Files changed (375)

docs/wikidocs/3rd Party Integration.html

+<html>
+    <head>
+        <title>WebWork - 
+         Party Integration
+        </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <ol>
+	<li><a href="Sitemesh.html" title="SiteMesh">Sitemesh</a></li>
+	<li><a href="Spring.html" title="Spring">Spring</a></li>
+	<li><a href="Pico.html" title="Pico">Pico</a></li>
+	<li><a href="Hibernate.html" title="Hibernate">Hibernate</a></li>
+	<li><a href="JSTL.html" title="JSTL">JSTL</a></li>
+	<li><a href="JUnit.html" title="JUnit">JUnit</a></li>
+	<li><a href="Quartz.html" title="Quartz">Quartz</a></li>
+	<li><a href="JasperReports.html" title="JasperReports">JasperReports</a></li>
+</ol>
+
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/AJAX Client Side Validation.html

+<html>
+    <head>
+        <title>WebWork - 
+         Client Side Validation
+        </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <p>AJAX-based client side validation improves upon <a href="Pure JavaScript Client Side Validation.html" title="Pure JavaScript Client Side Validation">Pure JavaScript Client Side Validation</a> by using a combination of JavaScript, DOM manipulation, and remote server communication via <a href="http://getahead.ltd.uk/dwr" title="Visit page outside Confluence">DWR</a>. Unlike the pure client side implementation, AJAX-based validation communicates with the server. This means all your validation rules that worked when submitting a form will still work within the browser.</p>
+
+<div class="information-block" align='center'><div class='informationMacroPadding'><table cellpadding='5' width='85%' cellspacing='0' class='noteMacro' border='0'><tr><td width='16' valign='top'><img src="/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This validation mode only works with the <a href="ajax theme.html" title="ajax theme">ajax theme</a></td></tr></table></div></div>
+
+<p>The validation occurs on each <b>onblur</b> event for each form element. As each user types in some values and moves to the next form element, the value (and all other values previously entered) will be sent to the server for validation. The entire validation stack is run, including visitor validators and your action's validate() method.</p>
+
+<p>If there is an error, like the pure implementation, the HTML and DOM will be updated immediately.</p>
+
+<p>For an example of this, see <a href="AJAX Validation.html" title="AJAX Validation">AJAX Validation</a>.</p>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/AJAX Validation.html

+<html>
+    <head>
+        <title>WebWork - 
+         Validation
+        </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <h1><a name="AJAXValidation-Description">Description</a></h1>
+<p>The following is describes how to do simple ajax validation in webwork.</p>
+
+<div class="information-block" align='center'><div class='informationMacroPadding'><table cellpadding='5' width='85%' cellspacing='0' class='noteMacro' border='0'><tr><td width='16' valign='top'><img src="/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This requires DWR servlet being setup, dojo and the ajax theme being used.</td></tr></table></div></div>
+
+<div class="information-block" align='center'><div class='informationMacroPadding'><table cellpadding='5' width='85%' cellspacing='0' class='noteMacro' border='0'><tr><td width='16' valign='top'><img src="/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>In the Ajax theme, dwr is used for normal validation while dojo everything else (widgets, XHR, browser JS events etc.)</td></tr></table></div></div>
+
+<div class="information-block" align='center'><div class='informationMacroPadding'><table cellpadding='5' width='85%' cellspacing='0' class='noteMacro' border='0'><tr><td width='16' valign='top'><img src="/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>In order for validation to function properly it is advised to used standard WebWork Tags.</td></tr></table></div></div>
+
+<h1><a name="AJAXValidation-SetupDWR">Setup DWR</a></h1>
+<p>DWR could be setup by having the following dwr configuration (dwr.xml) at /WEB-INF/ directory. If it needs to be in other places, refer to <a href="http://getahead.ltd.uk/dwr/" title="Visit page outside Confluence">&#104;ttp://getahead.ltd.uk/dwr/</a> for more information.</p>
+<div class="code"><div class="codeContent">
+<pre class="code-xml">&lt;!DOCTYPE dwr PUBLIC 
+	<span class="code-quote">"-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"</span> 
+	<span class="code-quote">"http://www.getahead.ltd.uk/dwr/dwr10.dtd"</span>&gt;
+
+<span class="code-tag">&lt;dwr&gt;</span>
+    <span class="code-tag">&lt;allow&gt;</span>
+        <span class="code-tag">&lt;create creator=<span class="code-quote">"new"</span> javascript=<span class="code-quote">"validator"</span>&gt;</span>
+            <span class="code-tag">&lt;param name=<span class="code-quote">"class"</span> value=<span class="code-quote">"com.opensymphony.webwork.validators.DWRValidator"</span>/&gt;</span>
+        <span class="code-tag">&lt;/create&gt;</span>
+        <span class="code-tag">&lt;convert converter=<span class="code-quote">"bean"</span> match=<span class="code-quote">"com.opensymphony.xwork.ValidationAwareSupport"</span>/&gt;</span>
+    <span class="code-tag">&lt;/allow&gt;</span>
+
+    <span class="code-tag">&lt;signatures&gt;</span>
+        &lt;![CDATA[
+        import java.util.Map;
+        import com.opensymphony.webwork.validators.DWRValidator;
+
+        DWRValidator.doPost(String, String, Map<span class="code-tag">&lt;String, String&gt;</span>);
+        ]]&gt;
+    <span class="code-tag">&lt;/signatures&gt;</span>
+<span class="code-tag">&lt;/dwr&gt;</span></pre>
+</div></div>
+
+<p>A DWRServlet need to be registered with the web application as well. The following shows a typical web.xml with DWRSerlvet.</p>
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;servlet&gt;</span>
+    <span class="code-tag">&lt;servlet-name&gt;</span>dwr<span class="code-tag">&lt;/servlet-name&gt;</span>
+    <span class="code-tag">&lt;servlet-class&gt;</span>uk.ltd.getahead.dwr.DWRServlet<span class="code-tag">&lt;/servlet-class&gt;</span>
+<span class="code-tag">&lt;/servlet&gt;</span>
+
+<span class="code-tag">&lt;servlet-mapping&gt;</span>
+    <span class="code-tag">&lt;servlet-name&gt;</span>dwr<span class="code-tag">&lt;/servlet-name&gt;</span>
+    <span class="code-tag">&lt;url-pattern&gt;</span>/dwr/*<span class="code-tag">&lt;/url-pattern&gt;</span>
+<span class="code-tag">&lt;/servlet-mapping&gt;</span></pre>
+</div></div>
+
+
+<h1><a name="AJAXValidation-Step1">Step 1</a></h1>
+<p>Create the jsp page. Note the &lt;ww:head ...&gt; tag is used to set the theme which will put in necesary dojo sripts etc. See ajax's theme head.ftl for more information.</p>
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;html&gt;</span>
+<span class="code-tag">&lt;head&gt;</span>
+    <span class="code-tag">&lt;title&gt;</span>Validation - Basic<span class="code-tag">&lt;/title&gt;</span>
+    <span class="code-tag">&lt;ww:head theme=<span class="code-quote">"ajax"</span>/&gt;</span>
+<span class="code-tag">&lt;/head&gt;</span>
+
+<span class="code-tag">&lt;body&gt;</span>
+
+<span class="code-tag">&lt;ww:form method=<span class="code-quote">"post"</span> validate=<span class="code-quote">"true"</span> theme=<span class="code-quote">"ajax"</span>&gt;</span>
+    <span class="code-tag">&lt;ww:textfield label=<span class="code-quote">"Name"</span> name=<span class="code-quote">"name"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:textfield label=<span class="code-quote">"Age"</span> name=<span class="code-quote">"age"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:textfield label=<span class="code-quote">"Favorite color"</span> name=<span class="code-quote">"answer"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:submit/&gt;</span>
+<span class="code-tag">&lt;/ww:form&gt;</span>
+
+<span class="code-tag">&lt;/body&gt;</span>
+<span class="code-tag">&lt;/html&gt;</span></pre>
+</div></div>
+
+
+<h1><a name="AJAXValidation-Step2">Step 2</a></h1>
+<p>Create the action class</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">public</span> class QuizAction <span class="code-keyword">extends</span> ActionSupport {
+    <span class="code-object">String</span> name;
+    <span class="code-object">int</span> age;
+    <span class="code-object">String</span> answer;
+
+    <span class="code-keyword">public</span> <span class="code-object">String</span> getName() {
+        <span class="code-keyword">return</span> name;
+    }
+
+    <span class="code-keyword">public</span> void setName(<span class="code-object">String</span> name) {
+        <span class="code-keyword">this</span>.name = name;
+    }
+
+    <span class="code-keyword">public</span> <span class="code-object">int</span> getAge() {
+        <span class="code-keyword">return</span> age;
+    }
+
+    <span class="code-keyword">public</span> void setAge(<span class="code-object">int</span> age) {
+        <span class="code-keyword">this</span>.age = age;
+    }
+
+    <span class="code-keyword">public</span> <span class="code-object">String</span> getAnswer() {
+        <span class="code-keyword">return</span> answer;
+    }
+
+    <span class="code-keyword">public</span> void setAnswer(<span class="code-object">String</span> answer) {
+        <span class="code-keyword">this</span>.answer = answer;
+    }
+}</pre>
+</div></div>
+
+
+<h1><a name="AJAXValidation-Step3">Step 3</a></h1>
+<p>Create the validation.xml</p>
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;validators&gt;</span>
+    <span class="code-tag">&lt;field name=<span class="code-quote">"name"</span>&gt;</span>
+        <span class="code-tag">&lt;field-validator type=<span class="code-quote">"requiredstring"</span>&gt;</span>
+            <span class="code-tag">&lt;message&gt;</span>You must enter a name<span class="code-tag">&lt;/message&gt;</span>
+        <span class="code-tag">&lt;/field-validator&gt;</span>
+    <span class="code-tag">&lt;/field&gt;</span>
+    <span class="code-tag">&lt;field name=<span class="code-quote">"age"</span>&gt;</span>
+        <span class="code-tag">&lt;field-validator type=<span class="code-quote">"int"</span>&gt;</span>
+            <span class="code-tag">&lt;param name=<span class="code-quote">"min"</span>&gt;</span>13<span class="code-tag">&lt;/param&gt;</span>
+            <span class="code-tag">&lt;param name=<span class="code-quote">"max"</span>&gt;</span>19<span class="code-tag">&lt;/param&gt;</span>
+            <span class="code-tag">&lt;message&gt;</span>Only people ages 13 to 19 may take this quiz<span class="code-tag">&lt;/message&gt;</span>
+        <span class="code-tag">&lt;/field-validator&gt;</span>
+    <span class="code-tag">&lt;/field&gt;</span>
+<span class="code-tag">&lt;/validators&gt;</span></pre>
+</div></div>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/Access to Webwork objects from JSP 2.0 EL.html

+<html>
+    <head>
+        <title>WebWork - 
+        Access to Webwork objects from JSP 2.0 EL
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <p>To access Webwork ValueStack from third party JSP taglibs you have to expose property values to JSP.</p>
+
+<p>You can use Webwork2 tag &lt;ww:set/&gt; to set named parameter in a JSP page, request, session or application scope. Following  example, sets a request scoped parameter 'a' to list of integers:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;ww:set name=<span class="code-quote">"'a'"</span> value=<span class="code-quote">"{ 1, 2, 3, 4 }"</span> scope=<span class="code-quote">"request"</span>/&gt;</span></pre>
+</div></div>
+
+<p>After setting parameter, third party JSP taglibs can access variables, or you can use JSP 2.0 EL (Expression Language). This is convenient as short hand EL expression syntax <br/>
+<tt>$<div class="error"><span class="error">Unknown macro: {expression}</span> </div></tt> can be used in a text or inside of tag attributes: </p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml">a[0] = ${a[0]}
+
+<span class="code-tag">&lt;sample:tag value=<span class="code-quote">"${a[1]}"</span>/&gt;</span></pre>
+</div></div>
+
+<p>In practice, you've got to expose a lot of different variables to make effective use of third party taglibs like displaytag or wurfl. This leads to a lot of <tt>&lt;ww:set/&gt;</tt> tags what made me investigate how to make access to ValueStack and OGNL more transparent.</p>
+
+<div class="information-block" align='center'><div class='informationMacroPadding'><table cellpadding='5' width='85%' cellspacing='0' class='noteMacro' border='0'><tr><td width='16' valign='top'><img src="/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">Why can't we just replace EL with OGNL?</b><br />
+<p>Unfortunately, it isn't that simple. I've tinkered with <tt>JSPFactory.setDefault()</tt> to wrap around <tt>getPageContext()</tt> and create <tt>ExpressionEvaluator</tt> that would use OGNL. </p>
+
+<p>This works in practice, but code generated by Jasper2 doesn't call <tt>JSPFactory.getPageContext().getExpressionEvaluator()</tt> but goes directly to static method that is hardwired to jakarta commons-el implementation.</p>
+
+<p>Even if it would work it wouldn't be <em>clean</em> as <tt>JSPFactory.setDefault()</tt> should only be called by JSP implementation.</p></td></tr></table></div></div>
+
+<p>There is a simple, if not elegant, solution available in JSP 2.0 EL, for exposing ValueStack to OGNL. It is possible to create custom functions that can be called from EL expressions. Functions have to be 'public static' and specified in a TLD file. <br/>
+Just import TLD in a JSP file where you've want to use a function. </p>
+
+<p>For example, you could access action properties by evaluating OGNL expression by a function 'vs' (for valuestack) in EL:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;%@ taglib uri=<span class="code-quote">"/WEB-INF/tld/wwel.tld"</span> prefix=<span class="code-quote">"x"</span> %&gt;</span>
+
+a[0] = ${x:vs('a[0]')}
+a[0] * 4 = ${x:vs('a[0] * 4')}
+
+Current action name: ${x:name()}
+Top of ValueStack: ${x:top()}</pre>
+</div></div>
+
+<p>To use this code you've got to add <tt>wwel.tld</tt> and <tt>Functions.java</tt> to your webapp project.</p>
+
+<p>I would urge webworkers to define a set of functions that would be usable to wide community and include this in some future Webwork release.</p>
+
+<div class="code"><div class="codeHeader"><b>wwel.tld</b></div><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span>?&gt;</span>
+&lt;taglib xmlns=<span class="code-quote">"http://java.sun.com/xml/ns/j2ee"</span>
+	<span class="code-keyword">xmlns:xsi</span>=<span class="code-quote">"http://www.w3.org/2001/XMLSchema-instance"</span>
+	xsi:schemaLocation=<span class="code-quote">"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"</span>
+	version=<span class="code-quote">"2.0"</span>&gt;
+
+<span class="code-tag">&lt;description&gt;</span>
+This taglib enables access to WebWork2 ValueStack 
+from JSP 2.0 Expression Language
+<span class="code-tag">&lt;/description&gt;</span>
+
+<span class="code-tag">&lt;tlib-version&gt;</span>1.0<span class="code-tag">&lt;/tlib-version&gt;</span>
+
+<span class="code-tag">&lt;short-name&gt;</span>wwel<span class="code-tag">&lt;/short-name&gt;</span>
+
+<span class="code-tag">&lt;function&gt;</span>
+	<span class="code-tag">&lt;name&gt;</span>vs<span class="code-tag">&lt;/name&gt;</span>
+	<span class="code-tag">&lt;function-class&gt;</span>com.nmote.wwel.Functions<span class="code-tag">&lt;/function-class&gt;</span>
+	<span class="code-tag">&lt;function-signature&gt;</span>
+		java.lang.Object findOnValueStack(java.lang.String)
+	<span class="code-tag">&lt;/function-signature&gt;</span>
+<span class="code-tag">&lt;/function&gt;</span>
+
+<span class="code-tag">&lt;function&gt;</span>
+	<span class="code-tag">&lt;name&gt;</span>name<span class="code-tag">&lt;/name&gt;</span>
+	<span class="code-tag">&lt;function-class&gt;</span>com.nmote.wwel.Functions<span class="code-tag">&lt;/function-class&gt;</span>
+	<span class="code-tag">&lt;function-signature&gt;</span>
+		java.lang.Object getActionName()
+	<span class="code-tag">&lt;/function-signature&gt;</span>
+<span class="code-tag">&lt;/function&gt;</span>
+
+<span class="code-tag">&lt;function&gt;</span>
+	<span class="code-tag">&lt;name&gt;</span>top<span class="code-tag">&lt;/name&gt;</span>
+	<span class="code-tag">&lt;function-class&gt;</span>com.nmote.wwel.Functions<span class="code-tag">&lt;/function-class&gt;</span>
+	<span class="code-tag">&lt;function-signature&gt;</span>
+		java.lang.Object getTopOfValueStack()
+	<span class="code-tag">&lt;/function-signature&gt;</span>
+<span class="code-tag">&lt;/function&gt;</span>
+
+<span class="code-tag">&lt;/taglib&gt;</span></pre>
+</div></div>
+
+<div class="code"><div class="codeHeader"><b>Functions.java</b></div><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">package</span> com.nmote.wwel;
+
+<span class="code-keyword">import</span> com.opensymphony.xwork.ActionContext;
+
+/**
+ * Utility functions <span class="code-keyword">for</span> accessing webwork value stack and action context 
+ * from JSP 2.0 EL taglibs.
+ * 
+ * @author Vjekoslav Nesek (vnesek@nmote.com)
+ */
+<span class="code-keyword">public</span> class Functions {
+
+	<span class="code-keyword">public</span> <span class="code-keyword">static</span> <span class="code-object">Object</span> findOnValueStack(<span class="code-object">String</span> expr) {
+		ActionContext a = ActionContext.getContext();
+		<span class="code-object">Object</span> value = a.getValueStack().findValue(expr);
+		<span class="code-keyword">return</span> value;
+	}
+	
+	<span class="code-keyword">public</span> <span class="code-keyword">static</span> <span class="code-object">Object</span> getTopOfValueStack() {
+		ActionContext a = ActionContext.getContext();
+		<span class="code-object">Object</span> value = a.getValueStack().peek();
+		<span class="code-keyword">return</span> value;
+	}
+
+	<span class="code-keyword">public</span> <span class="code-keyword">static</span> <span class="code-object">Object</span> getActionName() {
+		ActionContext a = ActionContext.getContext();
+		<span class="code-object">Object</span> value = a.getName();
+		<span class="code-keyword">return</span> value;
+	}	
+}</pre>
+</div></div>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/Accessing application, session, request objects.html

+<html>
+    <head>
+        <title>WebWork - 
+        Accessing application, session, request objects
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <p>Webwork provides several access helpers to access Session, Application, Request scopes.<br/>
+Web agnostic (independent of the servlet API) with calls:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">Map session = (Map) ActionContext.getContext().get(<span class="code-quote">"session"</span>);
+session.put(<span class="code-quote">"myId"</span>,myProp);</pre>
+</div></div>
+
+<p>The following gives you the same thing as above:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">ServletActionContext.getRequest().getSession()</pre>
+</div></div>
+
+<p>Note: Be sure not to use ActionContext.getContext() in the constructor of your action since the values may not be set up already (returning null for getSession()).<br/>
+Note also: ActionContext.getContext().get("session") is the same as<br/>
+ActionContext.getContext().getSession() with a cast to Map.</p>
+
+<p>If you really need to get access to the HttpSession, use the ServletConfigInterceptor (see <a href="Interceptors.html" title="Interceptors">Interceptors</a>).</p>
+
+<p>In your views, you can access with your jsps as such</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">&lt;ww: property value=<span class="code-quote">"#session.myId"</span> /&gt;
+
+&lt;ww: property value=<span class="code-quote">"#request.myId"</span> /&gt;</pre>
+</div></div>
+
+<p>All the servlet scopes can be accessed like above.</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">Map request = (Map) ActionContext.getContext().get(<span class="code-quote">"request"</span>);
+request.put(<span class="code-quote">"myId"</span>,myProp);
+Map application = (Map) ActionContext.getContext().get(<span class="code-quote">"application"</span>);
+application.put(<span class="code-quote">"myId"</span>,myProp);
+Map session = (Map) ActionContext.getContext().get(<span class="code-quote">"session"</span>);
+session.put(<span class="code-quote">"myId"</span>, myProp);
+Map attr = (Map) ActionContext.getContext().get(<span class="code-quote">"attr"</span>);
+attr.put(<span class="code-quote">"myId"</span>,myProp);</pre>
+</div></div>
+<p>The 'attr' map will search the javax.servlet.jsp.PageContext for the specified key. If the PageContext dosen't exist, it will search request,session,application maps respectively.</p>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/Action Chaining.html

+<html>
+    <head>
+        <title>WebWork - 
+        Action Chaining
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <h1><a name="ActionChaining-Overview">Overview</a></h1>
+
+<p>WebWork provides the ability to chain multiple actions into a defined sequence or workflow. This feature works by applying a <a href="Chain Result.html" title="Chain Result">Chain Result</a> to a given action, and intercepting its target action's invocation with a <a href="http://www.opensymphony.com/webwork/api/com/opensymphony/xwork/interceptor/ChainingInterceptor.html" title="Visit page outside Confluence">ChainingInterceptor</a>. </p>
+
+<div class="information-block" align='center'><div class='informationMacroPadding'><table cellpadding='5' width='85%' cellspacing='0' class='warningMacro' border='0'><tr><td width='16' valign='top'><img src="/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">Warning</b><br /><br/>
+In general, Action Chaining is not recommended. However, there are other options, such as the <a href="redirect after post.html" title="redirect after post">redirect after post</a> technique.</td></tr></table></div></div>
+
+<h2><a name="ActionChaining-ChainResult">Chain Result</a></h2>
+
+<p>The <a href="Chain Result.html" title="Chain Result">Chain Result</a> is a result type that invokes an action with its own interceptor stack and result. This allows an action to forward requests to a target action, while propagating the state of the source action. Below is an example of how to define this sequence.</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;package name=<span class="code-quote">"public"</span> extends=<span class="code-quote">"webwork-default"</span>&gt;</span>
+    <span class="code-tag"><span class="code-comment">&lt;!-- Chain creatAccount to login, using the default parameter --&gt;</span></span>
+    <span class="code-tag">&lt;action name=<span class="code-quote">"createAccount"</span> class=<span class="code-quote">"..."</span>&gt;</span>
+        <span class="code-tag">&lt;result type=<span class="code-quote">"chain"</span>&gt;</span>login<span class="code-tag">&lt;/result&gt;</span>
+    <span class="code-tag">&lt;/action&gt;</span>
+
+    <span class="code-tag">&lt;action name=<span class="code-quote">"login"</span> class=<span class="code-quote">"..."</span>&gt;</span>
+        <span class="code-tag"><span class="code-comment">&lt;!-- Chain to another namespace --&gt;</span></span>
+        <span class="code-tag">&lt;result type=<span class="code-quote">"chain"</span>&gt;</span>
+            <span class="code-tag">&lt;param name=<span class="code-quote">"actionName"</span>&gt;</span>dashboard<span class="code-tag">&lt;/param&gt;</span>
+            <span class="code-tag">&lt;param name=<span class="code-quote">"namespace"</span>&gt;</span>/secure<span class="code-tag">&lt;/param&gt;</span>
+        <span class="code-tag">&lt;/result&gt;</span>
+    <span class="code-tag">&lt;/action&gt;</span>
+<span class="code-tag">&lt;/package&gt;</span>
+
+<span class="code-tag">&lt;package name=<span class="code-quote">"secure"</span> extends=<span class="code-quote">"webwork-default"</span> namespace=<span class="code-quote">"/secure"</span>&gt;</span>
+    <span class="code-tag">&lt;action name=<span class="code-quote">"dashboard"</span> class=<span class="code-quote">"..."</span>&gt;</span>
+        <span class="code-tag">&lt;result&gt;</span>dashboard.jsp<span class="code-tag">&lt;/result&gt;</span>
+    <span class="code-tag">&lt;/action&gt;</span>
+<span class="code-tag">&lt;/package&gt;</span></pre>
+</div></div>
+
+<p>Another action in the same namespace (or the default "" namespace) can be executed after this action (see <a href="Configuration Files.html" title="Configuration Files">Configuration Files</a>). An optional "namespace" parameter may also be added to specify an action in a different namespace. </p>
+
+
+
+<h2><a name="ActionChaining-ChainingInterceptor">Chaining Interceptor</a></h2>
+
+<p>If you need to copy the properties from your previous Actions in the chain to the current action, you should apply the <a href="http://www.opensymphony.com/webwork/api/com/opensymphony/xwork/interceptor/ChainingInterceptor.html" title="Visit page outside Confluence">ChainingInterceptor</a>. The interceptor will copy the original parameters from the request, and the ValueStack is passed in to the target action. The source action is remembered by the ValueStack, allowing the target action to access the properties of the preceding action(s) using the ValueStack, and also makes these properties available to the final result of the chain, such as the JSP or Velocity page. </p>
+
+<p>One common use of action chaining is to provide lookup lists (like for a dropdown list of states, etc). Since these actions get put on the ValueStack, these properties will be available in the view. This functionality can also be done using the ActionTag to execute an action from the display page. You may also use the <a href="Redirect Action Result.html" title="Redirect Action Result">Redirect Action Result</a> to accomplish this.</p>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/Action Configuration.html

+<html>
+    <head>
+        <title>WebWork - 
+        Action configuration
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <h1><a name="Actionconfiguration-Description">Description</a></h1>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;action name=<span class="code-quote">"formTest"</span> class=<span class="code-quote">"com.opensymphony.webwork.example.FormAction"</span> method=<span class="code-quote">"processForm"</span>&gt;</span></pre>
+</div></div>
+
+<p>Actions are the basic "unit-of-work" in WebWork, they define, well, actions. An action will usually be a request, (and usually a button click, or form submit). The main action element (tag is too synonymous with JSP) has two parts, the friendly name (referenced in the URL, i.e. saveForm.action) and the corresponding "handler" class.</p>
+
+<p>The optional "<b>method</b>" parameter tells WebWork which method to call based upon this action. If you leave the method parameter blank, WebWork will call the method <b>execute()</b> by default. If there is no execute() method and no method specified in the xml file, WebWork will throw an exception.   </p>
+
+<p>Also, you can tell WebWork to invoke "<b>doSomething</b>"  method in your action by using the pattern "<b>actionName!something</b>" in your form.  For example, "<b>formTest!save.action</b>" will invoke the method "<b>save</b>" in FormAction class.  The method must be public and take no arguments:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">public</span> <span class="code-object">String</span> save() <span class="code-keyword">throws</span> Exception
+  {
+      ...
+      <span class="code-keyword">return</span> SUCCESS;
+  }</pre>
+</div></div>
+
+<p>All the configuration for "<b>actionName</b>" will be used for "actionName!something" (interceptors, result types, etc...)</p>
+
+<p>Most of the content here provided by Matt Dowell &lt;matt.dowell@notiva.com&gt;</p>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/ActionMapper.html

+<html>
+    <head>
+        <title>WebWork - 
+        ActionMapper
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <h1><a name="ActionMapper-ActionMapper">ActionMapper</a></h1>
+
+<p> The ActionMapper is responsible for providing a mapping between HTTP requests and action invocation requests and
+ vice-versa. When given an HttpServletRequest, the ActionMapper may return null if no action invocation request maps,
+ or it may return an ActionMapping that describes an action invocation that WebWork should attempt to try. The
+ ActionMapper is not required to guarantee that the ActionMapping returned be a real action or otherwise
+ ensure a valid request. This means that most ActionMappers do not need to consult WebWork's configuration to
+ determine if a request should be mapped.</p>
+
+<p> <p/> Just as requests can be mapped from HTTP to an action invocation, the opposite is true as well. However, because
+ HTTP requests (when shown in HTTP responses) must be in String form, a String is returned rather than an actual
+ request object.</p>
+
+
+
+<h2><a name="ActionMapper-DefaultActionMapper">DefaultActionMapper</a></h2>
+<p>By default, the DefaultActionMapper is used:</p>
+
+
+<p> Default action mapper implementation, using the standard *.[ext] (where ext usually "action") pattern. The extension
+ is looked up from the WebWork configuration key <b>webwork.action.exection</b>.</p>
+
+<p> <p/> To help with dealing with buttons and other related requirements, this mapper (and other ActionMappers,
+ we hope) has the ability to name a button with some predefined prefix and have that button name alter the execution
+ behaviour. The four prefixes are:</p>
+
+<p> <ul></p>
+
+<p> <li>Method prefix - <i>method:default</i></li></p>
+
+<p> <li>Action prefix - <i>action:dashboard</i></li></p>
+
+<p> <li>Redirect prefix - <i>redirect:cancel.jsp</i></li></p>
+
+<p> <li>Redirect-action prefix - <i>redirect-action:cancel</i></li></p>
+
+<p> </ul></p>
+
+<p> <p/> In addition to these four prefixes, this mapper also understands the action naming pattern of <i>foo!bar</i> in
+ either the extension form (eg: foo!bar.action) or in the prefix form (eg: action:foo!bar). This syntax tells this mapper
+ to map to the action named <i>foo</i> and the method <i>bar</i>.</p>
+
+
+<h3><a name="ActionMapper-Methodprefix">Method prefix</a></h3>
+
+<p> With method-prefix, instead of calling baz action's execute() method (by default if it isn't overriden in xwork.xml
+ to be something else), the baz action's anotherMethod() will be called. A very elegant way determine which button is
+ clicked. Alternatively, one would have submit button set a particular value on the action when clicked, and the
+ execute() method decides on what to do with the setted value depending on which button is clicked.</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;ww:form name=<span class="code-quote">"baz"</span>&gt;</span>
+    <span class="code-tag">&lt;ww:textfield label=<span class="code-quote">"Enter your name"</span> name=<span class="code-quote">"person.name"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:submit value=<span class="code-quote">"Create person"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:submit name=<span class="code-quote">"method:anotherMethod"</span> value=<span class="code-quote">"Cancel"</span>/&gt;</span>
+<span class="code-tag">&lt;/ww:form&gt;</span></pre>
+</div></div>
+
+<h3><a name="ActionMapper-Actionprefix">Action prefix</a></h3>
+
+<p> With action-prefix, instead of executing baz action's execute() method (by default if it isn't overriden in xwork.xml
+ to be something else), the anotherAction action's execute() method (assuming again if it isn't overriden with
+ something else in xwork.xml) will be executed.</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;ww:form name=<span class="code-quote">"baz"</span>&gt;</span>
+    <span class="code-tag">&lt;ww:textfield label=<span class="code-quote">"Enter your name"</span> name=<span class="code-quote">"person.name"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:submit value=<span class="code-quote">"Create person"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:submit name=<span class="code-quote">"action:anotherAction"</span> value=<span class="code-quote">"Cancel"</span>/&gt;</span>
+<span class="code-tag">&lt;/ww:form&gt;</span></pre>
+</div></div>
+
+<h3><a name="ActionMapper-Redirectprefix">Redirect prefix</a></h3>
+
+<p> With redirect-prefix, instead of executing baz action's execute() method (by default it isn't overriden in xwork.xml
+ to be something else), it will get redirected to, in this case to www.google.com. Internally it uses
+ ServletRedirectResult to do the task.</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;ww:form name=<span class="code-quote">"baz"</span>&gt;</span>
+    <span class="code-tag">&lt;ww:textfield label=<span class="code-quote">"Enter your name"</span> name=<span class="code-quote">"person.name"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:submit value=<span class="code-quote">"Create person"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:submit name=<span class="code-quote">"redirect:www.google.com"</span> value=<span class="code-quote">"Cancel"</span>/&gt;</span>
+<span class="code-tag">&lt;/ww:form&gt;</span></pre>
+</div></div>
+
+<h3><a name="ActionMapper-Redirectactionprefix">Redirect-action prefix</a></h3>
+
+<p> With redirect-action-prefix, instead of executing baz action's execute() method (by default it isn't overriden in
+ xwork.xml to be something else), it will get redirected to, in this case 'dashboard.action'. Internally it uses
+ ServletRedirectResult to do the task and read off the extension from the webwork.properties.</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;ww:form name=<span class="code-quote">"baz"</span>&gt;</span>
+    <span class="code-tag">&lt;ww:textfield label=<span class="code-quote">"Enter your name"</span> name=<span class="code-quote">"person.name"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:submit value=<span class="code-quote">"Create person"</span>/&gt;</span>
+    <span class="code-tag">&lt;ww:submit name=<span class="code-quote">"redirect-action:dashboard"</span> value=<span class="code-quote">"Cancel"</span>/&gt;</span>
+<span class="code-tag">&lt;/ww:form&gt;</span></pre>
+</div></div>
+
+<h1><a name="ActionMapper-ActionMapperFactory">ActionMapperFactory</a></h1>
+<p>You can define your own ActionMapper by configuring the ActionMapperFactory:</p>
+
+
+<p> Factory that creates ActionMappers. This factory looks up the class name of the ActionMapper from
+ WebWork's configuration using the key <b>webwork.mapper.class</b>.</p>
+
+
+<p>Possible uses of the ActionMapper include defining your own, cleaner namespaces, such as URLs like <b>/person/1</b>, which would be similar to a request to <b>/getPerson.action?personID=1</b> using the DefaultActionMapper.</p>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/AdminApp.html

+<html>
+    <head>
+        <title>WebWork - 
+        AdminApp
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <p>TODO: Documenting updated version (currently at <a href="http://www.i-tao.com/adminapp.html" title="Visit page outside Confluence">&#104;ttp://www.i-tao.com/adminapp.html</a>). IN PROGRESS.</p>
+
+<h2><a name="AdminApp-Introduction">Introduction</a></h2>
+<p>This page aims at providing some additional information about the <a href="http://www.hibernate.org" title="Visit page outside Confluence">Hibernate</a> <a href="http://www.hibernate.org/159.html#a5" title="Visit page outside Confluence">AdminApp</a>. The Hibernate AdminApp (hereafter referred to as AA) was created by the Hibernate developers to show a possible implementation strategy for Hibernate with Webwork. Although AA can still be used as a starting point for webapplications, most of its libraries become quite aged (WW 2.0 beta, Hibernate 2, XWork 1.0 beta). Therefore, a shiny <a href="http://www.i-tao.com/adminapp.html" title="Visit page outside Confluence">new fork</a> (AA2) has been created by Ron Chan.</p>
+
+<p>AA2 relies on WW2.2, Hibernate 3.1, and Spring as its IoC container (rather than XWork's, which has been deprecated in WW 2.2). We'll first discuss the original AA. Later on, we'll show the differences with AA2. Ron, if you're reading this, feel free to point out any mistakes/edit this document.</p>
+
+<p>Like we pointed out before, AA shows a possible implementation strategy to use Hibernate in WebWork in combination with a so-called open-session-in-view pattern (<a href="http://www.hibernate.org/43.html" title="Visit page outside Confluence">more info</a>, <a href="http://www.jroller.com/page/cardsharp?entry=open_session_in_view_pattern" title="Visit page outside Confluence">even more</a>). This pattern allows maximum flexibility in our view layer by creating a Hibernate Session object that will live till the end of the request (after the view has been rendered). This allows lazy loading of objects in our view, rather than having to preload all objects and their associations in our business layer, and yet ensures the correct disposing of the Session object.</p>
+
+<p>To accomplish this, AA uses XWork's <a href="Inversion of Control.html" title="Inversion of Control">components</a> and <a href="Interceptors.html" title="Interceptors">interceptors</a>:</p>
+
+<ul>
+	<li><a href="Inversion of Control.html" title="Inversion of Control">components</a>: XWork manages the lifecycle of objects in several scopes (application, session, request) and takes care of the IoC through the ..Aware interfaces (so called enablers). Hibernate's expensive-to-create SessionFactory will thus be created in the application scope (meaning it will only be initialised once when the application starts up), while the Session objects, used to load our models, is registered in the request scope (will be created once per request).</li>
+</ul>
+
+
+<ul>
+	<li><a href="Interceptors.html" title="Interceptors">interceptors</a>: AA uses an interceptor (the HibernateInterceptor) to extract the Session from the WebWork action, so it can control the transactions, redirect/rollback on errors and properly dispose the Session after the view is rendered.</li>
+</ul>
+
+
+<h2><a name="AdminApp-AdminAppSourceOverview">AdminApp Source Overview</a></h2>
+
+<p>Now, let's properly dissect the AA files:</p>
+<ul>
+	<li>/lib: contains the various jars for our application. Nothing special here.</li>
+	<li>/src/java/org/hibernate/admin/action: lists our WebWork actions. All actions extend an abstract AbstractAction file, which overrides the execute() method from our XWork's ActionSupport. This is where we define a setHibernateSession() method, which is the method we declared in our enabler interface (HibernateSessionAware). This will notify XWork to invoke its IoC magic to set the HibernateSession.</li>
+</ul>
+
+
+<div class="code"><div class="codeHeader"><b>org.hibernate.admin.action.AbstractAction</b></div><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">public</span> <span class="code-object">String</span> execute() <span class="code-keyword">throws</span> Exception {
+	
+		<span class="code-comment">// We go to INPUT on field and data errors
+</span>		<span class="code-keyword">if</span> ( hasErrors() ) {
+			LOG.debug(<span class="code-quote">"action not executed, field or action errors"</span>);
+			LOG.debug( <span class="code-quote">"Field errors: "</span> + getFieldErrors() );
+			LOG.debug( <span class="code-quote">"Action errors: "</span> + getActionErrors() );
+			<span class="code-keyword">return</span> INPUT;
+		}
+
+		LOG.debug(<span class="code-quote">"executing action"</span>);
+		<span class="code-keyword">return</span> go();
+	}
+	
+	<span class="code-keyword">protected</span> <span class="code-keyword">abstract</span> <span class="code-object">String</span> go() <span class="code-keyword">throws</span> HibernateException;
+
+	<span class="code-keyword">public</span> void setHibernateSession(HibernateSession session) {
+		<span class="code-keyword">this</span>.session = session;
+	}
+
+	<span class="code-keyword">protected</span> Session getSession() <span class="code-keyword">throws</span> HibernateException {
+		<span class="code-keyword">return</span> session.getSession();
+	}</pre>
+</div></div>
+<p>In this execute() method we'll simply call a abstract go() method (which is then defined in each of the actions). When we need the Hibernate Session, we use the getSession() method, inherited from our AbstractAction. Don't worry about transactions or saving so called dirty objects (our HibernateInterceptor takes care of all that). As you can see, this totally minimizes the LoC (lines of code) needed to retrieve or manipulated our models).</p>
+<div class="code"><div class="codeHeader"><b>org.hibernate.admin.action.EditUserAction</b></div><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">public</span> class EditUserAction <span class="code-keyword">extends</span> AbstractAction {
+	<span class="code-comment">//.. ommited <span class="code-keyword">for</span> brevity
+</span>	
+	<span class="code-keyword">protected</span> <span class="code-object">String</span> go() <span class="code-keyword">throws</span> HibernateException {
+		..
+		getSession().update(user);
+		..
+		<span class="code-keyword">return</span> SUCCESS;
+	}
+	
+	<span class="code-comment">//.. getters and setters ommited
+</span>
+}</pre>
+</div></div>
+
+<p>There are 3 more *-validation.xml files in this directory containing the validation logic for the Actions. XWork will validate your request before the action gets executed, so you can decouple your (simple) validation logic from your Action. For example, take a look at the CreateUserAction-validation.xml:</p>
+
+<div class="code"><div class="codeHeader"><b>CreateUserAction-validation.xml</b></div><div class="codeContent">
+<pre class="code-xml">..
+    <span class="code-tag">&lt;field name=<span class="code-quote">"user.name.lastName"</span>&gt;</span>
+        <span class="code-tag">&lt;field-validator type=<span class="code-quote">"requiredstring"</span>&gt;</span>
+            <span class="code-tag">&lt;message&gt;</span>You must enter a last name.<span class="code-tag">&lt;/message&gt;</span>
+        <span class="code-tag">&lt;/field-validator&gt;</span>
+    <span class="code-tag">&lt;/field&gt;</span>
+    <span class="code-tag">&lt;field name=<span class="code-quote">"user.email"</span>&gt;</span>
+        <span class="code-tag">&lt;field-validator type=<span class="code-quote">"email"</span>&gt;</span>
+            <span class="code-tag">&lt;message&gt;</span>Please correct the e-mail address.<span class="code-tag">&lt;/message&gt;</span>
+        <span class="code-tag">&lt;/field-validator&gt;</span>
+        <span class="code-tag">&lt;field-validator type=<span class="code-quote">"required"</span>&gt;</span>
+            <span class="code-tag">&lt;message&gt;</span>Please enter an e-mail address.<span class="code-tag">&lt;/message&gt;</span>
+        <span class="code-tag">&lt;/field-validator&gt;</span>
+    <span class="code-tag">&lt;/field&gt;</span>
+..</pre>
+</div></div>
+
+<p><a href="Validation.html" title="Validation">Several validator types</a> are available. Here we rely on XWork to validate our Actions, but it's also possible to validate our object Models (see <a href="Validation.html" title="Validation">WW Validation</a>). You will mostly use these to validate submitted forms in your webapp. </p>
+
+<p>When a validator fails, you will automatically be returned to the input page with a clear indication which field failed to validate if: </p>
+
+<p>a) actually provided an input type in your <a href="xwork.xml.html" title="xwork.xml">xwork.xml</a> file</p>
+<div class="code"><div class="codeHeader"><b>xwork.xml</b></div><div class="codeContent">
+<pre class="code-xml">..
+        <span class="code-tag">&lt;result name=<span class="code-quote">"input"</span> type=<span class="code-quote">"dispatcher"</span>&gt;</span>
+		<span class="code-tag">&lt;param name=<span class="code-quote">"location"</span>&gt;</span>/editUser.jsp<span class="code-tag">&lt;/param&gt;</span>
+	<span class="code-tag">&lt;/result&gt;</span>
+	..</pre>
+</div></div>
+<p>b) you enabled the validation interceptor in your <a href="xwork.xml.html" title="xwork.xml">xwork.xml</a></p>
+<div class="code"><div class="codeHeader"><b>xwork.xml</b></div><div class="codeContent">
+<pre class="code-xml">..
+	<span class="code-tag">&lt;interceptor-ref name=<span class="code-quote">"defaultStack"</span>/&gt;</span>
+	<span class="code-tag">&lt;interceptor-ref name=<span class="code-quote">"validation"</span>/&gt;</span>
+	..</pre>
+</div></div>
+<p>c) you use the WebWork tag library (warning: this is the old syntax):</p>
+<div class="code"><div class="codeHeader"><b>CreateUser.jsp</b></div><div class="codeContent">
+<pre class="code-xml">..
+<span class="code-tag">&lt;ww:form name=<span class="code-quote">"'createUserForm'"</span> action=<span class="code-quote">"'createUser.action'"</span> method=<span class="code-quote">"'POST'"</span>&gt;</span>
+    <span class="code-tag">&lt;ww:textfield label=<span class="code-quote">"'Username'"</span> name=<span class="code-quote">"'user.handle'"</span>/&gt;</span>
+..</pre>
+</div></div>
+
+<p>New syntax (since 2.2):</p>
+
+<div class="code"><div class="codeHeader"><b>CreateUser.jsp</b></div><div class="codeContent">
+<pre class="code-xml">..
+<span class="code-tag">&lt;ww:form name=<span class="code-quote">"createUserForm"</span> action=<span class="code-quote">"createUser"</span> method=<span class="code-quote">"POST"</span>&gt;</span>
+    <span class="code-tag">&lt;ww:textfield label=<span class="code-quote">"Username"</span> name=<span class="code-quote">"user.handle"</span>/&gt;</span>
+..</pre>
+</div></div>
+
+<ul>
+	<li>/src/java/org/hibernate/admin/component: contains the components and enablers for both the HibernateSessionFactory and the HibernateSession. These components are declared in the /src/java/<a href="Inversion of Control.html" title="Inversion of Control">components.xml</a> file (which will be copied to the root of your compiled classes afterwards):</li>
+</ul>
+
+
+<div class="code"><div class="codeHeader"><b>components.xml</b></div><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;components&gt;</span>
+
+    <span class="code-tag">&lt;component&gt;</span>
+        <span class="code-tag">&lt;scope&gt;</span>request<span class="code-tag">&lt;/scope&gt;</span>
+        <span class="code-tag">&lt;class&gt;</span>org.hibernate.admin.component.HibernateSession<span class="code-tag">&lt;/class&gt;</span>
+        <span class="code-tag">&lt;enabler&gt;</span>org.hibernate.admin.component.HibernateSessionAware<span class="code-tag">&lt;/enabler&gt;</span>
+    <span class="code-tag">&lt;/component&gt;</span>
+
+    <span class="code-tag">&lt;component&gt;</span>
+        <span class="code-tag">&lt;scope&gt;</span>application<span class="code-tag">&lt;/scope&gt;</span>
+        <span class="code-tag">&lt;class&gt;</span>org.hibernate.admin.component.HibernateSessionFactory<span class="code-tag">&lt;/class&gt;</span>
+        <span class="code-tag">&lt;enabler&gt;</span>org.hibernate.admin.component.HibernateSessionFactoryAware<span class="code-tag">&lt;/enabler&gt;</span>
+    <span class="code-tag">&lt;/component&gt;</span>
+
+<span class="code-tag">&lt;/components&gt;</span></pre>
+</div></div>
+
+<ul>
+	<li>/src/java/org/hibernate/admin/interceptor: contains the Hibernate interceptor. <a href="Interceptors.html" title="Interceptors">Interceptors</a> are an incredibly powerful feature of WebWork - it allows you to control invocations before and after they excute, manipulate their results, or, as in our case, extract the HibernateSession object and dispose it after the Action has been executed (and the view rendered). Because we use a try/catch/finally block, we're able to catch exceptions and yet make sure our Session gets closed properly (the number one cause of db connection leaks).</li>
+</ul>
+
+
+<div class="code"><div class="codeHeader"><b>org.hibernate.admin.interceptor.HibernateInterceptor</b></div><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">public</span> <span class="code-object">String</span> intercept(ActionInvocation invocation) <span class="code-keyword">throws</span> Exception {
+		Action action = invocation.getAction();
+		<span class="code-keyword">if</span> ( !(action <span class="code-keyword">instanceof</span> AbstractAction) ) <span class="code-keyword">return</span> invocation.invoke();
+		
+		HibernateSession hs = ( (AbstractAction) action ).getHibernateSession();
+		<span class="code-keyword">try</span> {
+			<span class="code-keyword">return</span> invocation.invoke();
+		}
+		
+		<span class="code-comment">// Note that all the cleanup is done
+</span>		<span class="code-comment">// after the view is rendered, so we
+</span>		<span class="code-comment">// have an open session in the view
+</span>		
+		<span class="code-keyword">catch</span> (Exception e) {	
+			hs.setRollBackOnly(<span class="code-keyword">true</span>);
+			<span class="code-keyword">if</span> (e <span class="code-keyword">instanceof</span> HibernateException) {
+				LOG.error(<span class="code-quote">"HibernateException in execute()"</span>, e);
+				<span class="code-keyword">return</span> Action.ERROR;
+			}
+			<span class="code-keyword">else</span> {
+				LOG.error(<span class="code-quote">"Exception in execute()"</span>, e);
+				<span class="code-keyword">throw</span> e;
+			}
+		}
+		
+		<span class="code-keyword">finally</span> {
+			<span class="code-keyword">try</span> {
+				hs.disposeSession();
+			}
+			<span class="code-keyword">catch</span> (HibernateException e) {
+				LOG.error(<span class="code-quote">"HibernateException in dispose()"</span>, e);
+				<span class="code-keyword">return</span> Action.ERROR;
+			}
+		}
+	}</pre>
+</div></div>
+
+
+<h2><a name="AdminApp-Conclusion">Conclusion</a></h2>
+<p>In this document, we tried to point out several key features in the Hibernate AdminApp. In part II, we'll have a look at the new AdminApp, which is far more up to date, and uses Spring as its IoC container. No more implements ActionSupport or Aware interfaces, resulting in even cleaner code.</p>
+
+<p>AdminApp is a very good example of how a webapp can be structered, using as many advantages from the various frameworks as possible.</p>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/After Annotation.html

+<html>
+    <head>
+        <title>WebWork - 
+        After Annotation
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <h1><a name="AfterAnnotation-AfterAnnotation">After Annotation</a></h1>
+
+<p>Marks a action method that needs to be called after the main action method and the result was
+executed. Return value is ignored.</p>
+
+<h2><a name="AfterAnnotation-Usage">Usage</a></h2>
+
+<p> The After annotation can be applied at method level.</p>
+
+
+<h2><a name="AfterAnnotation-Parameters">Parameters</a></h2>
+
+
+<p> no parameters</p>
+
+
+<h2><a name="AfterAnnotation-Examples">Examples</a></h2>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">public</span> class SampleAction <span class="code-keyword">extends</span> ActionSupport {
+
+ @After
+ <span class="code-keyword">public</span> void isValid() <span class="code-keyword">throws</span> ValidationException {
+   <span class="code-comment">// validate model object, <span class="code-keyword">throw</span> exception <span class="code-keyword">if</span> failed
+</span> }
+
+ <span class="code-keyword">public</span> <span class="code-object">String</span> execute() {
+    <span class="code-comment">// perform action
+</span>    <span class="code-keyword">return</span> SUCCESS;
+ }
+}</pre>
+</div></div>
+
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/Alias Interceptor.html

+<html>
+    <head>
+        <title>WebWork - 
+        Alias Interceptor
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    
+<p> The aim of this Interceptor is to alias a named parameter to a different named parameter. By acting as the glue
+ between actions sharing similiar parameters (but with different names), it can help greatly with action chaining.</p>
+
+<p> <p/>  Action's alias expressions should be in the form of  #{ "name1" : "alias1", "name2" : "alias2" }. This means
+ that assuming an action (or something else in the stack) has a value for the expression named <i>name1</i> and the
+ action this interceptor is applied to has a setter named <i>alias1</i>, <i>alias1</i> will be set with the value from
+ <i>name1</i>.</p>
+
+
+<h1><a name="AliasInterceptor-Parameters">Parameters</a></h1>
+
+
+<p> <ul></p>
+
+<p> <li>aliasesKey (optional) - the name of the action parameter to look for the alias map (by default this is
+ <i>aliases</i>).</li></p>
+
+<p> </ul></p>
+
+
+<h1><a name="AliasInterceptor-ExtendingtheInterceptor">Extending the Interceptor</a></h1>
+
+
+<p> This interceptor does not have any known extension points.</p>
+
+
+<h1><a name="AliasInterceptor-Examples">Examples</a></h1>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;action name=<span class="code-quote">"someAction"</span> class=<span class="code-quote">"com.examples.SomeAction"</span>&gt;</span>
+    <span class="code-tag"><span class="code-comment">&lt;!-- The value for the foo parameter will be applied as if it were named bar --&gt;</span></span>
+    <span class="code-tag">&lt;param name=<span class="code-quote">"aliases"</span>&gt;</span>#{ 'foo' : 'bar' }<span class="code-tag">&lt;/param&gt;</span>
+
+    <span class="code-tag"><span class="code-comment">&lt;!-- note: the alias interceptor is included with the defaultStack in webwork-default.xml --&gt;</span></span>
+    <span class="code-tag">&lt;interceptor-ref name=<span class="code-quote">"alias"</span>/&gt;</span>
+    <span class="code-tag">&lt;interceptor-ref name=<span class="code-quote">"basicStack"</span>/&gt;</span>
+    <span class="code-tag">&lt;result name=<span class="code-quote">"success"</span>&gt;</span>good_result.ftl<span class="code-tag">&lt;/result&gt;</span>
+<span class="code-tag">&lt;/action&gt;</span></pre>
+</div></div>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/Alt Syntax.html

+<html>
+    <head>
+        <title>WebWork - 
+         Syntax
+        </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <p>The <em>altSyntax</em> is an option that can be defined in <a href="webwork.properties.html" title="webwork.properties">webwork.properties</a>. By default it is set to true and it is <b>strongly</b> recommend you do not change that unless you are upgrading from WebWork 2.1.7 or previous versions.</p>
+
+<div class="information-block" align='center'><div class='informationMacroPadding'><table cellpadding='5' width='85%' cellspacing='0' class='tipMacro' border='0'><tr><td width='16' valign='top'><img src="/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">Migration tip</b><br />You can also turn on the altSyntax on a per-page basis by using the <a href="set.html" title="set">set</a> tag. Simply set the name <em>useAltSyntax</em> to the value <em>true</em>. From this point on, all tags will use the altSyntax for the rest of the request.</td></tr></table></div></div>
+
+<p>The altSyntax changes the behavior of how tags are interpreted. Instead of evaluating each tag parameter against the value stack and needing single quotes to mark string literals, only marked expressions are evaluated.</p>
+
+<p>Example:</p>
+
+<p>the following code uses the <a href="Tag Syntax.html" title="Tag Syntax">Tag Syntax</a>:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">&lt;ww:iterator value=<span class="code-quote">"cart.items"</span>&gt;
+   ...
+   &lt;ww:textfield label=<span class="code-quote">"'Cart item No.' + #rowstatus.index + ' note'"</span> 
+                 name=<span class="code-quote">"'cart.items[' + #rowstatus.index + '].note'"</span> 
+                 value=<span class="code-quote">"note"</span> /&gt;
+&lt;/ww:iterator&gt;</pre>
+</div></div>
+
+<p>this is somewhat counter intuitive to normal HTML tag behaviour, and you get loads of single quotes. Now the same example in altSyntax:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">&lt;ww:iterator value=<span class="code-quote">"cart.items"</span>&gt;
+   ...
+   &lt;ww:textfield label=<span class="code-quote">"Cart item No. %{#rowstatus.index} note"</span> 
+                 name=<span class="code-quote">"cart.items[%{#rowstatus.index}].note"</span> 
+                 value=<span class="code-quote">"%{note}"</span> /&gt;
+&lt;/ww:iterator&gt;</pre>
+</div></div>
+
+<p>Only expressions enclosed with %{} are evaluated. The code is shorter and clearer, very similar to JSTL EL usage. Quoting problems, eg. with javascript function calls, are avoided.</p>
+
+<p>In order to fully understand why this option exists and what the differences are, it is best to get a bit of history about WebWork.</p>
+
+<div class="information-block" align='center'><div class='informationMacroPadding'><table cellpadding='5' width='85%' cellspacing='0' class='noteMacro' border='0'><tr><td width='16' valign='top'><img src="/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>If you are <em>not</em> upgrading from WebWork 2.1.7 or previous versions and you don't care about the history of WebWork's evolution, you can skip this section. See the <a href="Tag Syntax.html" title="Tag Syntax">Tag Syntax</a> section for more information on the standard tag syntax support</td></tr></table></div></div>
+
+<h1><a name="AltSyntax-History">History</a></h1>
+
+<p>In WebWork 2.1.4, the altSyntax option was introduced. The book, WebWork in Action, while based around WebWork 2.1.7, was entirely written with the assumption that the altSyntax was enabled. As of WebWork 2.2, the altSyntax is turned on by default and eventually the old syntax will no longer be supported and will be removed from the code.</p>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/AnnotationWorkflowInterceptor.html

+<html>
+    <head>
+        <title>WebWork - 
+        AnnotationWorkflowInterceptor
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <h1><a name="AnnotationWorkflowInterceptor-AnnotationWorkflowInterceptorInterceptor">AnnotationWorkflowInterceptor Interceptor</a></h1>
+
+<p><p>Invokes any annotated methods on the action. Specifically, it supports the following
+annotations:
+<ul>
+<li> &#64;Before - will be invoked before the action method. If the returned value is not null, it is
+returned as the action result code</li>
+<li> &#64;BeforeResult - will be invoked after the action method but before the result execution</li>
+<li> &#64;After - will be invoked after the action method and result execution</li>
+</ul>
+</p>
+<p/>
+<p>There can be multiple methods marked with the same annotations, but the order of their execution
+is not guaranteed. However, the annotated methods on the superclass chain are guaranteed to be invoked before the
+annotated method in the current class in the case of a Before annotations and after, if the annotations is
+After.</p></p>
+
+<h2><a name="AnnotationWorkflowInterceptor-Examples">Examples</a></h2>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">public</span> class BaseAnnotatedAction {
+ 	<span class="code-keyword">protected</span> <span class="code-object">String</span> log = "";
+
+ 	@Before
+ 	<span class="code-keyword">public</span> <span class="code-object">String</span> baseBefore() {
+ 		log = log + <span class="code-quote">"baseBefore-"</span>;
+ 		<span class="code-keyword">return</span> <span class="code-keyword">null</span>;
+ 	}
+ }
+
+ <span class="code-keyword">public</span> class AnnotatedAction <span class="code-keyword">extends</span> BaseAnnotatedAction {
+ 	@Before
+ 	<span class="code-keyword">public</span> <span class="code-object">String</span> before() {
+ 		log = log + <span class="code-quote">"before"</span>;
+ 		<span class="code-keyword">return</span> <span class="code-keyword">null</span>;
+ 	}
+
+ 	<span class="code-keyword">public</span> <span class="code-object">String</span> execute() {
+ 		log = log + <span class="code-quote">"-execute"</span>;
+ 		<span class="code-keyword">return</span> Action.SUCCESS;
+ 	}
+
+ 	@BeforeResult
+ 	<span class="code-keyword">public</span> void beforeResult() <span class="code-keyword">throws</span> Exception {
+ 		log = log +<span class="code-quote">"-beforeResult"</span>;
+ 	}
+
+ 	@After
+ 	<span class="code-keyword">public</span> void after() {
+ 		log = log + <span class="code-quote">"-after"</span>;
+ 	}
+ }</pre>
+</div></div>
+
+<p>Configure a stack in xwork.xml that replaces the PrepareInterceptor with the AnnotationWorkflowInterceptor:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;interceptor-stack name=<span class="code-quote">"annotatedStack"</span>&gt;</span>
+<span class="code-tag">&lt;interceptor-ref name=<span class="code-quote">"static-params"</span>/&gt;</span>
+<span class="code-tag">&lt;interceptor-ref name=<span class="code-quote">"params"</span>/&gt;</span>
+<span class="code-tag">&lt;interceptor-ref name=<span class="code-quote">"conversionError"</span>/&gt;</span>
+<span class="code-tag">&lt;interceptor-ref name=<span class="code-quote">"annotationInterceptor"</span>/&gt;</span>
+<span class="code-tag">&lt;/interceptor-stack&gt;</span></pre>
+</div></div>
+
+<p>Given an Action, AnnotatedAction, add a reference to the AnnotationWorkflowInterceptor interceptor.</p>
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag">&lt;action name=<span class="code-quote">"AnnotatedAction"</span> class=<span class="code-quote">"com.examples.AnnotatedAction"</span>&gt;</span>
+   <span class="code-tag">&lt;interceptor-ref name=<span class="code-quote">"annotationInterceptor"</span>/&gt;</span>
+   <span class="code-tag">&lt;result name=<span class="code-quote">"success"</span> type=<span class="code-quote">"freemarker"</span>&gt;</span>good_result.ftl<span class="code-tag">&lt;/result&gt;</span>
+<span class="code-tag">&lt;/action&gt;</span></pre>
+</div></div>
+
+<p><p>With the interceptor applied and the action executed on <code>AnnotatedAction</code> the log
+instance variable will contain <code>baseBefore-before-execute-beforeResult-after</code>.</p></p>
+
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/App Servers.html

+<html>
+    <head>
+        <title>WebWork - 
+         Servers
+        </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <ul>
+	<li><a href="WebLogic.html" title="WebLogic">WebLogic</a></li>
+	<li><a href="WebLogic 6.1.html" title="WebLogic 6.1">WebLogic 6.1</a></li>
+	<li>WebSphere</li>
+	<li>JRun</li>
+	<li>Jetty</li>
+	<li>Tomcat/JBoss</li>
+	<li>Resin</li>
+	<li>Orion</li>
+	<li>OC4J</li>
+</ul>
+
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/Application, Session, Request objects in jsp.html

+<html>
+    <head>
+        <title>WebWork - 
+        Application, Session, Request objects in jsp
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <p>The application, session and request objects are available from within ww tags in jsp wherever ognl can be evaluated. Use the #session syntax to get the object and access values by their keys using ['key'].<div class="code"><div class="codeContent">
+<pre class="code-java">&lt;ww:property value=<span class="code-quote">"#application\['foo'\]"</span>/&gt;
+
+&lt;ww:property value=<span class="code-quote">"#session\['baz'\]"</span>/&gt;</pre>
+</div></div><br/>
+Conversely, if you would like to make webwork objects availible to say the jsp/jstl request scope.  The property tag can be used like this.</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java">&lt;ww:set name=<span class="code-quote">"jobz"</span> value=<span class="code-quote">"jobs"</span> scope=<span class="code-quote">"request"</span> /&gt;</pre>
+</div></div>
+
+<p>A full example below shows a webwork variable "jobs" being exposed as "jobz" and being used with jstl and the display tag. </p>
+
+<p><a href="Exposing webwork objects to JSTL, with a JSTL and DisplayTag Example.html" title="Exposing webwork objects to JSTL, with a JSTL and DisplayTag Example">WW:Exposing webwork objects to JSTL, with a JSTL and DisplayTag Example</a></p>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/Application, Session, Request objects in vm.html

+<html>
+    <head>
+        <title>WebWork - 
+        Application, Session, Request objects in vm
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <div class="code"><div class="codeContent">
+<pre class="code-java">$req.session.servletContext.getAttribute(...)
+$req.session.getAttribute(...)
+$req.getAttribute(...)</pre>
+</div></div>
+
+
+<p>To get parameters from the QueryString or from a POSTed form, do not use getAttribute, use:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java">$req.getParameter(...)</pre>
+</div></div>
+
+<p>But that's quite obvious, since $req is the request object and we all know how it works.</p>
+
+<p><b>Example:</b></p>
+
+<p>_<em>test.jsp</em>_:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;
+&lt;%
+session.setAttribute(<span class="code-quote">"sessionFoo"</span>, <span class="code-quote">"sessionBar"</span>);
+session.getServletContext().setAttribute(<span class="code-quote">"applicationFoo"</span>, <span class="code-quote">"applicationBar"</span>);
+%&gt;
+
+&lt;p&gt;The following information should be available when sending the form below:
+
+&lt;ul&gt;
+	&lt;li&gt;Request parameter 'querystringFoo' with value 'querystringBar';&lt;/li&gt;
+	&lt;li&gt;Request parameter 'formFoo' with value 'formBar';&lt;/li&gt;
+	&lt;li&gt;Session attribute 'sessionFoo' with value 'sessionBar';&lt;/li&gt;
+	&lt;li&gt;Application attribute 'applicationFoo' with value 'applicationBar'.&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/p&gt;
+
+&lt;form action=<span class="code-quote">"test.vm?querystringFoo=querystringBar"</span> method=<span class="code-quote">"post"</span>&gt;
+&lt;input type=<span class="code-quote">"hidden"</span> name=<span class="code-quote">"formFoo"</span> value=<span class="code-quote">"formBar"</span>&gt;
+&lt;p&gt;&lt;input type=<span class="code-quote">"submit"</span> value=<span class="code-quote">"Test!"</span>&gt;&lt;/p&gt;
+&lt;/form&gt;
+&lt;/body&gt;&lt;/html&gt;</pre>
+</div></div>
+
+<p>_<em>test.vm</em>_:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;
+
+#set ($ses = $req.getSession())
+#set ($app = $ses.getServletContext())
+
+&lt;p&gt;applicationFoo = $!app.getAttribute(<span class="code-quote">"applicationFoo"</span>) &lt;code&gt;(app.getAttribute(<span class="code-quote">"applicationFoo"</span>))&lt;/code&gt;&lt;/p&gt;
+&lt;p&gt;sessionFoo = $!ses.getAttribute(<span class="code-quote">"sessionFoo"</span>) &lt;code&gt;(ses.getAttribute(<span class="code-quote">"sessionFoo"</span>))&lt;/code&gt;&lt;/p&gt;
+&lt;p&gt;formFoo = $!req.getParameter(<span class="code-quote">"formFoo"</span>) &lt;code&gt;(req.getParameter(<span class="code-quote">"formFoo"</span>))&lt;/code&gt;&lt;/p&gt;
+&lt;p&gt;querystringFoo = $!req.getParameter(<span class="code-quote">"querystringFoo"</span>) &lt;code&gt;(req.getParameter(<span class="code-quote">"queryStringFoo"</span>))&lt;/code&gt;&lt;/p&gt;
+
+&lt;/body&gt;&lt;/html&gt;</pre>
+</div></div>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>

docs/wikidocs/Architecture.html

+<html>
+    <head>
+        <title>WebWork - 
+        Architecture
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <p>The WebWork architecture can best be explained with a diagram:</p>
+
+<p><img src="Architecture_attachments/arch.png" align="absmiddle" border="0" /></p>
+
+<p>In the diagram, an initial request goes to the Servlet container (such as Tomcat or Resin), the request goes through the standard filter chain. This includes the (optional) <b>ActionContextCleanUp</b> filter, which is required if you wish to integrate in with technologies such as <a href="SiteMesh.html" title="SiteMesh">SiteMesh</a>. Next, the required <b>FilterDispatcher</b> is called, which in turn consults the <a href="ActionMapper.html" title="ActionMapper">ActionMapper</a> to determine if the request should invoke an action.</p>
+
+<p>If the ActionMapper determines that an action should be invoked, the FilterDispatcher than delegates to the <b>ActionProxy</b>, which in turn consults the WebWork <a href="Configuration Files.html" title="Configuration Files">Configuration Files</a> manager, which finally reads your <a href="xwork.xml.html" title="xwork.xml">xwork.xml</a> file. Next, the ActionProxy creates an <b>ActionInvocation</b>, which is responsible for the command pattern implementation. This includes invoking any <b>interceptors</b> (the <em>before()</em> method) before finally invoking the <b>action</b> itself.</p>
+
+<p>Once the action returns, the ActionInvocation is responsible for looking up the proper <b>result</b> associated with the <b>action result code</b> mapped in xwork.xml. The result is then executed, which often (but not always, as is the case for <a href="Action Chaining.html" title="Action Chaining">Action Chaining</a>) involves a template written in <a href="JSP.html" title="JSP">JSP</a> or <a href="FreeMarker.html" title="FreeMarker">FreeMarker</a> to be rendered. While rendering, the templates can utilize the <a href="Tags.html" title="Tags">Tags</a> provided by WebWork. Some of those components will work with the ActionMapper to render proper URLs for additional requests.</p>
+
+<div class="information-block" align='center'><div class='informationMacroPadding'><table cellpadding='5' width='85%' cellspacing='0' class='noteMacro' border='0'><tr><td width='16' valign='top'><img src="/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>All objects in this architecture (action, result, interceptor, etc) are created by an ObjectFactory. This ObjectFactory is pluggable and is how frameworks like <a href="Spring.html" title="Spring">Spring</a> and <a href="Pico.html" title="Pico">Pico</a> integrate. You can also provide your own ObjectFactory for any reason that requires knowing when objects in WebWork are created.</td></tr></table></div></div>
+
+<p>Finally, the interceptors are executed again (in reverse order, calling the <em>after()</em> method) and finally returning back through the filters configured in web.xml. If the ActionContextCleanUp filter is present, the FilterDispatcher will <em>not</em> clean up the ThreadLocal <b>ActionContext</b>. If the ActionContextCleanUp filter is not present, the FilterDispatcher will cleanup all ThreadLocals.</p>
+
+                    			    </td>
+		    </tr>
+	    </table>
+    </body>
+</html>
Add a comment to this file

docs/wikidocs/Architecture_attachments/arch.doc

Binary file added.

Add a comment to this file

docs/wikidocs/Architecture_attachments/arch.png

Added
New image

docs/wikidocs/Articles and press.html

+<html>
+    <head>
+        <title>WebWork - 
+        Articles and press
+         </title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <p>WebWork is a very popular framework and community. As such, there are many articles, presentations, and books about WebWork. Here is just a sample.</p>
+
+<h1><a name="Articlesandpress-Books">Books</a></h1>
+
+<ul>
+	<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1932394532/qid=1130703316/sr=8-1/ref=pd_bbs_1/103-9661524-1793411?v=glance&amp;s=books&amp;n=507846" title="Visit page outside Confluence">WebWork in Action</a> - Patrick Lightbody, Jason Carreira; Manning; September 2005</li>
+	<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471463620/qid=1130703327/sr=1-2/ref=sr_1_2/103-9661524-1793411?v=glance&amp;s=books" title="Visit page outside Confluence">Java Open Source Programming</a> - Joseph Walnes, Ara Abrahamian, Mike Cannon-Brookes, Patrick Lightbody; Wily; November 2003</li>
+	<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1932394060/qid=1130703339/sr=2-2/ref=pd_bbs_b_2_2/103-9661524-1793411?v=glance&amp;s=books" title="Visit page outside Confluence">Art of Java Web Development</a> - Neal Ford; Manning; November 2003</li>
+	<li><a href="http://www.sourcebeat.com/TitleAction.do?id=6" title="Visit page outside Confluence">WebWork Live</a> - Matthew Porter; SourceBeat; N/A</li>
+</ul>
+
+
+<h1><a name="Articlesandpress-Presentations">Presentations</a></h1>
+
+<ul>
+	<li>WebWork + AJAX: A winning combination (<a href="http://www.javalobby.org/av/javazone/59/lightbody-ajax" title="Visit page outside Confluence">video</a>, <a href="Articles and press_attachments/AJAX.ppt" title="AJAX.ppt attached to Articles and press">slides</a>) - Patrick Lightbody; JavaZone; August 2005</li>
+	<li>WebWork in Action: An introduction to WebWork (<a href="http://www.javalobby.org/av/javazone/67/lightbody-webwork" title="Visit page outside Confluence">video</a>, <a href="Articles and press_attachments/WWiA.ppt" title="WWiA.ppt attached to Articles and press">slides</a>) - Patrick Lightbody; JavaZone; August 2005</li>
+	<li><a href="Articles and press_attachments/webwork-talk.zip" title="webwork-talk.zip attached to Articles and press">WebWork 2.0: Strutting the OpenSymphony way</a> - Jason Carreira; TheServerSide Symposium; April 2004</li>
+	<li><a href="Strutting the OpenSymphony way.html" title="Strutting the OpenSymphony way">Strutting the OpenSymphony way</a> - Mike Cannon-Brookes; TheServerSide Symposium; July 2003</li>
+	<li><a href="http://www.groovesystems.com/training/java4/webwork.ppt" title="Visit page outside Confluence">WebWork 2.0 Overview</a> - Rick Salsa; <a href="http://www.groovesystems.com" title="Visit page outside Confluence">Groove Systems</a></li>
+</ul>
+
+
+<h1><a name="Articlesandpress-Articles">Articles</a></h1>
+
+<ul>
+	<li><a href="http://www.developer.com/design/article.php/3530776" title="Visit page outside Confluence">Working wit the WebWork Framework</a> - Vlad Kofman</li>
+	<li><a href="http://www.theserverside.com/resources/article.jsp?l=WebWork2" title="Visit page outside Confluence">Building with WebWork</a> - Kris Thompson; TheServerSide; November 2003</li>
+	<li><a href="http://www.guj.com.br/user.article.get.chain?page=1&amp;article.id=135" title="Visit page outside Confluence">Tutorial and article in Brazilian Portuguese</a> - January, 2004</li>
+</ul>
+
+
+<h1><a name="Articlesandpress-Blogs">Blogs</a></h1>
+
+<p><b>The official WebWork Blog can be found <a href="http://blogs.opensymphony.com/webwork" title="Visit page outside Confluence">here</a>.</b></p>
+
+<p>Additionally, the blogs of the developers of WebWork may provide some useful information:</p>
+
+<ul>
+	<li><a href="http://blogs.opensymphony.com/plightbo" title="Visit page outside Confluence">Blogbody</a> - Patrick Lightbody</li>
+	<li><a href="http://jroller.com/page/jcarreira" title="Visit page outside Confluence">Jason Carreira</a></li>