You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2014/05/06 08:37:16 UTC

svn commit: r908157 - in /websites/production/struts/content: development/2.x/docs/ release/2.3.x/docs/

Author: lukaszlenart
Date: Tue May  6 06:37:16 2014
New Revision: 908157

Log:
Updates production

Modified:
    websites/production/struts/content/development/2.x/docs/access-to-valuestack-from-jsps.html
    websites/production/struts/content/development/2.x/docs/message-resource-files.html
    websites/production/struts/content/development/2.x/docs/ognl-basics.html
    websites/production/struts/content/release/2.3.x/docs/access-to-valuestack-from-jsps.html
    websites/production/struts/content/release/2.3.x/docs/message-resource-files.html
    websites/production/struts/content/release/2.3.x/docs/ognl-basics.html

Modified: websites/production/struts/content/development/2.x/docs/access-to-valuestack-from-jsps.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/access-to-valuestack-from-jsps.html (original)
+++ websites/production/struts/content/development/2.x/docs/access-to-valuestack-from-jsps.html Tue May  6 06:37:16 2014
@@ -19,7 +19,7 @@ under the License. 
 -->
 <html>
 <head>
-    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
     <style type="text/css">
         .dp-highlighter {
             width:95% !important;
@@ -37,9 +37,9 @@ under the License. 
     <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
     <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
     <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
-            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
-            <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
-    
+    <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+
     <script type="text/javascript">
         SyntaxHighlighter.defaults['toolbar'] = false;
         SyntaxHighlighter.all();
@@ -135,45 +135,23 @@ under the License. 
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent">
-<p>To access the ValueStack from third-party JSP taglibs, expose property values to JSP using the <code>&lt;s:set</code> tag.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;s:set name=&quot;&#39;a&#39;&quot; value=&quot;{ 1, 2, 3, 4 }&quot; scope=&quot;request&quot;/&gt;
+            <div id="ConfluenceContent"><p>To access the ValueStack from third-party JSP taglibs, expose property values to JSP using the <code>&lt;s:set</code> tag.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Set a request scoped parameter 'a' to list of integers</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:set name=&quot;&#39;a&#39;&quot; value=&quot;{ 1, 2, 3, 4 }&quot; scope=&quot;request&quot;/&gt;
 ]]></script>
-</div></div>
-
-<p>After setting parameters, third-party JSP taglibs can access variables or use JSP 2.0 EL (Expression Language). This is convenient as short hand EL expression syntax<br clear="none">
-<code>${expression</code>}</p>
-
-<p> can be used in a text or inside of tag attributes:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-a[0] = ${a[0]}
+</div></div><p>After setting parameters, third-party JSP taglibs can access variables or use JSP 2.0 EL (Expression Language). This is convenient as short hand EL expression syntax<br clear="none"> <code>${expression</code>}</p><p>can be used in a text or inside of tag attributes:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[a[0] = ${a[0]}
 
 &lt;sample:tag value=&quot;${a[1]}&quot;/&gt;
 ]]></script>
-</div></div>
-<p>In practice, several variables must be exposed to make effective use of third party taglibs like <a shape="rect" class="external-link" href="http://displaytag.sourceforge.net/11/" rel="nofollow">DisplayTag</a>. Unfortunately, this approach leads to a lot of <code>&lt;ww:set/&gt;</code> tags. </p>
-
-    <div class="aui-message warning shadowed information-macro">
+</div></div><p>In practice, several variables must be exposed to make effective use of third party taglibs like <a shape="rect" class="external-link" href="http://displaytag.sourceforge.net/11/" rel="nofollow">DisplayTag</a>. Unfortunately, this approach leads to a lot of <code>&lt;ww:set/&gt;</code> tags.</p>    <div class="aui-message warning shadowed information-macro">
                     <p class="title">Why can't we just replace EL with OGNL?</p>
                             <span class="aui-icon icon-warning">Icon</span>
                 <div class="message-content">
-                            
-<p>Unfortunately, it isn't that simple. we tinkered with <code>JSPFactory.setDefault()</code> to wrap around <code>getPageContext()</code> and create <code>ExpressionEvaluator</code> that would use OGNL. This strategy works in practice, but code generated by Jasper2 doesn't call <code>JSPFactory.getPageContext().getExpressionEvaluator()</code> but goes directly to static method that is hardwired to Jakarta Commons-EL implementation.</p>
-
-<p>Even if this approach did work, it wouldn't be <em>clean</em> as <code>JSPFactory.setDefault()</code> should only be called by JSP implementation.</p>
+                            <p>Unfortunately, it isn't that simple. we tinkered with <code>JSPFactory.setDefault()</code> to wrap around <code>getPageContext()</code> and create <code>ExpressionEvaluator</code> that would use OGNL. This strategy works in practice, but code generated by Jasper2 doesn't call <code>JSPFactory.getPageContext().getExpressionEvaluator()</code> but goes directly to static method that is hardwired to Jakarta Commons-EL implementation.</p><p>Even if this approach did work, it wouldn't be <em>clean</em> as <code>JSPFactory.setDefault()</code> should only be called by JSP implementation.</p>
                     </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 clear="none">
