NOTE: Do take note that parameters declared in xwork.xml or its included files will override where the latter takes precedence. For example if we have a parameter declared in xwork.xml and one in xwork-include1.xml which is included through xwork.xml, the parameter declared in xwork-include1.xml will override the one declared in xwork.xml. In other words the parameter declared in xwork-include1.xml takes precedence.

Ognl by default uses expression parsing for expression evaluation. However starting from Ognl 2.7.1, Ognl is capable of doing expression compilation using Javassist for expression evaluation. WebWork 2.2.7 / XWork1.2.4 and above support this functionality, however it is turn off by default to preserved backwards compatibilities. To turn it on, we need to use the following Doctype :-

<!DOCTYPE xwork PUBLIC
                    "-//OpenSymphony Group//XWork 1.1.2//EN"
                    "http://www.opensymphony.com/xwork/xwork-1.1.2.dtd">

And also declare a parameter "useOgnlEnhancement" with value "true" in xwork.xml as follows.

<xwork>
   <parameters>
     <!-- enable OGNL expression compilation feature -->
     <parameter name="useOgnlEnhancement" value="true" />
     ...
   </parameters>
   ...
 </xwork>