-To use a function, import the TLD in a JSP file where you've want to use a function. For example, you could access Action properties by evaluating OGNL expression by a function 'vs' (for valuestack) in EL.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;%@ taglib uri=&quot;/WEB-INF/tld/wwel.tld&quot; prefix=&quot;x&quot; %&gt;
+<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 clear="none"> To use a function, import the TLD in a JSP file where you've want to use a function. For example, you could access Action properties by evaluating OGNL expression by a function 'vs' (for valuestack) in EL.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;%@ taglib uri=&quot;/WEB-INF/tld/wwel.tld&quot; prefix=&quot;x&quot; %&gt;
 
 a[0] = ${x:vs(&#39;a[0]&#39;)}
 a[0] * 4 = ${x:vs(&#39;a[0] * 4&#39;)}
@@ -181,21 +159,14 @@ a[0] * 4 = ${x:vs(&#39;a[0] * 4&#39;)}
 Current action name: ${x:name()}
 Top of ValueStack: ${x:top()}
 ]]></script>
-</div></div>
-<p>To use this code you've got to add <code>wwel.tld</code> and <code>Functions.java</code> to your webapp project.</p>
-
-    <div class="aui-message success shadowed information-macro">
+</div></div><p>To use this code you've got to add <code>wwel.tld</code> and <code>Functions.java</code> to your webapp project.</p>    <div class="aui-message success shadowed information-macro">
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>If someone were interested, it would be helpful for a developer (like you!) to define a set of functions that we could include in a future release of the framework. </p>
+                            <p>If someone were interested, it would be helpful for a developer (like you!) to define a set of functions that we could include in a future release of the framework.</p>
                     </div>
     </div>
-
-
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>wwel.tld</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version=&quot;1.0&quot;?&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;?xml version=&quot;1.0&quot;?&gt;
 &lt;taglib xmlns=&quot;http://java.sun.com/xml/ns/j2ee&quot;
 	xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 	xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd&quot;
@@ -236,10 +207,8 @@ from JSP 2.0 Expression Language
 
 &lt;/taglib&gt;
 ]]></script>
-</div></div>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Functions.java</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-package com.nmote.wwel;
+</div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Functions.java</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[package com.nmote.wwel;
 
 import com.opensymphony.xwork.ActionContext;
 

Modified: websites/production/struts/content/development/2.x/docs/message-resource-files.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/message-resource-files.html (original)
+++ websites/production/struts/content/development/2.x/docs/message-resource-files.html Tue May  6 06:37:16 2014
@@ -19,7 +19,7 @@ under the License. 
 -->
 <html>
 <head>
-    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
     <style type="text/css">
         .dp-highlighter {
             width:95% !important;
@@ -37,9 +37,10 @@ under the License. 
     <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
     <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
     <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
-            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
-            <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
-    
+    <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script>
+
     <script type="text/javascript">
         SyntaxHighlighter.defaults['toolbar'] = false;
         SyntaxHighlighter.all();
@@ -148,23 +149,23 @@ under the License. 
                     </div>
     </div>
 <h3 id="MessageResourceFiles-MessageResourcePropertyFiles">Message Resource Property Files</h3><p>In a Struts 2 web application you may associate a message resource property file with each Struts 2 Action class by creating a properties file with the same name as the Action class and having the .properties extension. This properties file must go in the same package as the Action class. For our tutorial example, let's say we want to place the form field labels into a separate file where we can easily change them and also provide the capability to display the labels in other languages.</p><p>If you're doing this tutorial after completing <a shape="rect" href="form-validation.html">Form Validation</a> then you can make these changes to that tutorial's example application.</p><p>Put the text below in a file named Register.properties in the org.apache.struts.register.action package in the src/resources/java folder.</p><div class="code panel pdl" style="border-width: 1px;"><div class="code
 Header panelHeader pdl" style="border-bottom-width: 1px;"><b>Register.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[personBean.firstName=First name
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[personBean.firstName=First name
 personBean.lastName=Last name
 personBean.age=Age
 personBean.email=Email
 thankyou=Thank you for registering %{personBean.firstName}.
 ]]></script>
 </div></div><p>The above is just a standard Java properties file. The key is to the left of the = sign and the value for the key is to the right. When the Register action is executed these properties will be available to the view page by referencing the key name.</p><h3 id="MessageResourceFiles-Struts2KeyAttribute">Struts 2 Key Attribute</h3><p>The Struts 2 key attribute can be used in the <a shape="rect" href="textfield.html">textfield</a> tag to instruct the framework what value to use for the textfield's name and label attributes. Instead of providing those attributes and their values directly, you can just use the key attribute.</p><p>If you open register.jsp from the <a shape="rect" href="form-validation.html">Form Validation</a> tutorial you'll see this Struts 2 textfield tag:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>textfield tag</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:textfield name=&quot;personBean.firstName&quot; label=&quot;First name&quot; /&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:textfield name=&quot;personBean.firstName&quot; label=&quot;First name&quot; /&gt;
 ]]></script>
 </div></div><p>Instead of specifying the name and label attributes you can just use the key attribute.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>textfield tag with key attribute</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:textfield key=&quot;personBean.firstName&quot;  /&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:textfield key=&quot;personBean.firstName&quot;  /&gt;
 ]]></script>
 </div></div><p>The value for the key attribute instructs the Struts 2 framework to use the same value for the name attribute (personBean.firstName). For the label attribute's value the value of the key attribute is used by the Struts 2 framework to find a key in a properties file with the same value. So in our example, Struts 2 will look in Register.properties for a key with a value of personBean.firstName. The value of that key (First name) will be used as the label attribute's value.</p><p>To enable the key attribute to find the properties file, the display of the view page must be the result of executing a Struts 2 Action class. Right now if you examine index.jsp from the <a shape="rect" href="form-validation.html">Form Validation</a> tutorial the link to the register.jsp page is a standard URL.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>link to register.jsp</b></div><div class="codeConten
 t panelContent pdl">
 <script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;p&gt;&lt;a href=&quot;register.jsp&quot;&gt;Please register&lt;/a&gt; for our prize drawing.&lt;/p&gt;
 ]]></script>
 </div></div><p>We need to change the above link so that it goes through the Register.java Struts 2 Action class. Replace the above with this markup.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>link to Register Action class</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:url action=&quot;registerInput&quot; var=&quot;registerInputLink&quot; /&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:url action=&quot;registerInput&quot; var=&quot;registerInputLink&quot; /&gt;
 &lt;p&gt;&lt;a href=&quot;${registerInputLink}&quot;&gt;Please register&lt;/a&gt; for our prize drawing.&lt;/p&gt;
 ]]></script>
 </div></div><p>We use the Struts 2 url tag to create a link to action registerInput. We then use that link as the value for the href attribute of the anchor tag. We must define the registerInput action in struts.xml. Add the following to struts.xml.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>registerInput action node for struts.xml</b></div><div class="codeContent panelContent pdl">
@@ -173,29 +174,29 @@ thankyou=Thank you for registering %{per
 &lt;/action&gt;
 ]]></script>
 </div></div><p>The above action node instructs the Struts 2 framework to execute class Register's input method in response to action registerInput. The input method is inherited by class Register from class ActionSupport. The default behavior of the inherited input method is to return the String input. The result node above specifies that if the returned result is "input" then render the view register.jsp.</p><p>By doing the above the view page register.jsp will have access to the properties defined in Register.properties. The Struts 2 framework will make those properties defined in Register.properties available to the view page since the view page was rendered after Register.java (the Struts 2 Action class) was executed.</p><p>Follow the instructions (README.txt) in the project to create the war file and copy the war file to your servlet container. Open a web browser and navigate to the home page specified in the README.txt file (index.action). You should see a link to registerInpu
 t.action when mousing over the hyperlink Please Register.</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/registerInput.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/registerInput.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><p>When you click on the Please Register link your browser should display the register.jsp. The form field labels should be the key values from the Register.properties file.</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/register.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/register.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><h3 id="MessageResourceFiles-Struts2TextTag">Struts 2 Text Tag</h3><p>We can also use the Struts 2 text tag to display 
 values from a properties file. In thankyou.jsp add this text tag instead of the h3 tag that is in thankyou.jsp.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>text tag</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h3&gt;&lt;s:text name=&quot;thankyou&quot; /&gt;&lt;/h3&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h3&gt;&lt;s:text name=&quot;thankyou&quot; /&gt;&lt;/h3&gt;
 ]]></script>
 </div></div><p>Since thankyou.jsp is also rendered after executing the Register.java Action class, the key thankyou and its value will be available to the view page.</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/thankyou.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/thankyou.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><p>How did the value entered for the first name input field get displayed on thankyou.jsp? Look back at the value for the thankyou key in the Register.properties file.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Register.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[thankyou=Thank you for registering %{personBean.firstName}.
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[thankyou=Thank you for registering %{personBean.firstName}.
 ]]></script>
 </div></div><p>The markup %{personBean.firstName} tells Struts 2 to replace this part with the result of calling getPersonBean, which returns a Person object. Then call the getFirstName method which returns a String (the value the user inputted into the personBean.firstName form field on register.jsp).</p><h3 id="MessageResourceFiles-PackageLevelProperties">Package Level Properties</h3><p>What if you want a properties file with keys and values that can be referenced from multiple view pages and those view pages are rendered after executing different Action classes? Struts 2 has the ability to use multiple property files provided the property file is found in the package hierarchy.</p><p>Place the following in a file named package.properties and save that file in package org.apache.struts in src/main/resources.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>package.properties</b></div><div class="
 codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[greeting=Welcome to The Wonderful World of Struts 2
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[greeting=Welcome to The Wonderful World of Struts 2
 ]]></script>
-</div></div><p>Now any view rendered by an Action that is in the hierarchy org.apache.struts... can use a Struts 2 text tag with a name attribute value of "greeting" to display the value of the greeting property key. For example add the following markup to helloworld.jsp before the h2 tag.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h1&gt;&lt;s:text name=&quot;greeting&quot; /&gt;&lt;/h1&gt;
+</div></div><p>Now any view rendered by an Action that is in the hierarchy org.apache.struts... can use a Struts 2 text tag with a name attribute value of "greeting" to display the value of the greeting property key. For example add the following markup to helloworld.jsp before the h2 tag.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Using properties set in package.properties</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h1&gt;&lt;s:text name=&quot;greeting&quot; /&gt;&lt;/h1&gt;
 ]]></script>
 </div></div><p>Then rebuild the war file and deploy it to your servlet container. Go to index.action and click on the link for Hello World. You should see:</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/hellogreeting.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/hellogreeting.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><p>The property keys and values defined in package.properties are available to any view that is rendered after executing an Action class that is the package hierarchy that includes package.properties.</p><h3 id="MessageResourceFiles-GlobalProperties">Global Properties</h3><p>You can also specify a global property file in struts.xml. The keys and values defined in that property file will be available to all the view pages that are rendered after executing an Action class.</p><p>Add the following to a file nam
 ed global.properties (note the name doesn't have to be global).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>global.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[contact=For assistance contact &lt;a href=&#39;mailto:contact@email.com&#39;&gt;contact@email.com&lt;/a&gt;
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[contact=For assistance contact &lt;a href=&#39;mailto:contact@email.com&#39;&gt;contact@email.com&lt;/a&gt;
 ]]></script>
 </div></div><p>Save the global.properties file in the src/main/resources folder.</p><p>To inform the Struts 2 framework about the global.properties file add the follow node to struts.xml after the constant name="struts.devmode" node.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Specify Global Property File In struts.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;constant name=&quot;struts.custom.i18n.resources&quot; value=&quot;global&quot; /&gt;
 ]]></script>
 </div></div><p>To use the contact key in a view page, add the following markup to index.jsp just before the closing body tag.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Using contact property</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;hr /&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;hr /&gt;
 &lt;s:text name=&quot;contact&quot; /&gt;
 ]]></script>
 </div></div><p>Rebuild the war file, deploy it to your Servlet container, and then go to index.action. You should see:</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/contact.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/contact.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><p>Struts 2 will look for a property key of contact in all the property files starting with the property file that matches the Action class, then in the property files that are in the package hierarchy of the Action class, and then in any property files specified in struts.xml. For this example Struts 2 will find the contact key in global.properties. The value of the contact key will be displayed where we have put the text tag.</p><p>You can add the text tag above to all the JSPs in this example.</p><h3 id="MessageResourceFiles-Internationalization(i18n)">
 Internationalization (i18n)</h3><p>Using message resource files (resource bundles) also enables you to provide text in different languages. By default, Struts 2 will use the user's default locale. If that locale is en for English then the property files used will be the ones without a locale specification (for example Register.properties). If the locale is not English but say Spanish (es) then Struts 2 will look for a properties file named Register_es.properties.</p><p>To provide an example of Struts 2 support for i18n create a file named Register_es.properties and in that file add the following Spanish translations.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Register_es.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[personBean.firstName=Nombre
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[personBean.firstName=Nombre
 personBean.lastName=Apellidos
 personBean.age=Edad
 personBean.email=Correo
@@ -208,7 +209,7 @@ thankyou=Gracias por registrarse, %{pers
                     </div>
     </div>
 <p>Save the Register_es.properties file in the same package as Register.properties.</p><p>In our example application, we need to tell Struts 2 to use a locale value of es (since we're not in a Spanish locale) instead of the default locale value of our location (which is en). Add the following markup to index.jsp.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Specify The Locale As a URL Parameter</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h3&gt;Registro español&lt;/h3&gt;
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h3&gt;Registro español&lt;/h3&gt;
 &lt;s:url action=&quot;registerInput&quot; var=&quot;registerInputLinkES&quot;&gt;
     &lt;s:param name=&quot;request_locale&quot;&gt;es&lt;/s:param&gt;
 &lt;/s:url&gt;

Modified: websites/production/struts/content/development/2.x/docs/ognl-basics.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/ognl-basics.html (original)
+++ websites/production/struts/content/development/2.x/docs/ognl-basics.html Tue May  6 06:37:16 2014
@@ -156,7 +156,7 @@ name       // call to animal.getName() b
 [1].name   // call to person.getName()
 ]]></script>
 </div></div><p>With expression like [0] ... [3] etc. Struts 2 will cut the stack and still return back a CompoundRoot object. To get the top of that particular stack cut, use <a shape="rect" class="createlink" href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&amp;title=0&amp;linkCreation=true&amp;fromPageId=14000">0</a>.top</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>ognl expression</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>[0].top</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>would get the top of the stack cut starting from element 0 in the stack (similar to top in this case)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>[1].top</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>would get the top of the stack cut starting from element 1
  in the stack</p></td></tr></tbody></table></div><h2 id="OGNLBasics-Accessingstaticproperties">Accessing static properties</h2><p>OGNL supports accessing static properties as well as static methods.</p><p>By default, Struts 2 is configured to disallow this--to enable OGNL's static member support you must set the <code>struts.ognl.allowStaticMethodAccess</code> constant to <code>true</code> via any of the <a shape="rect" href="constant-configuration.html">Constant Configuration</a> methods.</p><p>OGNL's static access looks like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[@some.package.ClassName@FOO_PROPERTY
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@some.package.ClassName@FOO_PROPERTY
 @some.package.ClassName@someMethod()
 ]]></script>
 </div></div><p>However, XWork allows you to avoid having to specify the full package name and call static properties and methods of your action classes using the "vs" prefix:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">

Modified: websites/production/struts/content/release/2.3.x/docs/access-to-valuestack-from-jsps.html
==============================================================================
--- websites/production/struts/content/release/2.3.x/docs/access-to-valuestack-from-jsps.html (original)
+++ websites/production/struts/content/release/2.3.x/docs/access-to-valuestack-from-jsps.html Tue May  6 06:37:16 2014
@@ -19,7 +19,7 @@ under the License. 
 -->
 <html>
 <head>
-    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
     <style type="text/css">
         .dp-highlighter {
             width:95% !important;
@@ -37,9 +37,9 @@ under the License. 
     <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
     <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
     <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
-            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
-            <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
-    
+    <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+
     <script type="text/javascript">
         SyntaxHighlighter.defaults['toolbar'] = false;
         SyntaxHighlighter.all();
@@ -135,45 +135,23 @@ under the License. 
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent">
-<p>To access the ValueStack from third-party JSP taglibs, expose property values to JSP using the <code>&lt;s:set</code> tag.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;s:set name=&quot;&#39;a&#39;&quot; value=&quot;{ 1, 2, 3, 4 }&quot; scope=&quot;request&quot;/&gt;
+            <div id="ConfluenceContent"><p>To access the ValueStack from third-party JSP taglibs, expose property values to JSP using the <code>&lt;s:set</code> tag.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Set a request scoped parameter 'a' to list of integers</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:set name=&quot;&#39;a&#39;&quot; value=&quot;{ 1, 2, 3, 4 }&quot; scope=&quot;request&quot;/&gt;
 ]]></script>
-</div></div>
-
-<p>After setting parameters, third-party JSP taglibs can access variables or use JSP 2.0 EL (Expression Language). This is convenient as short hand EL expression syntax<br clear="none">
-<code>${expression</code>}</p>
-
-<p> can be used in a text or inside of tag attributes:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-a[0] = ${a[0]}
+</div></div><p>After setting parameters, third-party JSP taglibs can access variables or use JSP 2.0 EL (Expression Language). This is convenient as short hand EL expression syntax<br clear="none"> <code>${expression</code>}</p><p>can be used in a text or inside of tag attributes:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[a[0] = ${a[0]}
 
 &lt;sample:tag value=&quot;${a[1]}&quot;/&gt;
 ]]></script>
-</div></div>
-<p>In practice, several variables must be exposed to make effective use of third party taglibs like <a shape="rect" class="external-link" href="http://displaytag.sourceforge.net/11/" rel="nofollow">DisplayTag</a>. Unfortunately, this approach leads to a lot of <code>&lt;ww:set/&gt;</code> tags. </p>
-
-    <div class="aui-message warning shadowed information-macro">
+</div></div><p>In practice, several variables must be exposed to make effective use of third party taglibs like <a shape="rect" class="external-link" href="http://displaytag.sourceforge.net/11/" rel="nofollow">DisplayTag</a>. Unfortunately, this approach leads to a lot of <code>&lt;ww:set/&gt;</code> tags.</p>    <div class="aui-message warning shadowed information-macro">
                     <p class="title">Why can't we just replace EL with OGNL?</p>
                             <span class="aui-icon icon-warning">Icon</span>
                 <div class="message-content">
-                            
-<p>Unfortunately, it isn't that simple. we tinkered with <code>JSPFactory.setDefault()</code> to wrap around <code>getPageContext()</code> and create <code>ExpressionEvaluator</code> that would use OGNL. This strategy works in practice, but code generated by Jasper2 doesn't call <code>JSPFactory.getPageContext().getExpressionEvaluator()</code> but goes directly to static method that is hardwired to Jakarta Commons-EL implementation.</p>
-
-<p>Even if this approach did work, it wouldn't be <em>clean</em> as <code>JSPFactory.setDefault()</code> should only be called by JSP implementation.</p>
+                            <p>Unfortunately, it isn't that simple. we tinkered with <code>JSPFactory.setDefault()</code> to wrap around <code>getPageContext()</code> and create <code>ExpressionEvaluator</code> that would use OGNL. This strategy works in practice, but code generated by Jasper2 doesn't call <code>JSPFactory.getPageContext().getExpressionEvaluator()</code> but goes directly to static method that is hardwired to Jakarta Commons-EL implementation.</p><p>Even if this approach did work, it wouldn't be <em>clean</em> as <code>JSPFactory.setDefault()</code> should only be called by JSP implementation.</p>
                     </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 clear="none">
-To use a function, import the TLD in a JSP file where you've want to use a function. For example, you could access Action properties by evaluating OGNL expression by a function 'vs' (for valuestack) in EL.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;%@ taglib uri=&quot;/WEB-INF/tld/wwel.tld&quot; prefix=&quot;x&quot; %&gt;
+<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 clear="none"> To use a function, import the TLD in a JSP file where you've want to use a function. For example, you could access Action properties by evaluating OGNL expression by a function 'vs' (for valuestack) in EL.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;%@ taglib uri=&quot;/WEB-INF/tld/wwel.tld&quot; prefix=&quot;x&quot; %&gt;
 
 a[0] = ${x:vs(&#39;a[0]&#39;)}
 a[0] * 4 = ${x:vs(&#39;a[0] * 4&#39;)}
@@ -181,21 +159,14 @@ a[0] * 4 = ${x:vs(&#39;a[0] * 4&#39;)}
 Current action name: ${x:name()}
 Top of ValueStack: ${x:top()}
 ]]></script>
-</div></div>
-<p>To use this code you've got to add <code>wwel.tld</code> and <code>Functions.java</code> to your webapp project.</p>
-
-    <div class="aui-message success shadowed information-macro">
+</div></div><p>To use this code you've got to add <code>wwel.tld</code> and <code>Functions.java</code> to your webapp project.</p>    <div class="aui-message success shadowed information-macro">
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>If someone were interested, it would be helpful for a developer (like you!) to define a set of functions that we could include in a future release of the framework. </p>
+                            <p>If someone were interested, it would be helpful for a developer (like you!) to define a set of functions that we could include in a future release of the framework.</p>
                     </div>
     </div>
-
-
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>wwel.tld</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version=&quot;1.0&quot;?&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;?xml version=&quot;1.0&quot;?&gt;
 &lt;taglib xmlns=&quot;http://java.sun.com/xml/ns/j2ee&quot;
 	xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 	xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd&quot;
@@ -236,10 +207,8 @@ from JSP 2.0 Expression Language
 
 &lt;/taglib&gt;
 ]]></script>
-</div></div>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Functions.java</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-package com.nmote.wwel;
+</div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Functions.java</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[package com.nmote.wwel;
 
 import com.opensymphony.xwork.ActionContext;
 

Modified: websites/production/struts/content/release/2.3.x/docs/message-resource-files.html
==============================================================================
--- websites/production/struts/content/release/2.3.x/docs/message-resource-files.html (original)
+++ websites/production/struts/content/release/2.3.x/docs/message-resource-files.html Tue May  6 06:37:16 2014
@@ -19,7 +19,7 @@ under the License. 
 -->
 <html>
 <head>
-    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
     <style type="text/css">
         .dp-highlighter {
             width:95% !important;
@@ -37,9 +37,10 @@ under the License. 
     <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
     <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
     <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
-            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
-            <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
-    
+    <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script>
+
     <script type="text/javascript">
         SyntaxHighlighter.defaults['toolbar'] = false;
         SyntaxHighlighter.all();
@@ -148,23 +149,23 @@ under the License. 
                     </div>
     </div>
 <h3 id="MessageResourceFiles-MessageResourcePropertyFiles">Message Resource Property Files</h3><p>In a Struts 2 web application you may associate a message resource property file with each Struts 2 Action class by creating a properties file with the same name as the Action class and having the .properties extension. This properties file must go in the same package as the Action class. For our tutorial example, let's say we want to place the form field labels into a separate file where we can easily change them and also provide the capability to display the labels in other languages.</p><p>If you're doing this tutorial after completing <a shape="rect" href="form-validation.html">Form Validation</a> then you can make these changes to that tutorial's example application.</p><p>Put the text below in a file named Register.properties in the org.apache.struts.register.action package in the src/resources/java folder.</p><div class="code panel pdl" style="border-width: 1px;"><div class="code
 Header panelHeader pdl" style="border-bottom-width: 1px;"><b>Register.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[personBean.firstName=First name
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[personBean.firstName=First name
 personBean.lastName=Last name
 personBean.age=Age
 personBean.email=Email
 thankyou=Thank you for registering %{personBean.firstName}.
 ]]></script>
 </div></div><p>The above is just a standard Java properties file. The key is to the left of the = sign and the value for the key is to the right. When the Register action is executed these properties will be available to the view page by referencing the key name.</p><h3 id="MessageResourceFiles-Struts2KeyAttribute">Struts 2 Key Attribute</h3><p>The Struts 2 key attribute can be used in the <a shape="rect" href="textfield.html">textfield</a> tag to instruct the framework what value to use for the textfield's name and label attributes. Instead of providing those attributes and their values directly, you can just use the key attribute.</p><p>If you open register.jsp from the <a shape="rect" href="form-validation.html">Form Validation</a> tutorial you'll see this Struts 2 textfield tag:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>textfield tag</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:textfield name=&quot;personBean.firstName&quot; label=&quot;First name&quot; /&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:textfield name=&quot;personBean.firstName&quot; label=&quot;First name&quot; /&gt;
 ]]></script>
 </div></div><p>Instead of specifying the name and label attributes you can just use the key attribute.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>textfield tag with key attribute</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:textfield key=&quot;personBean.firstName&quot;  /&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:textfield key=&quot;personBean.firstName&quot;  /&gt;
 ]]></script>
 </div></div><p>The value for the key attribute instructs the Struts 2 framework to use the same value for the name attribute (personBean.firstName). For the label attribute's value the value of the key attribute is used by the Struts 2 framework to find a key in a properties file with the same value. So in our example, Struts 2 will look in Register.properties for a key with a value of personBean.firstName. The value of that key (First name) will be used as the label attribute's value.</p><p>To enable the key attribute to find the properties file, the display of the view page must be the result of executing a Struts 2 Action class. Right now if you examine index.jsp from the <a shape="rect" href="form-validation.html">Form Validation</a> tutorial the link to the register.jsp page is a standard URL.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>link to register.jsp</b></div><div class="codeConten
 t panelContent pdl">
 <script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;p&gt;&lt;a href=&quot;register.jsp&quot;&gt;Please register&lt;/a&gt; for our prize drawing.&lt;/p&gt;
 ]]></script>
 </div></div><p>We need to change the above link so that it goes through the Register.java Struts 2 Action class. Replace the above with this markup.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>link to Register Action class</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:url action=&quot;registerInput&quot; var=&quot;registerInputLink&quot; /&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;s:url action=&quot;registerInput&quot; var=&quot;registerInputLink&quot; /&gt;
 &lt;p&gt;&lt;a href=&quot;${registerInputLink}&quot;&gt;Please register&lt;/a&gt; for our prize drawing.&lt;/p&gt;
 ]]></script>
 </div></div><p>We use the Struts 2 url tag to create a link to action registerInput. We then use that link as the value for the href attribute of the anchor tag. We must define the registerInput action in struts.xml. Add the following to struts.xml.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>registerInput action node for struts.xml</b></div><div class="codeContent panelContent pdl">
@@ -173,29 +174,29 @@ thankyou=Thank you for registering %{per
 &lt;/action&gt;
 ]]></script>
 </div></div><p>The above action node instructs the Struts 2 framework to execute class Register's input method in response to action registerInput. The input method is inherited by class Register from class ActionSupport. The default behavior of the inherited input method is to return the String input. The result node above specifies that if the returned result is "input" then render the view register.jsp.</p><p>By doing the above the view page register.jsp will have access to the properties defined in Register.properties. The Struts 2 framework will make those properties defined in Register.properties available to the view page since the view page was rendered after Register.java (the Struts 2 Action class) was executed.</p><p>Follow the instructions (README.txt) in the project to create the war file and copy the war file to your servlet container. Open a web browser and navigate to the home page specified in the README.txt file (index.action). You should see a link to registerInpu
 t.action when mousing over the hyperlink Please Register.</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/registerInput.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/registerInput.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><p>When you click on the Please Register link your browser should display the register.jsp. The form field labels should be the key values from the Register.properties file.</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/register.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/register.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><h3 id="MessageResourceFiles-Struts2TextTag">Struts 2 Text Tag</h3><p>We can also use the Struts 2 text tag to display 
 values from a properties file. In thankyou.jsp add this text tag instead of the h3 tag that is in thankyou.jsp.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>text tag</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h3&gt;&lt;s:text name=&quot;thankyou&quot; /&gt;&lt;/h3&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h3&gt;&lt;s:text name=&quot;thankyou&quot; /&gt;&lt;/h3&gt;
 ]]></script>
 </div></div><p>Since thankyou.jsp is also rendered after executing the Register.java Action class, the key thankyou and its value will be available to the view page.</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/thankyou.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/thankyou.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><p>How did the value entered for the first name input field get displayed on thankyou.jsp? Look back at the value for the thankyou key in the Register.properties file.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Register.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[thankyou=Thank you for registering %{personBean.firstName}.
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[thankyou=Thank you for registering %{personBean.firstName}.
 ]]></script>
 </div></div><p>The markup %{personBean.firstName} tells Struts 2 to replace this part with the result of calling getPersonBean, which returns a Person object. Then call the getFirstName method which returns a String (the value the user inputted into the personBean.firstName form field on register.jsp).</p><h3 id="MessageResourceFiles-PackageLevelProperties">Package Level Properties</h3><p>What if you want a properties file with keys and values that can be referenced from multiple view pages and those view pages are rendered after executing different Action classes? Struts 2 has the ability to use multiple property files provided the property file is found in the package hierarchy.</p><p>Place the following in a file named package.properties and save that file in package org.apache.struts in src/main/resources.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>package.properties</b></div><div class="
 codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[greeting=Welcome to The Wonderful World of Struts 2
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[greeting=Welcome to The Wonderful World of Struts 2
 ]]></script>
-</div></div><p>Now any view rendered by an Action that is in the hierarchy org.apache.struts... can use a Struts 2 text tag with a name attribute value of "greeting" to display the value of the greeting property key. For example add the following markup to helloworld.jsp before the h2 tag.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h1&gt;&lt;s:text name=&quot;greeting&quot; /&gt;&lt;/h1&gt;
+</div></div><p>Now any view rendered by an Action that is in the hierarchy org.apache.struts... can use a Struts 2 text tag with a name attribute value of "greeting" to display the value of the greeting property key. For example add the following markup to helloworld.jsp before the h2 tag.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Using properties set in package.properties</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h1&gt;&lt;s:text name=&quot;greeting&quot; /&gt;&lt;/h1&gt;
 ]]></script>
 </div></div><p>Then rebuild the war file and deploy it to your servlet container. Go to index.action and click on the link for Hello World. You should see:</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/hellogreeting.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/hellogreeting.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><p>The property keys and values defined in package.properties are available to any view that is rendered after executing an Action class that is the package hierarchy that includes package.properties.</p><h3 id="MessageResourceFiles-GlobalProperties">Global Properties</h3><p>You can also specify a global property file in struts.xml. The keys and values defined in that property file will be available to all the view pages that are rendered after executing an Action class.</p><p>Add the following to a file nam
 ed global.properties (note the name doesn't have to be global).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>global.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[contact=For assistance contact &lt;a href=&#39;mailto:contact@email.com&#39;&gt;contact@email.com&lt;/a&gt;
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[contact=For assistance contact &lt;a href=&#39;mailto:contact@email.com&#39;&gt;contact@email.com&lt;/a&gt;
 ]]></script>
 </div></div><p>Save the global.properties file in the src/main/resources folder.</p><p>To inform the Struts 2 framework about the global.properties file add the follow node to struts.xml after the constant name="struts.devmode" node.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Specify Global Property File In struts.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;constant name=&quot;struts.custom.i18n.resources&quot; value=&quot;global&quot; /&gt;
 ]]></script>
 </div></div><p>To use the contact key in a view page, add the following markup to index.jsp just before the closing body tag.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Using contact property</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;hr /&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;hr /&gt;
 &lt;s:text name=&quot;contact&quot; /&gt;
 ]]></script>
 </div></div><p>Rebuild the war file, deploy it to your Servlet container, and then go to index.action. You should see:</p><p><img class="confluence-embedded-image" src="https://cwiki.apache.org/confluence/download/attachments/14811894/contact.png?version=1&amp;modificationDate=1267884526000&amp;api=v2" data-image-src="/confluence/download/attachments/14811894/contact.png?version=1&amp;modificationDate=1267884526000&amp;api=v2"></p><p>Struts 2 will look for a property key of contact in all the property files starting with the property file that matches the Action class, then in the property files that are in the package hierarchy of the Action class, and then in any property files specified in struts.xml. For this example Struts 2 will find the contact key in global.properties. The value of the contact key will be displayed where we have put the text tag.</p><p>You can add the text tag above to all the JSPs in this example.</p><h3 id="MessageResourceFiles-Internationalization(i18n)">
 Internationalization (i18n)</h3><p>Using message resource files (resource bundles) also enables you to provide text in different languages. By default, Struts 2 will use the user's default locale. If that locale is en for English then the property files used will be the ones without a locale specification (for example Register.properties). If the locale is not English but say Spanish (es) then Struts 2 will look for a properties file named Register_es.properties.</p><p>To provide an example of Struts 2 support for i18n create a file named Register_es.properties and in that file add the following Spanish translations.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Register_es.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[personBean.firstName=Nombre
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[personBean.firstName=Nombre
 personBean.lastName=Apellidos
 personBean.age=Edad
 personBean.email=Correo
@@ -208,7 +209,7 @@ thankyou=Gracias por registrarse, %{pers
                     </div>
     </div>
 <p>Save the Register_es.properties file in the same package as Register.properties.</p><p>In our example application, we need to tell Struts 2 to use a locale value of es (since we're not in a Spanish locale) instead of the default locale value of our location (which is en). Add the following markup to index.jsp.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Specify The Locale As a URL Parameter</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h3&gt;Registro español&lt;/h3&gt;
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;h3&gt;Registro español&lt;/h3&gt;
 &lt;s:url action=&quot;registerInput&quot; var=&quot;registerInputLinkES&quot;&gt;
     &lt;s:param name=&quot;request_locale&quot;&gt;es&lt;/s:param&gt;
 &lt;/s:url&gt;

Modified: websites/production/struts/content/release/2.3.x/docs/ognl-basics.html
==============================================================================
--- websites/production/struts/content/release/2.3.x/docs/ognl-basics.html (original)
+++ websites/production/struts/content/release/2.3.x/docs/ognl-basics.html Tue May  6 06:37:16 2014
@@ -19,7 +19,7 @@ under the License. 
 -->
 <html>
 <head>
-    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
     <style type="text/css">
         .dp-highlighter {
             width:95% !important;
@@ -37,8 +37,8 @@ under the License. 
     <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
     <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
     <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
-            <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
-    
+    <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+
     <script type="text/javascript">
         SyntaxHighlighter.defaults['toolbar'] = false;
         SyntaxHighlighter.all();
@@ -134,76 +134,33 @@ under the License. 
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent"><declarations><string at:name="vs"></string><string at:name="vs1"></string><string at:name="vs2"></string></declarations><h2 id="OGNLBasics-XWork-specificlanguagefeatures">XWork-specific language features</h2>
-
-<p>The biggest addition that XWork provides on top of OGNL is the support for the ValueStack. While OGNL operates under the assumption there is only one "root", XWork's ValueStack concept requires there be many "roots". </p>
-
-<p>For example, suppose we are using standard OGNL (not using XWork) and there are two objects in the OgnlContext map: "foo" -&gt; foo and "bar" -&gt; bar and that the foo object is also configured to be the single <strong>root</strong> object. The following code illustrates how OGNL deals with these three situations:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-#foo.blah // returns foo.getBlah()
+            <div id="ConfluenceContent"><h2 id="OGNLBasics-XWork-specificlanguagefeatures">XWork-specific language features</h2><p>The biggest addition that XWork provides on top of OGNL is the support for the ValueStack. While OGNL operates under the assumption there is only one "root", XWork's ValueStack concept requires there be many "roots".</p><p>For example, suppose we are using standard OGNL (not using XWork) and there are two objects in the OgnlContext map: "foo" -&gt; foo and "bar" -&gt; bar and that the foo object is also configured to be the single <strong>root</strong> object. The following code illustrates how OGNL deals with these three situations:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[#foo.blah // returns foo.getBlah()
 #bar.blah // returns bar.getBlah()
 blah      // returns foo.getBlah() because foo is the root
 ]]></script>
-</div></div>
-
-<p>What this means is that OGNL allows many objects in the context, but unless the object you are trying to access is the root, it must be prepended with a namespaces such as @bar. Now let's talk about how XWork is a little different...</p>
-
-    <div class="aui-message hint shadowed information-macro">
+</div></div><p>What this means is that OGNL allows many objects in the context, but unless the object you are trying to access is the root, it must be prepended with a namespaces such as @bar. Now let's talk about how XWork is a little different...</p>    <div class="aui-message hint shadowed information-macro">
                     <p class="title">Useful Information</p>
                             <span class="aui-icon icon-hint">Icon</span>
                 <div class="message-content">
-                            
-<p>In XWork, the entire ValueStack is the root object in the context. Rather than having your expressions get the object you want from the stack and then get properties from that (ie: peek().blah), XWork has a special OGNL PropertyAccessor that will automatically look at the all entries in the stack (from the top down) until it finds an object with the property you are looking for.</p>
+                            <p>In XWork, the entire ValueStack is the root object in the context. Rather than having your expressions get the object you want from the stack and then get properties from that (ie: peek().blah), XWork has a special OGNL PropertyAccessor that will automatically look at the all entries in the stack (from the top down) until it finds an object with the property you are looking for.</p>
                     </div>
     </div>
-
-
-<p>For example, suppose the stack contains two objects: Animal and Person. Both objects have a "name" property, Animal has a "species" property, and Person has a "salary" property. Animal is on the top of the stack, and Person is below it. The follow code fragments help you get an idea of what is going on here:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-species    // call to animal.getSpecies()
+<p>For example, suppose the stack contains two objects: Animal and Person. Both objects have a "name" property, Animal has a "species" property, and Person has a "salary" property. Animal is on the top of the stack, and Person is below it. The follow code fragments help you get an idea of what is going on here:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[species    // call to animal.getSpecies()
 salary     // call to person.getSalary()
 name       // call to animal.getName() because animal is on the top
 ]]></script>
-</div></div>
-
-<p>In the last example, there was a tie and so the animal's name was returned. Usually this is the desired effect, but sometimes you want the property of a lower-level object. To do this, XWork has added support for indexes on the ValueStack. All you have to do is:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-[0].name   // call to animal.getName()
+</div></div><p>In the last example, there was a tie and so the animal's name was returned. Usually this is the desired effect, but sometimes you want the property of a lower-level object. To do this, XWork has added support for indexes on the ValueStack. All you have to do is:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[[0].name   // call to animal.getName()
 [1].name   // call to person.getName()
 ]]></script>
-</div></div>
-
-<p>With expression like [0] ... [3] etc. Struts 2 will cut the stack and still return back a CompoundRoot object. To get the top of that particular stack cut, use <a shape="rect" class="createlink" href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&amp;title=0&amp;linkCreation=true&amp;fromPageId=14000">0</a>.top</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>ognl expression</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> [0].top </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> would get the top of the stack cut starting from element 0 in the stack (similar to top in this case)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> [1].top </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> would get the top of the stack cut starting from element 1 in the stack</p></td></tr></tbody></table></div>
-
-
-<h2 id="OGNLBasics-Accessingstaticproperties">Accessing static properties</h2>
-
-<p>OGNL supports accessing static properties as well as static methods.</p>
-
-<p>By default, Struts 2 is configured to disallow this--to enable OGNL's static member support you must set the <code>struts.ognl.allowStaticMethodAccess</code> constant to <code>true</code> via any of the <a shape="rect" href="constant-configuration.html">Constant Configuration</a> methods.</p>
-
-<p>OGNL's static access looks like this: </p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[
-@some.package.ClassName@FOO_PROPERTY
+</div></div><p>With expression like [0] ... [3] etc. Struts 2 will cut the stack and still return back a CompoundRoot object. To get the top of that particular stack cut, use <a shape="rect" class="createlink" href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&amp;title=0&amp;linkCreation=true&amp;fromPageId=14000">0</a>.top</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>ognl expression</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>[0].top</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>would get the top of the stack cut starting from element 0 in the stack (similar to top in this case)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>[1].top</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>would get the top of the stack cut starting from element 1
  in the stack</p></td></tr></tbody></table></div><h2 id="OGNLBasics-Accessingstaticproperties">Accessing static properties</h2><p>OGNL supports accessing static properties as well as static methods.</p><p>By default, Struts 2 is configured to disallow this--to enable OGNL's static member support you must set the <code>struts.ognl.allowStaticMethodAccess</code> constant to <code>true</code> via any of the <a shape="rect" href="constant-configuration.html">Constant Configuration</a> methods.</p><p>OGNL's static access looks like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@some.package.ClassName@FOO_PROPERTY
 @some.package.ClassName@someMethod()
 ]]></script>
-</div></div>
-
-<p>However, XWork allows you to avoid having to specify the full package name and call static properties and methods of your action classes using the "vs" prefix:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;at:var at:name=&quot;vs&quot; /&gt;FOO_PROPERTY
+</div></div><p>However, XWork allows you to avoid having to specify the full package name and call static properties and methods of your action classes using the "vs" prefix:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;at:var at:name=&quot;vs&quot; /&gt;FOO_PROPERTY
 &lt;at:var at:name=&quot;vs&quot; /&gt;someMethod()
 
 &lt;at:var at:name=&quot;vs1&quot; /&gt;FOO_PROPERTY
@@ -212,26 +169,7 @@ name       // call to animal.getName() b
 &lt;at:var at:name=&quot;vs2&quot; /&gt;BAR_PROPERTY
 &lt;at:var at:name=&quot;vs2&quot; /&gt;someOtherMethod()
 ]]></script>
-</div></div>
-
-<p>"vs" stands for "value stack".  The important thing to note here is that if the class name you specify is just "vs", the class for the object on the top of the stack is used. If you specify a number after the "vs" string, an object's class deeper in the stack is used instead.</p>
-
-
-
-<h2 id="OGNLBasics-DifferencesfromtheWebWork1.xEL">Differences from the WebWork 1.x EL</h2>
-
-<p>Besides the examples and descriptions given above, there are a few major changes in the EL since WebWork 1.x. The biggest one is that properties are no longer accessed with a forward slash (/) but with a dot (.). Also, rather than using ".." to traverse down the stack, we now use "[n]" where n is some positive number. Lastly, in WebWork 1.x one could access special named objects (the request scope attributes to be exact) by using "@foo", but now special variables are accessed using "#foo". However, it is important to note that "#foo" does NOT access the request attributes. Because XWork is not built only for the web, there is no concept of "request attributes", and thus "#foo" is merely a request to another object in the OgnlContext other than the root.</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Old Expression     </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> New Expression </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> foo/blah           </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> foo.blah          </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> foo/someMethod()   </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> foo.someMethod()  </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ../bar/blah        </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> [1].bar.blah    </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> @baz               </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> not directly supported, but #baz is similar </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> .      
             </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> top or [0] </p></td></tr></tbody></table></div>
-
-
-
-
-<h2 id="OGNLBasics-Struts2NamedObjects">Struts 2 Named Objects</h2>
-
-<p>Struts 2 places request parameters and request, session, and application attributes on the OGNL stack. They may be accessed as shown below.</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> #parameters['foo'] or #parameters.foo </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> request parameter ['foo'] (request.getParameter()) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> #request['foo'] or #request.foo </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> request attribute ['foo']  (request.getAttribute()) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> #session['foo'] or #session.foo </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> session attribute 'foo' </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> #application['foo'] or #application.foo </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ServletC
 ontext attributes 'foo' </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> #attr['foo'] or #attr.foo </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Access to PageContext if available, otherwise searches request/session/application respectively</p></td></tr></tbody></table></div></div>
+</div></div><p>"vs" stands for "value stack". The important thing to note here is that if the class name you specify is just "vs", the class for the object on the top of the stack is used. If you specify a number after the "vs" string, an object's class deeper in the stack is used instead.</p><h2 id="OGNLBasics-DifferencesfromtheWebWork1.xEL">Differences from the WebWork 1.x EL</h2><p>Besides the examples and descriptions given above, there are a few major changes in the EL since WebWork 1.x. The biggest one is that properties are no longer accessed with a forward slash (/) but with a dot (.). Also, rather than using ".." to traverse down the stack, we now use "[n]" where n is some positive number. Lastly, in WebWork 1.x one could access special named objects (the request scope attributes to be exact) by using "@foo", but now special variables are accessed using "#foo". However, it is important to note that "#foo" does NOT access the request attributes. Because XWork is not built on
 ly for the web, there is no concept of "request attributes", and thus "#foo" is merely a request to another object in the OgnlContext other than the root.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Old Expression</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>New Expression</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>foo/blah</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>foo.blah</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>foo/someMethod()</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>foo.someMethod()</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>../bar/blah</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>[1].bar.blah</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>@baz</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>not directly supported, but #baz 
 is similar</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>top or [0]</p></td></tr></tbody></table></div><h2 id="OGNLBasics-Struts2NamedObjects">Struts 2 Named Objects</h2><p>Struts 2 places request parameters and request, session, and application attributes on the OGNL stack. They may be accessed as shown below.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>#parameters['foo'] or #parameters.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>request parameter ['foo'] (request.getParameter())</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>#request['foo'] or #request.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>request attribute ['foo'] (r
 equest.getAttribute())</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>#session['foo'] or #session.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>session attribute 'foo'</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>#application['foo'] or #application.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>ServletContext attributes 'foo'</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>#attr['foo'] or #attr.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Access to PageContext if available, otherwise searches request/session/application respectively</p></td></tr></tbody></table></div></div>
         </div>