[maven-release-plugin]  copy for tag tiles-parent-3.0.1

git-svn-id: https://svn.apache.org/repos/asf/tiles/framework/tags/tiles-parent-3.0.1@1360436 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/TILES_3_0_X/FREEMARKER-LICENSE.txt b/TILES_3_0_X/FREEMARKER-LICENSE.txt
new file mode 100644
index 0000000..ca617cb
--- /dev/null
+++ b/TILES_3_0_X/FREEMARKER-LICENSE.txt
@@ -0,0 +1,46 @@
+FreeMarker 1.x was released under the LGPL license. Later, by community
+consensus, we have switched over to a BSD-style license. As of FreeMarker
+2.2pre1, the original author, Benjamin Geer, has relinquished the copyright in
+behalf of Visigoth Software Society. The current copyright holder is the
+Visigoth Software Society.
+
+------------------------------------------------------------------------------
+Copyright (c) 2003 The Visigoth Software Society. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1.  Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the following disclaimer.
+
+2.  The end-user documentation included with the redistribution, if any, must
+    include the following acknowlegement:
+      "This product includes software developed by the
+      Visigoth Software Society (http://www.visigoths.org/)."
+    Alternately, this acknowlegement may appear in the software itself, if and
+    wherever such third-party acknowlegements normally appear.
+
+3.  Neither the name "FreeMarker", "Visigoth", nor any of the names of the
+    project contributors may be used to endorse or promote products derived
+    from this software without prior written permission. For written
+    permission, please contact visigoths@visigoths.org.
+
+4.  Products derived from this software may not be called "FreeMarker" or
+    "Visigoth" nor may "FreeMarker" or "Visigoth" appear in their names
+    without prior written permission of the Visigoth Software Society.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+VISIGOTH SOFTWARE SOCIETY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+------------------------------------------------------------------------------
+
+This software consists of voluntary contributions made by many individuals on
+behalf of the Visigoth Software Society. For more information on the Visigoth
+Software Society, please see http://www.visigoths.org/
diff --git a/TILES_3_0_X/JAVASSIST-LICENSE.html b/TILES_3_0_X/JAVASSIST-LICENSE.html
new file mode 100644
index 0000000..65d6611
--- /dev/null
+++ b/TILES_3_0_X/JAVASSIST-LICENSE.html
@@ -0,0 +1,372 @@
+<HTML>
+<HEAD>
+<TITLE>Javassist License</TITLE>
+<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<META content="MSHTML 5.50.4916.2300" name=GENERATOR></HEAD>
+
+<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff>
+<CENTER><B><FONT size=+2>MOZILLA PUBLIC LICENSE</FONT></B> <BR><B>Version 
+1.1</B> 
+<P>
+<HR width="20%">
+</CENTER>
+<P><B>1. Definitions.</B> 
+<UL><B>1.0.1. "Commercial Use" </B>means distribution or otherwise making the 
+  Covered Code available to a third party. 
+  <P><B>1.1. ''Contributor''</B> means each entity that creates or contributes 
+  to the creation of Modifications. 
+  <P><B>1.2. ''Contributor Version''</B> means the combination of the Original 
+  Code, prior Modifications used by a Contributor, and the Modifications made by 
+  that particular Contributor. 
+  <P><B>1.3. ''Covered Code''</B> means the Original Code or Modifications or 
+  the combination of the Original Code and Modifications, in each case including 
+  portions thereof<B>.</B> 
+  <P><B>1.4. ''Electronic Distribution Mechanism''</B> means a mechanism 
+  generally accepted in the software development community for the electronic 
+  transfer of data. 
+  <P><B>1.5. ''Executable''</B> means Covered Code in any form other than Source 
+  Code. 
+  <P><B>1.6. ''Initial Developer''</B> means the individual or entity identified 
+  as the Initial Developer in the Source Code notice required by <B>Exhibit 
+  A</B>. 
+  <P><B>1.7. ''Larger Work''</B> means a work which combines Covered Code or 
+  portions thereof with code not governed by the terms of this License. 
+  <P><B>1.8. ''License''</B> means this document. 
+  <P><B>1.8.1. "Licensable"</B> means having the right to grant, to the maximum 
+  extent possible, whether at the time of the initial grant or subsequently 
+  acquired, any and all of the rights conveyed herein. 
+  <P><B>1.9. ''Modifications''</B> means any addition to or deletion from the 
+  substance or structure of either the Original Code or any previous 
+  Modifications. When Covered Code is released as a series of files, a 
+  Modification is: 
+  <UL><B>A.</B> Any addition to or deletion from the contents of a file 
+    containing Original Code or previous Modifications. 
+    <P><B>B.</B> Any new file that contains any part of the Original Code or 
+    previous Modifications. <BR>&nbsp;</P></UL><B>1.10. ''Original Code''</B> 
+  means Source Code of computer software code which is described in the Source 
+  Code notice required by <B>Exhibit A</B> as Original Code, and which, at the 
+  time of its release under this License is not already Covered Code governed by 
+  this License. 
+  <P><B>1.10.1. "Patent Claims"</B> means any patent claim(s), now owned or 
+  hereafter acquired, including without limitation,&nbsp; method, process, and 
+  apparatus claims, in any patent Licensable by grantor. 
+  <P><B>1.11. ''Source Code''</B> means the preferred form of the Covered Code 
+  for making modifications to it, including all modules it contains, plus any 
+  associated interface definition files, scripts used to control compilation and 
+  installation of an Executable, or source code differential comparisons against 
+  either the Original Code or another well known, available Covered Code of the 
+  Contributor's choice. The Source Code can be in a compressed or archival form, 
+  provided the appropriate decompression or de-archiving software is widely 
+  available for no charge. 
+  <P><B>1.12. "You'' (or "Your")&nbsp;</B> means an individual or a legal entity 
+  exercising rights under, and complying with all of the terms of, this License 
+  or a future version of this License issued under Section 6.1. For legal 
+  entities, "You'' includes any entity which controls, is controlled by, or is 
+  under common control with You. For purposes of this definition, "control'' 
+  means (a) the power, direct or indirect, to cause the direction or management 
+  of such entity, whether by contract or otherwise, or (b) ownership of more 
+  than fifty percent (50%) of the outstanding shares or beneficial ownership of 
+  such entity.</P></UL><B>2. Source Code License.</B> 
+<UL><B>2.1. The Initial Developer Grant.</B> <BR>The Initial Developer hereby 
+  grants You a world-wide, royalty-free, non-exclusive license, subject to third 
+  party intellectual property claims: 
+  <UL><B>(a)</B>&nbsp;<B> </B>under intellectual property rights (other than 
+    patent or trademark) Licensable by Initial Developer to use, reproduce, 
+    modify, display, perform, sublicense and distribute the Original Code (or 
+    portions thereof) with or without Modifications, and/or as part of a Larger 
+    Work; and 
+    <P><B>(b)</B> under Patents Claims infringed by the making, using or selling 
+    of Original Code, to make, have made, use, practice, sell, and offer for 
+    sale, and/or otherwise dispose of the Original Code (or portions thereof). 
+    <UL>
+      <UL></UL></UL><B>(c) </B>the licenses granted in this Section 2.1(a) and (b) 
+    are effective on the date Initial Developer first distributes Original Code 
+    under the terms of this License. 
+    <P><B>(d) </B>Notwithstanding Section 2.1(b) above, no patent license is 
+    granted: 1) for code that You delete from the Original Code; 2) separate 
+    from the Original Code;&nbsp; or 3) for infringements caused by: i) the 
+    modification of the Original Code or ii) the combination of the Original 
+    Code with other software or devices. <BR>&nbsp;</P></UL><B>2.2. Contributor 
+  Grant.</B> <BR>Subject to third party intellectual property claims, each 
+  Contributor hereby grants You a world-wide, royalty-free, non-exclusive 
+  license 
+  <UL> <BR><B>(a)</B>&nbsp;<B> </B>under intellectual property rights (other 
+    than patent or trademark) Licensable by Contributor, to use, reproduce, 
+    modify, display, perform, sublicense and distribute the Modifications 
+    created by such Contributor (or portions thereof) either on an unmodified 
+    basis, with other Modifications, as Covered Code and/or as part of a Larger 
+    Work; and 
+    <P><B>(b)</B> under Patent Claims infringed by the making, using, or selling 
+    of&nbsp; Modifications made by that Contributor either alone and/or in<FONT 
+    color=#000000> combination with its Contributor Version (or portions of such 
+    combination), to make, use, sell, offer for sale, have made, and/or 
+    otherwise dispose of: 1) Modifications made by that Contributor (or portions 
+    thereof); and 2) the combination of&nbsp; Modifications made by that 
+    Contributor with its Contributor Version (or portions of such 
+    combination).</FONT> 
+    <P><B>(c) </B>the licenses granted in Sections 2.2(a) and 2.2(b) are 
+    effective on the date Contributor first makes Commercial Use of the Covered 
+    Code. 
+    <P><B>(d)&nbsp;</B>&nbsp;&nbsp; Notwithstanding Section 2.2(b) above, no 
+    patent license is granted: 1) for any code that Contributor has deleted from 
+    the Contributor Version; 2)&nbsp; separate from the Contributor 
+    Version;&nbsp; 3)&nbsp; for infringements caused by: i) third party 
+    modifications of Contributor Version or ii)&nbsp; the combination of 
+    Modifications made by that Contributor with other software&nbsp; (except as 
+    part of the Contributor Version) or other devices; or 4) under Patent Claims 
+    infringed by Covered Code in the absence of Modifications made by that 
+    Contributor.</P></UL></UL>
+<P><BR><B>3. Distribution Obligations.</B> 
+<UL><B>3.1. Application of License.</B> <BR>The Modifications which You create 
+  or to which You contribute are governed by the terms of this License, 
+  including without limitation Section <B>2.2</B>. The Source Code version of 
+  Covered Code may be distributed only under the terms of this License or a 
+  future version of this License released under Section <B>6.1</B>, and You must 
+  include a copy of this License with every copy of the Source Code You 
+  distribute. You may not offer or impose any terms on any Source Code version 
+  that alters or restricts the applicable version of this License or the 
+  recipients' rights hereunder. However, You may include an additional document 
+  offering the additional rights described in Section <B>3.5</B>. 
+  <P><B>3.2. Availability of Source Code.</B> <BR>Any Modification which You 
+  create or to which You contribute must be made available in Source Code form 
+  under the terms of this License either on the same media as an Executable 
+  version or via an accepted Electronic Distribution Mechanism to anyone to whom 
+  you made an Executable version available; and if made available via Electronic 
+  Distribution Mechanism, must remain available for at least twelve (12) months 
+  after the date it initially became available, or at least six (6) months after 
+  a subsequent version of that particular Modification has been made available 
+  to such recipients. You are responsible for ensuring that the Source Code 
+  version remains available even if the Electronic Distribution Mechanism is 
+  maintained by a third party. 
+  <P><B>3.3. Description of Modifications.</B> <BR>You must cause all Covered 
+  Code to which You contribute to contain a file documenting the changes You 
+  made to create that Covered Code and the date of any change. You must include 
+  a prominent statement that the Modification is derived, directly or 
+  indirectly, from Original Code provided by the Initial Developer and including 
+  the name of the Initial Developer in (a) the Source Code, and (b) in any 
+  notice in an Executable version or related documentation in which You describe 
+  the origin or ownership of the Covered Code. 
+  <P><B>3.4. Intellectual Property Matters</B> 
+  <UL><B>(a) Third Party Claims</B>. <BR>If Contributor has knowledge that a 
+    license under a third party's intellectual property rights is required to 
+    exercise the rights granted by such Contributor under Sections 2.1 or 2.2, 
+    Contributor must include a text file with the Source Code distribution 
+    titled "LEGAL'' which describes the claim and the party making the claim in 
+    sufficient detail that a recipient will know whom to contact. If Contributor 
+    obtains such knowledge after the Modification is made available as described 
+    in Section 3.2, Contributor shall promptly modify the LEGAL file in all 
+    copies Contributor makes available thereafter and shall take other steps 
+    (such as notifying appropriate mailing lists or newsgroups) reasonably 
+    calculated to inform those who received the Covered Code that new knowledge 
+    has been obtained. 
+    <P><B>(b) Contributor APIs</B>. <BR>If Contributor's Modifications include 
+    an application programming interface and Contributor has knowledge of patent 
+    licenses which are reasonably necessary to implement that API, Contributor 
+    must also include this information in the LEGAL file. 
+  <BR>&nbsp;</P></UL>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
+  <B>(c)&nbsp;&nbsp;&nbsp; Representations.</B> 
+  <UL>Contributor represents that, except as disclosed pursuant to Section 
+    3.4(a) above, Contributor believes that Contributor's Modifications are 
+    Contributor's original creation(s) and/or Contributor has sufficient rights 
+    to grant the rights conveyed by this License.</UL>
+  <P><BR><B>3.5. Required Notices.</B> <BR>You must duplicate the notice in 
+  <B>Exhibit A</B> in each file of the Source Code.&nbsp; If it is not possible 
+  to put such notice in a particular Source Code file due to its structure, then 
+  You must include such notice in a location (such as a relevant directory) 
+  where a user would be likely to look for such a notice.&nbsp; If You created 
+  one or more Modification(s) You may add your name as a Contributor to the 
+  notice described in <B>Exhibit A</B>.&nbsp; You must also duplicate this 
+  License in any documentation for the Source Code where You describe 
+  recipients' rights or ownership rights relating to Covered Code.&nbsp; You may 
+  choose to offer, and to charge a fee for, warranty, support, indemnity or 
+  liability obligations to one or more recipients of Covered Code. However, You 
+  may do so only on Your own behalf, and not on behalf of the Initial Developer 
+  or any Contributor. You must make it absolutely clear than any such warranty, 
+  support, indemnity or liability obligation is offered by You alone, and You 
+  hereby agree to indemnify the Initial Developer and every Contributor for any 
+  liability incurred by the Initial Developer or such Contributor as a result of 
+  warranty, support, indemnity or liability terms You offer. 
+  <P><B>3.6. Distribution of Executable Versions.</B> <BR>You may distribute 
+  Covered Code in Executable form only if the requirements of Section 
+  <B>3.1-3.5</B> have been met for that Covered Code, and if You include a 
+  notice stating that the Source Code version of the Covered Code is available 
+  under the terms of this License, including a description of how and where You 
+  have fulfilled the obligations of Section <B>3.2</B>. The notice must be 
+  conspicuously included in any notice in an Executable version, related 
+  documentation or collateral in which You describe recipients' rights relating 
+  to the Covered Code. You may distribute the Executable version of Covered Code 
+  or ownership rights under a license of Your choice, which may contain terms 
+  different from this License, provided that You are in compliance with the 
+  terms of this License and that the license for the Executable version does not 
+  attempt to limit or alter the recipient's rights in the Source Code version 
+  from the rights set forth in this License. If You distribute the Executable 
+  version under a different license You must make it absolutely clear that any 
+  terms which differ from this License are offered by You alone, not by the 
+  Initial Developer or any Contributor. You hereby agree to indemnify the 
+  Initial Developer and every Contributor for any liability incurred by the 
+  Initial Developer or such Contributor as a result of any such terms You offer. 
+
+  <P><B>3.7. Larger Works.</B> <BR>You may create a Larger Work by combining 
+  Covered Code with other code not governed by the terms of this License and 
+  distribute the Larger Work as a single product. In such a case, You must make 
+  sure the requirements of this License are fulfilled for the Covered 
+Code.</P></UL><B>4. Inability to Comply Due to Statute or Regulation.</B> 
+<UL>If it is impossible for You to comply with any of the terms of this 
+  License with respect to some or all of the Covered Code due to statute, 
+  judicial order, or regulation then You must: (a) comply with the terms of this 
+  License to the maximum extent possible; and (b) describe the limitations and 
+  the code they affect. Such description must be included in the LEGAL file 
+  described in Section <B>3.4</B> and must be included with all distributions of 
+  the Source Code. Except to the extent prohibited by statute or regulation, 
+  such description must be sufficiently detailed for a recipient of ordinary 
+  skill to be able to understand it.</UL><B>5. Application of this License.</B> 
+<UL>This License applies to code to which the Initial Developer has attached 
+  the notice in <B>Exhibit A</B> and to related Covered Code.</UL><B>6. Versions 
+of the License.</B> 
+<UL><B>6.1. New Versions</B>. <BR>Netscape Communications Corporation 
+  (''Netscape'') may publish revised and/or new versions of the License from 
+  time to time. Each version will be given a distinguishing version number. 
+  <P><B>6.2. Effect of New Versions</B>. <BR>Once Covered Code has been 
+  published under a particular version of the License, You may always continue 
+  to use it under the terms of that version. You may also choose to use such 
+  Covered Code under the terms of any subsequent version of the License 
+  published by Netscape. No one other than Netscape has the right to modify the 
+  terms applicable to Covered Code created under this License. 
+  <P><B>6.3. Derivative Works</B>. <BR>If You create or use a modified version 
+  of this License (which you may only do in order to apply it to code which is 
+  not already Covered Code governed by this License), You must (a) rename Your 
+  license so that the phrases ''Mozilla'', ''MOZILLAPL'', ''MOZPL'', 
+  ''Netscape'', "MPL", ''NPL'' or any confusingly similar phrase do not appear 
+  in your license (except to note that your license differs from this License) 
+  and (b) otherwise make it clear that Your version of the license contains 
+  terms which differ from the Mozilla Public License and Netscape Public 
+  License. (Filling in the name of the Initial Developer, Original Code or 
+  Contributor in the notice described in <B>Exhibit A</B> shall not of 
+  themselves be deemed to be modifications of this License.)</P></UL><B>7. 
+DISCLAIMER OF WARRANTY.</B> 
+<UL>COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, WITHOUT 
+  WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT 
+  LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, 
+  FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE 
+  QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED 
+  CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY 
+  OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR 
+  CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS 
+  LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS 
+  DISCLAIMER.</UL><B>8. TERMINATION.</B> 
+<UL><B>8.1.&nbsp; </B>This License and the rights granted hereunder will 
+  terminate automatically if You fail to comply with terms herein and fail to 
+  cure such breach within 30 days of becoming aware of the breach. All 
+  sublicenses to the Covered Code which are properly granted shall survive any 
+  termination of this License. Provisions which, by their nature, must remain in 
+  effect beyond the termination of this License shall survive. 
+  <P><B>8.2.&nbsp; </B>If You initiate litigation by asserting a patent 
+  infringement claim (excluding declatory judgment actions) against Initial 
+  Developer or a Contributor (the Initial Developer or Contributor against whom 
+  You file such action is referred to as "Participant")&nbsp; alleging that: 
+  <P><B>(a)&nbsp; </B>such Participant's Contributor Version directly or 
+  indirectly infringes any patent, then any and all rights granted by such 
+  Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 
+  60 days notice from Participant terminate prospectively, unless if within 60 
+  days after receipt of notice You either: (i)&nbsp; agree in writing to pay 
+  Participant a mutually agreeable reasonable royalty for Your past and future 
+  use of Modifications made by such Participant, or (ii) withdraw Your 
+  litigation claim with respect to the Contributor Version against such 
+  Participant.&nbsp; If within 60 days of notice, a reasonable royalty and 
+  payment arrangement are not mutually agreed upon in writing by the parties or 
+  the litigation claim is not withdrawn, the rights granted by Participant to 
+  You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of 
+  the 60 day notice period specified above. 
+  <P><B>(b)</B>&nbsp; any software, hardware, or device, other than such 
+  Participant's Contributor Version, directly or indirectly infringes any 
+  patent, then any rights granted to You by such Participant under Sections 
+  2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, 
+  sold, distributed, or had made, Modifications made by that Participant. 
+  <P><B>8.3.&nbsp; </B>If You assert a patent infringement claim against 
+  Participant alleging that such Participant's Contributor Version directly or 
+  indirectly infringes any patent where such claim is resolved (such as by 
+  license or settlement) prior to the initiation of patent infringement 
+  litigation, then the reasonable value of the licenses granted by such 
+  Participant under Sections 2.1 or 2.2 shall be taken into account in 
+  determining the amount or value of any payment or license. 
+  <P><B>8.4.</B>&nbsp; In the event of termination under Sections 8.1 or 8.2 
+  above,&nbsp; all end user license agreements (excluding distributors and 
+  resellers) which have been validly granted by You or any distributor hereunder 
+  prior to termination shall survive termination.</P></UL><B>9. LIMITATION OF 
+LIABILITY.</B> 
+<UL>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING 
+  NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY 
+  OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY 
+  OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, 
+  INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT 
+  LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR 
+  MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH 
+  PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS 
+  LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL 
+  INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW 
+  PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR 
+  LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND 
+  LIMITATION MAY NOT APPLY TO YOU.</UL><B>10. U.S. GOVERNMENT END USERS.</B> 
+<UL>The Covered Code is a ''commercial item,'' as that term is defined in 48 
+  C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer software'' and 
+  ''commercial computer software documentation,'' as such terms are used in 48 
+  C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 
+  227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users 
+  acquire Covered Code with only those rights set forth herein.</UL><B>11. 
+MISCELLANEOUS.</B> 
+<UL>This License represents the complete agreement concerning subject matter 
+  hereof. If any provision of this License is held to be unenforceable, such 
+  provision shall be reformed only to the extent necessary to make it 
+  enforceable. This License shall be governed by California law provisions 
+  (except to the extent applicable law, if any, provides otherwise), excluding 
+  its conflict-of-law provisions. With respect to disputes in which at least one 
+  party is a citizen of, or an entity chartered or registered to do business in 
+  the United States of America, any litigation relating to this License shall be 
+  subject to the jurisdiction of the Federal Courts of the Northern District of 
+  California, with venue lying in Santa Clara County, California, with the 
+  losing party responsible for costs, including without limitation, court costs 
+  and reasonable attorneys' fees and expenses. The application of the United 
+  Nations Convention on Contracts for the International Sale of Goods is 
+  expressly excluded. Any law or regulation which provides that the language of 
+  a contract shall be construed against the drafter shall not apply to this 
+  License.</UL><B>12. RESPONSIBILITY FOR CLAIMS.</B> 
+<UL>As between Initial Developer and the Contributors, each party is 
+  responsible for claims and damages arising, directly or indirectly, out of its 
+  utilization of rights under this License and You agree to work with Initial 
+  Developer and Contributors to distribute such responsibility on an equitable 
+  basis. Nothing herein is intended or shall be deemed to constitute any 
+  admission of liability.</UL><B>13. MULTIPLE-LICENSED CODE.</B> 
+<UL>Initial Developer may designate portions of the Covered Code as 
+  �Multiple-Licensed?.&nbsp; �Multiple-Licensed? means that the Initial 
+  Developer permits you to utilize portions of the Covered Code under Your 
+  choice of the MPL or the alternative licenses, if any, specified by the 
+  Initial Developer in the file described in Exhibit A.</UL>
+<P><BR><B>EXHIBIT A -Mozilla Public License.</B> 
+<UL>The contents of this file are subject to the Mozilla Public License 
+  Version 1.1 (the "License"); you may not use this file except in compliance 
+  with the License. You may obtain a copy of the License at 
+  <BR>http://www.mozilla.org/MPL/ 
+  <P>Software distributed under the License is distributed on an "AS IS" basis, 
+  WITHOUT WARRANTY OF <BR>ANY KIND, either express or implied. See the License 
+  for the specific language governing rights and <BR>limitations under the 
+  License. 
+  <P>The Original Code is Javassist. 
+  <P>The Initial Developer of the Original Code is Shigeru Chiba. 
+  Portions created by the Initial Developer are<BR>&nbsp;
+  Copyright (C) 1999-2008 Shigeru Chiba. All Rights Reserved. 
+  <P>Contributor(s): ______________________________________. 
+
+  <P>Alternatively, the contents of this file may be used under the terms of
+  the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+  in which case the provisions of the LGPL are applicable instead
+  of those above. If you wish to allow use of your version of this file only
+  under the terms of the LGPL, and not to allow others to
+  use your version of this file under the terms of the MPL, indicate your
+  decision by deleting the provisions above and replace them with the notice
+  and other provisions required by the LGPL. If you do not delete
+  the provisions above, a recipient may use your version of this file under
+  the terms of either the MPL or the LGPL.
+
+  <P></P></UL>
+</BODY>
+</HTML>
diff --git a/TILES_3_0_X/LICENSE.txt b/TILES_3_0_X/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/NOTICE.txt b/TILES_3_0_X/NOTICE.txt
new file mode 100644
index 0000000..c622f7a
--- /dev/null
+++ b/TILES_3_0_X/NOTICE.txt
@@ -0,0 +1,15 @@
+   Apache Tiles
+   Copyright 1999-2012 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
+   The binary distribution contains software developed by:
+
+   SpringSource: http://www.springsource.com/
+   Visigoth Software Society (Freemarker): http://freemarker.org/
+   OpenSymphony (OGNL): http://www.opensymphony.com/ognl/
+   Codehaus (MVEL): http://mvel.codehaus.org/
+   JBoss (Javassist): http://jboss.org/javassist/
+   Sam Pullara (Mustache Java): https://github.com/spullara/mustache.java/
+
diff --git a/TILES_3_0_X/OGNL-LICENSE.txt b/TILES_3_0_X/OGNL-LICENSE.txt
new file mode 100644
index 0000000..43bafbb
--- /dev/null
+++ b/TILES_3_0_X/OGNL-LICENSE.txt
@@ -0,0 +1,50 @@
+/* ====================================================================
+ * The OpenSymphony Software License, Version 1.1
+ *
+ * (this license is derived and fully compatible with the Apache Software
+ * License - see http://www.apache.org/LICENSE.txt)
+ *
+ * Copyright (c) 2001-2004 The OpenSymphony Group. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        OpenSymphony Group (http://www.opensymphony.com/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "OpenSymphony" and "The OpenSymphony Group"
+ *    must not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact license@opensymphony.com .
+ *
+ * 5. Products derived from this software may not be called "OpenSymphony"
+ *    or "OGNL", nor may "OpenSymphony" or "OGNL" appear in their
+ *    name, without prior written permission of the OpenSymphony Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ */
diff --git a/TILES_3_0_X/SLF4J-LICENSE.txt b/TILES_3_0_X/SLF4J-LICENSE.txt
new file mode 100644
index 0000000..f5ecafa
--- /dev/null
+++ b/TILES_3_0_X/SLF4J-LICENSE.txt
@@ -0,0 +1,21 @@
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/TILES_3_0_X/assembly/pom.xml b/TILES_3_0_X/assembly/pom.xml
new file mode 100644
index 0000000..7253130
--- /dev/null
+++ b/TILES_3_0_X/assembly/pom.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0"?>
+<!--
+    $Id$
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.tiles</groupId>
+  <artifactId>tiles-assembly</artifactId>
+  <packaging>pom</packaging>
+  <name>Tiles Assembly</name>
+  <description>Tiles Assembly: assembles artifact to produce distributions.
+  </description>
+
+  <parent>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+  </parent>
+
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/tiles/framework/tags/tiles-parent-3.0.1/assembly</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/tiles/framework/tags/tiles-parent-3.0.1/assembly</developerConnection>
+    <url>http://svn.apache.org/viewcvs.cgi/tiles/framework/tags/tiles-parent-3.0.1/assembly</url>
+  </scm>
+
+  <build>
+    <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <version>2.2-beta-4</version>
+        <configuration>
+          <descriptors>
+            <descriptor>src/main/assembly/bin.xml</descriptor>
+            <descriptor>src/main/assembly/docs.xml</descriptor>
+            <descriptor>src/main/assembly/src.xml</descriptor>
+          </descriptors>
+          <finalName>tiles-${project.version}</finalName>
+          <outputDirectory>target/assembly/out</outputDirectory>
+          <workDirectory>target/assembly/work</workDirectory>
+          <tarLongFileMode>gnu</tarLongFileMode>
+        </configuration>
+      </plugin>
+    </plugins>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-ssh</artifactId>
+        <version>1.0</version>
+      </extension>
+    </extensions>
+  </build>
+  <profiles>
+    <profile>
+      <id>apache-release</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <version>2.2-beta-4</version>
+            <executions>
+              <execution>
+                <id>make-assembly</id>
+                <goals>
+                  <goal>attached</goal>
+                </goals>
+                <phase>package</phase>
+              </execution>
+            </executions>
+            <configuration>
+              <descriptors>
+                <descriptor>src/main/assembly/bin.xml</descriptor>
+                <descriptor>src/main/assembly/docs.xml</descriptor>
+                <descriptor>src/main/assembly/src.xml</descriptor>
+              </descriptors>
+              <tarLongFileMode>gnu</tarLongFileMode>
+            </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-deploy-plugin</artifactId>
+            <configuration>
+              <skip>true</skip>
+            </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.3</version>
+            <executions>
+              <execution>
+                <phase>deploy</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <mkdir dir="${project.build.directory}/assemblies" />
+                    <echo message="Here I am!" />
+                    <copy todir="${project.build.directory}/assemblies">
+                      <fileset dir="${settings.localRepository}/org/apache/tiles/tiles-assembly/${project.version}">
+                        <include name="tiles-assembly-${project.version}-*.zip*" />
+                        <include name="tiles-assembly-${project.version}-*.tar.gz*" />
+                        <exclude name="tiles-assembly-${project.version}-source-release.*" />
+                      </fileset>
+                      <mapper type="glob" from="tiles-assembly-*" to="tiles-*" />
+                    </copy>
+                  </tasks>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>wagon-maven-plugin</artifactId>
+            <version>1.0-beta-4</version>
+            <executions>
+              <execution>
+                <phase>deploy</phase>
+                <goals>
+                  <goal>upload</goal>
+                </goals>
+                <configuration>
+                  <fromDir>${project.build.directory}/assemblies</fromDir>
+                  <includes>**</includes>
+                  <toDir>${project.version}</toDir>
+                  <serverId>tiles.build</serverId>
+                  <url>scp://people.apache.org/www/people.apache.org/builds/tiles</url>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+  <dependencies>
+
+    <!-- Main Tiles packages -->
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-servlet</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-jsp</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-compat</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-test</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-extras</artifactId>
+      <version>${project.version}</version>
+      <type>jar</type>
+    </dependency>
+
+    <!-- Optional dependencies that will be redistributed -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <version>1.5.8</version>
+      <scope>runtime</scope>
+    </dependency>
+
+  </dependencies>
+
+</project>
diff --git a/TILES_3_0_X/assembly/src/main/assembly/bin.xml b/TILES_3_0_X/assembly/src/main/assembly/bin.xml
new file mode 100644
index 0000000..5fee095
--- /dev/null
+++ b/TILES_3_0_X/assembly/src/main/assembly/bin.xml
@@ -0,0 +1,68 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<assembly>
+    <id>bin</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+    <includeSiteDirectory>false</includeSiteDirectory>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>/lib</outputDirectory>
+            <outputFileNameMapping>${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <includes>
+                <include>org.slf4j:slf4j-api</include>
+                <include>org.slf4j:jcl-over-slf4j</include>
+                <include>commons-beanutils:commons-beanutils</include>
+                <include>commons-digester:commons-digester</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <outputDirectory>/lib/optional</outputDirectory>
+            <outputFileNameMapping>${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <excludes>
+                <exclude>org.apache.tiles:*</exclude>
+                <exclude>org.slf4j:slf4j-api</exclude>
+                <exclude>org.slf4j:jcl-over-slf4j</exclude>
+                <exclude>commons-beanutils:commons-beanutils</exclude>
+                <exclude>commons-digester:commons-digester</exclude>
+            </excludes>
+        </dependencySet>
+        <dependencySet>
+            <outputDirectory>/</outputDirectory>
+            <outputFileNameMapping>${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <includes>
+                <include>org.apache.tiles:*</include>
+            </includes>
+            <excludes>
+                <exclude>org.apache.tiles:tiles-test</exclude>
+            </excludes>
+        </dependencySet>
+    </dependencySets>
+
+    <fileSets>
+        <fileSet>
+            <directory>..</directory>
+            <outputDirectory>/</outputDirectory>
+            <includes>
+                <include>*LICENSE.*</include>
+                <include>NOTICE.txt</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/TILES_3_0_X/assembly/src/main/assembly/docs.xml b/TILES_3_0_X/assembly/src/main/assembly/docs.xml
new file mode 100644
index 0000000..72fae55
--- /dev/null
+++ b/TILES_3_0_X/assembly/src/main/assembly/docs.xml
@@ -0,0 +1,49 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<assembly>
+    <id>docs</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+    <includeSiteDirectory>false</includeSiteDirectory>
+    <dependencySets>
+    </dependencySets>
+
+    <fileSets>
+        <fileSet>
+            <directory>..</directory>
+            <outputDirectory>/</outputDirectory>
+            <includes>
+                <include>LICENSE.txt</include>
+                <include>NOTICE.txt</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../target/site/apidocs</directory>
+            <outputDirectory>apidocs</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-core/target/site/dtddoc</directory>
+            <outputDirectory>dtddoc</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-jsp/target/site/tlddoc</directory>
+            <outputDirectory>tlddoc</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/TILES_3_0_X/assembly/src/main/assembly/src.xml b/TILES_3_0_X/assembly/src/main/assembly/src.xml
new file mode 100644
index 0000000..79c9b4c
--- /dev/null
+++ b/TILES_3_0_X/assembly/src/main/assembly/src.xml
@@ -0,0 +1,153 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<assembly>
+    <id>src</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+    <fileSets>
+        <fileSet>
+            <directory>../</directory>
+            <outputDirectory>src/</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../</directory>
+            <outputDirectory>/</outputDirectory>
+            <includes>
+                <include>LICENSE.txt</include>
+                <include>NOTICE.txt</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-core</directory>
+            <outputDirectory>src/tiles-core</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-api</directory>
+            <outputDirectory>src/tiles-api</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-servlet</directory>
+            <outputDirectory>src/tiles-servlet</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-jsp</directory>
+            <outputDirectory>src/tiles-jsp</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-el</directory>
+            <outputDirectory>src/tiles-el</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-mvel</directory>
+            <outputDirectory>src/tiles-mvel</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-ognl</directory>
+            <outputDirectory>src/tiles-ognl</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-template</directory>
+            <outputDirectory>src/tiles-template</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-freemarker</directory>
+            <outputDirectory>src/tiles-freemarker</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-velocity</directory>
+            <outputDirectory>src/tiles-velocity</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-extras</directory>
+            <outputDirectory>src/tiles-extras</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-compat</directory>
+            <outputDirectory>src/tiles-compat</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../tiles-test</directory>
+            <outputDirectory>src/tiles-test</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../assembly</directory>
+            <outputDirectory>src/assembly</outputDirectory>
+            <includes>
+                <include>pom.xml</include>
+                <include>src/</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/TILES_3_0_X/assembly/src/main/resources/LICENSE.txt b/TILES_3_0_X/assembly/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/assembly/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/assembly/src/main/resources/NOTICE.txt b/TILES_3_0_X/assembly/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..1f13ff8
--- /dev/null
+++ b/TILES_3_0_X/assembly/src/main/resources/NOTICE.txt
@@ -0,0 +1,6 @@
+   Apache Tiles
+   Copyright 1999-2009 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/TILES_3_0_X/assembly/src/site/site.xml b/TILES_3_0_X/assembly/src/site/site.xml
new file mode 100644
index 0000000..f7e677d
--- /dev/null
+++ b/TILES_3_0_X/assembly/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Assembly">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        ${modules}
+        ${reports}
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/pom.xml b/TILES_3_0_X/pom.xml
new file mode 100644
index 0000000..cf0b018
--- /dev/null
+++ b/TILES_3_0_X/pom.xml
@@ -0,0 +1,386 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <artifactId>tiles-master</artifactId>
+        <groupId>org.apache.tiles</groupId>
+        <version>4</version>
+        <relativePath />
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+    <packaging>pom</packaging>
+    <name>Tiles 3</name>
+    <description>Tiles 3: A framework for page composition.</description>
+    <url>http://tiles.apache.org/framework/</url>
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/tiles/framework/tags/tiles-parent-3.0.1</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/tiles/framework/tags/tiles-parent-3.0.1</developerConnection>
+        <url>http://svn.apache.org/viewvc/tiles/framework/tags/tiles-parent-3.0.1</url>
+    </scm>
+
+    <ciManagement />
+
+    <modules>
+        <module>tiles-api</module>
+        <module>tiles-core</module>
+        <module>tiles-template</module>
+        <module>tiles-servlet</module>
+        <module>tiles-jsp</module>
+        <module>tiles-freemarker</module>
+        <module>tiles-velocity</module>
+        <module>tiles-el</module>
+        <module>tiles-mvel</module>
+        <module>tiles-ognl</module>
+        <module>tiles-compat</module>
+        <module>tiles-extras</module>
+        <module>assembly</module>
+        <module>tiles-test-pom</module>
+    </modules>
+
+    <issueManagement>
+        <system>JIRA</system>
+        <url>https://issues.apache.org/jira/browse/TILES</url>
+    </issueManagement>
+
+    <distributionManagement>
+        <site>
+            <id>apache-site</id>
+            <url>scp://people.apache.org/www/tiles.apache.org/framework</url>
+        </site>
+    </distributionManagement>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-core</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-servlet</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tiles</groupId>
+                <artifactId>tiles-template</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.velocity</groupId>
+                <artifactId>velocity-tools</artifactId>
+                <version>2.0</version>
+                <exclusions>
+                    <exclusion>
+                        <artifactId>struts-taglib</artifactId>
+                        <groupId>org.apache.struts</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>struts-tiles</artifactId>
+                        <groupId>org.apache.struts</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>struts-core</artifactId>
+                        <groupId>org.apache.struts</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>commons-logging</groupId>
+                        <artifactId>commons-logging</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>sslext</artifactId>
+                        <groupId>sslext</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>commons-chain</artifactId>
+                        <groupId>commons-chain</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>commons-validator</artifactId>
+                        <groupId>commons-validator</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>commons-digester</artifactId>
+                        <groupId>commons-digester</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>commons-beanutils</artifactId>
+                        <groupId>commons-beanutils</groupId>
+                    </exclusion>
+                    <exclusion>
+                        <artifactId>dom4j</artifactId>
+                        <groupId>dom4j</groupId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <dependency>
+                <groupId>commons-digester</groupId>
+                <artifactId>commons-digester</artifactId>
+                <version>2.0</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>commons-logging</groupId>
+                        <artifactId>commons-logging</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+            <dependency>
+                <groupId>org.freemarker</groupId>
+                <artifactId>freemarker</artifactId>
+                <version>2.3.15</version>
+            </dependency>
+
+            <dependency>
+                <groupId>ognl</groupId>
+                <artifactId>ognl</artifactId>
+                <version>2.7.3</version>
+            </dependency>
+            <dependency>
+                <groupId>org.mvel</groupId>
+                <artifactId>mvel2</artifactId>
+                <version>2.0.11</version>
+            </dependency>
+            <dependency>
+                <groupId>javax.servlet</groupId>
+                <artifactId>servlet-api</artifactId>
+                <version>2.5</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>javax.servlet.jsp</groupId>
+                <artifactId>jsp-api</artifactId>
+                <version>2.1</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>javax.el</groupId>
+                <artifactId>el-api</artifactId>
+                <version>1.0</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>4.7</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.easymock</groupId>
+                <artifactId>easymock</artifactId>
+                <version>3.0</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shale</groupId>
+                <artifactId>shale-test</artifactId>
+                <version>1.0.5</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.easymock</groupId>
+                <artifactId>easymockclassextension</artifactId>
+                <version>3.0</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+            	<groupId>org.slf4j</groupId>
+            	<artifactId>slf4j-jdk14</artifactId>
+            	<version>1.5.8</version>
+            	<optional>true</optional>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>jcl-over-slf4j</artifactId>
+                <version>1.5.8</version>
+                <optional>true</optional>
+            </dependency>
+            <dependency>
+            	<groupId>org.apache.tiles</groupId>
+            	<artifactId>tiles-request-api</artifactId>
+            	<version>${tiles.request.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <configuration>
+                        <archive>
+                            <manifestFile>${tiles.manifestfile}</manifestFile>
+                            <manifest>
+                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                            </manifest>
+                        </archive>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-bundle-plugin</artifactId>
+                    <version>2.3.7</version>
+                    <inherited>true</inherited>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <excludeDependencies>true</excludeDependencies>
+                    <manifestLocation>target/osgi</manifestLocation>
+                    <instructions>
+                        <_nouses>true</_nouses>
+                        <Bundle-SymbolicName>${tiles.osgi.symbolicName}</Bundle-SymbolicName>
+                        <Export-Package>${tiles.osgi.export}</Export-Package>
+                        <Private-Package>${tiles.osgi.private}</Private-Package>
+                        <Import-Package>${tiles.osgi.import}</Import-Package>
+                        <DynamicImport-Package>${tiles.osgi.dynamicImport}</DynamicImport-Package>
+                        <Bundle-DocURL>${project.url}</Bundle-DocURL>
+                        <Specification-Title>${project.name}</Specification-Title>
+                        <Specification-Version>${project.version}</Specification-Version>
+                        <Specification-Vendor>${project.organization.name}</Specification-Vendor>
+                        <Implementation-Title>${project.name}</Implementation-Title>
+                        <Implementation-Version>${project.version}</Implementation-Version>
+                        <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
+                        <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
+                    </instructions>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>bundle-manifest</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-release-plugin</artifactId>
+                <configuration>
+                    <releaseProfiles>apache-release</releaseProfiles><!-- xxx tiles still uses "release" instead of "apache-release" -->
+                    <goals>deploy site-deploy</goals>
+                </configuration>
+            </plugin>
+        </plugins>
+
+        <defaultGoal>install</defaultGoal>
+    </build>
+
+    <properties>
+        <tiles.osgi.symbolicName>org.apache.${project.artifactId}</tiles.osgi.symbolicName>
+        <tiles.osgi.export>org.apache.tiles.*;version=${project.version}</tiles.osgi.export>
+        <tiles.osgi.import>*</tiles.osgi.import>
+        <tiles.osgi.dynamicImport />
+        <tiles.osgi.private />
+        <tiles.manifestfile>target/osgi/MANIFEST.MF</tiles.manifestfile>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <tiles.request.version>1.0.1</tiles.request.version>
+        <tiles.autotag.version>1.1.0</tiles.autotag.version>
+    </properties>
+
+    <dependencies />
+
+    <profiles>
+        <profile>
+            <id>apache-release</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-install-plugin</artifactId>
+                        <configuration>
+                            <createChecksum>true</createChecksum>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>rat-maven-plugin</artifactId>
+                        <version>1.0-alpha-3</version>
+                        <executions>
+                            <execution>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>check</goal>
+                                </goals>
+                                <configuration>
+                                    <addDefaultLicenseMatchers>false</addDefaultLicenseMatchers>
+                                    <licenseMatchers>
+                                        <classNames>
+                                            <className>rat.analysis.license.ApacheSoftwareLicense20</className>
+                                        </classNames>
+                                    </licenseMatchers>
+                                    <includes>
+                                        <include>pom.xml</include>
+                                        <include>src/**</include>
+                                    </includes>
+                                    <excludes>
+                                        <exclude>**/*LICENSE.txt</exclude>
+                                        <exclude>**/*MANIFEST.MF</exclude>
+                                    </excludes>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>linkcheck</id>
+            <reporting>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-linkcheck-plugin</artifactId>
+                        <version>1.1</version>
+                        <configuration>
+                            <excludedLinks>
+                                <excludedLink>/*</excludedLink>
+                                <excludedLink>**/index.html</excludedLink>
+                                <excludedLink>**/logo.png</excludedLink>
+                                <excludedLink>**/tiles-jsp/tagreference.html</excludedLink>
+                            </excludedLinks>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </reporting>
+        </profile>
+
+    </profiles>
+
+</project>
diff --git a/TILES_3_0_X/src/site/apt/config-reference.apt b/TILES_3_0_X/src/site/apt/config-reference.apt
new file mode 100644
index 0000000..71a7b6d
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/config-reference.apt
@@ -0,0 +1,250 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles Configuration Reference
+         -----------
+
+Configuring Tiles
+
+  Configuring Tiles means creating the following objects:
+  * an instance of org.apache.tiles.request.ApplicationContext,
+  * an instance of org.apache.tiles.TilesContainer.
+  Usually these are created by an instance of org.apache.tiles.startup.TilesInitializer.
+
+  Several MVC frameworks (struts, spring, shale) provide an easy integration with tiles.
+
+* Starting Tiles in a web application
+
+  Tiles has always been a web application package, usually used in conjunction
+  with Struts. Apache Tiles\u0099 evolved to the point of being technology-independent, but
+  its use in a Servlet-based web application will be the most frequent use case.
+
+  To start Tiles you can extend
+  {{{./apidocs/org/apache/tiles/web/startup/AbstractTilesListener.html}AbstractTilesListener}}
+  and implement the <<<createTilesInitializer>>> method:
+
+--------------------------
+protected TilesInitializer createTilesInitializer() {
+    return new MyCustomTilesInitializer();
+}
+--------------------------
+
+  You can use {{{./apidocs/org/apache/tiles/startup/AbstractTilesInitializer.html}AbstractTilesInitializer}}
+  as a basis.
+
+  Then you can start Tiles by specifing it in your <<<web.xml>>> file:
+
+-------------------------------
+<listener>
+    <listener-class>my.package.MyTilesListener</listener-class>
+</listener>
+-------------------------------
+
+* Starting Tiles in a portlet application
+
+  TBD
+
+{Ready-made configuration classes}
+
+  There are some classes that allows to play with Tiles without writing custom code.
+
+* Simple configuration
+
+  {{{./apidocs/org/apache/tiles/web/startup/simple/SimpleTilesListener.html}SimpleTilesListener}}
+  or
+  {{{./apidocs/org/apache/tiles/startup/DefaultTilesInitializer.html}DefaultTilesInitializer}}
+  are the "simple" way to load Tiles. This was the default for Tiles 2.1 and prior versions.
+
+  This configuration has the following characteristics:
+
+  * loads the "/WEB-INF/tiles.xml" file;
+
+  * allows support for JSP, Servlets and Portlets;
+
+  * no expression language is allowed;
+
+  * wildcard expressions can be used to declare definition names.
+
+* Feature-Complete configuration
+
+  It is possible to startup Tiles turning all the new features on by using
+  {{{./apidocs/org/apache/tiles/extras/complete/CompleteAutoloadTilesListener.html}CompleteAutoloadTilesListener}}
+  or
+  {{{./apidocs/org/apache/tiles/extras/complete/CompleteAutoloadTilesInitializer.html}CompleteAutoloadTilesInitializer}}
+  available in the <<<tiles-extras>>> module. This initializer turns on:
+
+  * {{{./tutorial/integration/freemarker.html}Freemarker}} and {{{./tutorial/integration/velocity.html}Velocity}} support;
+
+  * using EL, OGNL and MVEL as {{{./tutorial/advanced/el-support.html}evaluation languages}};
+
+  * using Wildcards and Regular expression as {{{./tutorial/advanced/wildcard.html}pattern matching languages}};
+
+  * loading {{{./migration/configuration.html#Reusing_old_Tiles_configuration_files}Tiles 1.x definition files}};
+
+  * loads all the files named "tiles*.xml" under /WEB-INF and under every META-INF in any part of the classpath.
+
+  * using a mutable container to create Definitions at runtime.
+
+* Modular initialization
+
+  It is possible to startup Tiles in a <<modular>> way, that is loading
+  modules of independent Tiles configuration.
+
+  To turn it on, you need to use
+  {{{./apidocs/org/apache/tiles/extras/module/ModularTilesListener.html}ModularTilesListener}}
+  or
+  {{{./apidocs/org/apache/tiles/extras/module/ModularTilesInitializer.html}ModularTilesInitializer}}
+  available in the <<<tiles-extras>>> module.
+
+  Add in your manifest file, under the <<<META-INF/MANIFEST.MF>>>
+  path, the <<<Tiles-Initializer>>> property, whose value is the name of the class of the
+  needed initializer. For example:
+
+---------------------------
+Manifest-Version: 1.0
+Tiles-Initializer: org.apache.tiles.extras.module.ModularTilesInitializerTest$TilesInitializer1
+---------------------------
+
+  Every initializer that is found will be loaded and "initialized", and destroyed when the
+  main initializer is destroyed.
+
+Configuring Tiles internals
+
+  The container and the application context must be configured to allow custom behaviour
+  and to load definitions from various sources.
+
+* Custom {ApplicationContext}
+
+  Custom ApplicationContext can be provided by implementing
+  {{{/tiles-request/apidocs/org/apache/tiles/request/ApplicationContext.html}ApplicationContext}}.
+  If you are under a servlet environment, you can override
+  {{{/tiles-request/apidocs/org/apache/tiles/request/servlet/ServletApplicationContext.html}ServletApplicationContext}}.
+
+  To use it, you need to override the
+  {{{./apidocs/org/apache/tiles/startup/AbstractTilesInitializer.html#method_summary}createTilesApplicationContext}}
+  method of AbstractTilesInitializer.
+
+  The reason to use a custom Tiles application context could be:
+
+  * supporting a platform not supported yet;
+
+  * providing custom behaviour, such as loading resources in a different manner.
+
+* Custom {TilesContainerFactory}
+
+  Custom Tiles containers can be created by custom Tiles container factories.
+  You have to create a class that extends
+  {{{./apidocs/org/apache/tiles/factory/AbstractTilesContainerFactory.html}AbstractTilesContainerFactory}}.
+  In particular you can use {{{./apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html}BasicTilesContainerFactory}}
+  as a basis for your extended configuration. <<<BasicTilesContainerFactory>>>
+  is the configuration that replicates the default configuration of Tiles,
+  i.e. the one that assumes when no additional parameter is provided.
+  The
+  {{{./apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html}Javadoc documentation of BasicTilesContainerFactory}}
+  documents all the methods that can be overridden to use your own
+  configuration.
+  
+** Changing the path for the Tiles Definitions file
+
+  The <<<BasicTilesContainerFactory>>> loads the "/WEB-INF/tiles.xml" file; the <<<CompleteAutoloadTilesContainerFactory>>>
+  loads all the files named "tiles*.xml" under /WEB-INF and under every META-INF in any part of the classpath.
+  
+  If this behaviour doesn't suits you, you can override the method <<<getSources>>> and retrieve whatever resource you
+  prefer. Just specify the path for the default locale; Tiles will extrapolate and load the localized files as needed.
+
+* Custom components
+
+  These components can be used by overriding the appropriate <<<create>>> method in a custom TilesContainerFactory.
+  
+** Custom {LocaleResolver}
+  
+  The default implementation is {{{./apidocs/org/apache/tiles/locale/impl/DefaultLocaleResolver.html}DefaultLocaleResolver}}.
+
+** Custom {DefinitionDAO}
+
+  The default implementation is {{{./apidocs/org/apache/tiles/definition/dao/ResolvingLocaleUrlDefinitionDAO.html}ResolvingLocaleUrlDefinitionDAO}}.
+  
+** Custom {AttributeEvaluatorFactory}
+
+  The default implementation is {{{./apidocs/org/apache/tiles/evaluator/BasicAttributeEvaluatorFactory.html}BasicAttributeEvaluatorFactory}}.
+  
+  It can be used with a number of AttributeEvaluators like:
+  
+  * the {{{./apidocs/org/apache/tiles/evaluator/impl/DirectAttributeEvaluator.html}DirectAttributeEvaluator}},
+
+  * the {{{./apidocs/org/apache/tiles/el/ELAttributeEvaluator.html}ELAttributeEvaluator}},
+
+  * the {{{./apidocs/org/apache/tiles/mvel/MVELAttributeEvaluator.html}MVELAttributeEvaluator}},
+
+  * the {{{./apidocs/org/apache/tiles/ognl/OGNLAttributeEvaluator.html}OGNLAttributeEvaluator}}.
+  
+  Please see {{{./xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html}CompleteAutoloadTilesContainerFactory}}
+  for an example of how to configure those.
+
+** Custom {PreparerFactory}
+
+  The default implementation is {{{./apidocs/org/apache/tiles/preparer/factory/BasicPreparerFactory.html}BasicPreparerFactory}}.
+
+  Currently the preparer is associated to a definition using its class name.
+  There will be only <<one>> instance per unique class name. If you want to
+  customize this behaviour, you have to create your own implementation of the
+  <<<PreparerFactory>>> interface.
+
+  For example, the {{{./tutorial/integration/frameworks.html}Struts 1 - Apache Tiles\u0099 integration}}
+  defines a <<<PreparerFactory>>> that can use a URL as a preparer.
+
+** Custom {PatternDefinitionResolver}
+
+  The default implementation is {{{./apidocs/org/apache/tiles/definition/pattern/BasicPatternDefinitionResolver.html}BasicPatternDefinitionResolver}},
+  that implements the <wildcard> syntax.
+  
+  <<<CompleteAutoloadTilesContainerFactory>>> defines a <<<PrefixedPatternDefinitionResolver>>> to enable the use of 
+  both the <wildcard> syntax and the <regexp> syntax, with appropriate prefixes.
+
+* Registering {Renderers}
+
+  Custom {{{/tiles-request/apidocs/org/apache/tiles/request/render/Renderer.html}Renderers}} can be registered by overriding the methods
+  <<<registerAttributeRenderers>>> and <<<createDefaultAttributeRenderer>>>.
+  
+  <<<BasicTilesContainerFactory>>> registers 3 renderers: <<<string>>>, <<<template>>>, and <<<definition>>>, in order to
+  render plain strings, JSPs and tiles definitions.
+  
+  <<<CompleteAutoloadTilesContainerFactory>>> registers 5 renderers: <<<string>>>, <<<template>>>, <<<freemarker>>>, 
+  <<<velocity>>> and <<<definition>>>, in order to render plain strings, JSPs, freemarker and velocity templates 
+  and tiles definitions.
+
+* Changing the {definition files}
+
+  The default implementation <<<BasicTilesContainerFactory>>> loads the file named <<</WEB-INF/tiles.xml>>>.
+
+  <<<CompleteAutoloadTilesContainerFactory>>> loads all files named <<</WEB-INF/tiles*.xml>>> in the web application, or <<</META-INF/tiles*.xml>>> on the classpath.
+
+  Those file names can be changed by overriding the method <<<getSources>>>:
+
+-----------
+protected List<ApplicationResource> getSources(ApplicationContext applicationContext) {
+    return applicationContext.getResources("/WEB-INF/my-tiles-definitions-file.xml");
+}
+-----------
+
+  Please note that when using <<<CompleteAutoloadTilesContainerFactory>>>,
+  the <<<ApplicationContext>>> loads the resources via spring, and supports 
+  {{{http://static.springsource.org/spring/docs/2.5.x/reference/resources.html#resources-resource-strings}the spring syntax}} for locating resources.
+
diff --git a/TILES_3_0_X/src/site/apt/dev/release.apt b/TILES_3_0_X/src/site/apt/dev/release.apt
new file mode 100644
index 0000000..d99e3be
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/dev/release.apt
@@ -0,0 +1,334 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Release Process
+         -----------
+
+Tiles Release Process
+
+  Here you will find the steps to create releases for Tiles.
+
+Prerequisites
+
+  To create a release you have to install:
+
+  * {{{http://java.sun.com/javase/6}Java 6.0}}. If you are using a newer
+  version of Java, it is suggested to <<change JAVA_HOME environment variable>>
+  when calling Maven, so it points to an instance of Java 6.0;
+
+  * {{{http://maven.apache.org/}Maven 2.2 or 3}};
+
+  * {{{http://www.gnupg.org/}GnuPG}};
+
+  * {{{http://www.openssh.com/}OpenSSH}};
+
+  * {{{http://www.graphviz.org/}GraphViz}};
+
+One-time operations
+
+  These operations need to be performed only one time.
+
+* Create and publish your GPG key
+
+  To create a GPG key, follow the
+  {{{http://www.apache.org/dev/openpgp.html}guidelines}}.
+  Include it in:
+
+-------------------------------------
+https://svn.apache.org/repos/asf/tiles/site/KEYS
+-------------------------------------
+
+  Publish your GPG key in a PGP key server, such as
+  {{{http://pgp.mit.edu/} MIT Keyserver}}.
+
+* Create and upload yout SSH key
+
+  * Generate your SSH key (in this case we will use DSA encryption):
+
+---------------------------------
+ssh-keygen -t rsa
+---------------------------------
+
+  * Copy your public key to the server:
+
+--------------------------------------
+scp ~/.ssh/id_rsa.pub user@people.apache.org:.ssh/authorized_keys
+--------------------------------------
+
+  * Try to login:
+
+---------------------------------
+ssh user@people.apache.org
+---------------------------------
+
+  If it does not ask you a password, everything is ok.
+
+* Modify <<<settings.xml>>>
+
+  Your <<<settings.xml>>> must be modified to allow deployment.
+
+  This is the minimal configuration, obviously if you already have a <<<settings.xml>>> file,
+  you must edit it:
+
+---------------------------
+<settings xmlns="http://maven.apache.org/POM/4.0.0"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
+    <servers>
+        <server>
+            <id>apache-site</id>
+            <username>YOUR_APACHE_USERNAME</username>
+            <filePermissions>664</filePermissions>
+            <directoryPermissions>775</directoryPermissions>
+        </server>
+        <server>
+            <id>apache.snapshots.https</id>
+            <username>YOUR_APACHE_USERNAME</username>
+            <password>YOUR_APACHE_PASSWORD</password>
+        </server>
+        <server>
+            <id>apache.releases.https</id>
+            <username>YOUR_APACHE_USERNAME</username>
+            <password>YOUR_APACHE_PASSWORD</password>
+        </server>
+    </servers>
+    <profiles>
+        <profile>
+            <id>release</id>
+            <properties>
+                <gpg.passphrase>YOUR_SECRET_PHRASE</gpg.passphrase>
+            </properties>
+            </profile>
+        </profile>
+    </profiles>
+</settings>
+---------------------------
+
+Repeatable operations
+
+  These steps must be performed <<for each>> release.
+
+* Prepare the release tag
+
+  To prepare the release Subversion tag, check out the branch/trunk from where
+  you are preparing the release and type:
+
+-----------------------------------
+mvn release:prepare -Dusername=YOUR_SVN_USER -Dpassword=YOUR_SVN_PASSWORD
+-----------------------------------
+
+  The plugin interactively will ask you the version to release, the Subversion
+  tag to use and the next snapshot version. It is recommended to use the tag:
+  <<tiles-X.X.X>>.
+  
+  See also {{{http://www.apache.org/dev/publishing-maven-artifacts.html}the recommendations of the ASF}}.
+
+* Perform the Release
+
+  To perform the release, i.e. creating and deploying Maven artifacts, use:
+
+-----------------------------------
+mvn release:perform
+-----------------------------------
+  
+  It should compile and test everything, build and upload the artifacts and the website for the project. 
+
+* Close the staging repository
+
+  Login to {{{https://repository.apache.org} Nexus repository}} using your Apache LDAP credentials.
+  Click on "Staging". Then click on "tiles" in the list of repositories.
+  In the panel below you should see an open repository that is linked to your username and ip.
+  Right click on this repository and select "Close".
+  This will close the repository from future deployments and make it available for others to view.
+  If you are staging multiple releases together, skip this step until you have staged everything.
+  Enter the name and version of the artifact being released in the "Description" field and then click "Close".
+  This will make it easier to identify it later.
+
+* Verify the staged artifacts
+
+  If you click on your repository, a tree view will appear below.
+  You can then browse the contents to ensure the artifacts are as you expect them.
+  Pay particular attention to the existence of *.asc (signature) files.
+  If the you don't like the content of the repository, right click your repository and choose "Drop".
+  You can then rollback your release and repeat the process.
+
+  Note the repository URL, you will need this in your vote email.
+
+* Verify the uploaded assemblies
+
+  * go to the destination directory on people.apache.org (cd /www/people.apache.org/builds/tiles/${version}).
+  
+  * check the presence of the 3 distributions (bin, doc and src), and their signature files (*.asc, *.md5, *sha1). 
+
+* Release the JIRA version
+
+  * In JIRA go to the version that you want to release and release it.
+
+  * Create a new version, if it has not been done before.
+
+  * Create the release notes and <<write down the link>> that it uses.
+
+* Send announcement for the test build
+
+  In <<developers mailing list>> send an announcement for the test build:
+
+-----------------------------------
+Subject: [ANNOUNCE] Tiles ${version} test build available
+
+The test build of Tiles ${version} is available.
+
+
+No determination as to the quality ('alpha,' 'beta,' or 'GA') of Tiles
+${version} has been made, and at this time it is simply a "test build". We
+welcome any comments you may have, and will take all feedback into
+account if a quality vote is called for this build.
+
+Release notes:
+
+* ${jira.release.notes}
+
+Distribution:
+
+ * http://people.apache.org/builds/tiles/${version}/
+
+Maven 2 staging repository:
+
+ * https://repository.apache.org/content/repositories/tiles-[YOUR REPOSITORY ID]/
+
+A vote regarding the quality of this test build will be initiated
+within the next couple of days.
+-----------------------------------
+
+* Call for a vote
+
+  A few days after the test build announcement, call for a vote in
+  <<developers mailing list>>.
+
+-----------------------------------
+Subject: [VOTE] ${version} Release Quality
+
+The Tiles ${version} test build has been available since ${testBuildDate}.
+
+Release notes:
+
+* ${jira.release.notes}
+
+Distribution:
+
+ * http://people.apache.org/builds/tiles/${version}/
+
+Maven 2 staging repository:
+
+ * https://repository.apache.org/content/repositories/tiles-[YOUR REPOSITORY ID]/
+
+If you have had a chance to review the test build, please respond with
+a vote on its quality:
+
+ [ ] Leave at test build
+ [ ] Alpha
+ [ ] Beta
+ [ ] General Availability (GA)
+
+
+Everyone who has tested the build is invited to vote. Votes by PMC
+members are considered binding. A vote passes if there are at least
+three binding +1s and more +1s than -1s.
+-----------------------------------
+
+* Post-vote operations
+
+  After a vote is finished, and it has been decided that is
+  <<at least of alpha quality>>, there is the need of a post-vote process.
+
+** Promote staged artifacts
+
+  Once the release is deemed fit for public consumption it can be transfered to a production repository where it will be available to all users.
+
+  Login to {{{https://repository.apache.org}Nexus repository}} again.
+  Click on "Staging" and then on the repository with id "tiles-staging".
+  Find your closed staging repository, right click on it and choose "Promote".
+  Select the "Releases" repository and click "Promote".
+
+  Next click on "Repositories", select the "Releases" repository
+  and validate that your artifacts exist as you expect them.
+
+** Move assemblies
+
+  * Move assemblies to the Apache distribution mirrors:
+
+-------------------------------------------
+ssh user@people.apache.org
+
+cd /www/people.apache.org/builds/tiles/${version}
+mkdir /www/www.apache.org/dist/tiles/v${version}/
+cp * /www/www.apache.org/dist/tiles/v${version}/
+-------------------------------------------
+
+** Update the site
+
+  * Wait 24 hours to let the mirror sync to the release and then update the
+  site. In particular you have to update the index and the download pages:
+
+------------------------------------------------
+https://svn.apache.org/repos/asf/tiles/site/src/site/xdoc/index.xml
+https://svn.apache.org/repos/asf/tiles/site/src/site/apt/download.apt
+------------------------------------------------
+
+  Build and publish the site:
+
+--------------------------------------
+mvn site
+mvn site:deploy
+--------------------------------------
+
+** Send announcement
+
+  Finally, send an an announcement to the <<users>> and <<developers mailing
+  list>>:
+
+--------------------------------------
+Subject: [ANNOUNCE] Tiles ${version} ${quality} released
+
+The Apache Tiles team is pleased to announce the release of Tiles ${version}
+${quality}.
+
+Tiles ${version} is available in a binary and a source distribution.
+
+http://tiles.apache.org/download.html
+
+It is also available in the central Maven repository under Group ID
+"org.apache.tiles".
+
+The 3.0.x series of the Apache Tiles framework has a minimum
+requirement of the following specification versions:
+
+* Java Servlet 2.5 and JavaServer Pages (JSP) 2.1
+* Java Standard Edition (Java SE) 1.6
+
+The release notes are available online at:
+
+* ${jira.release.notes}
+
+Please feel free to test the distribution and post your comments to
+the user list, or, if appropriate, file a ticket with JIRA.
+--------------------------------------
+
+  <<You have finished!>>
diff --git a/TILES_3_0_X/src/site/apt/getting_started.apt b/TILES_3_0_X/src/site/apt/getting_started.apt
new file mode 100644
index 0000000..b1fba86
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/getting_started.apt
@@ -0,0 +1,84 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Getting started
+         -----------
+
+Requirements
+
+  To use Tiles in your application you need:
+
+  * a Java Runtime Environment following the <<Java SE 6.0>> specifications;
+  
+  * implementations for slf4j 1.5.8 (or above) and commons-logging 1.1 (or above);
+
+  * Optionally, depending on which options and templating engines you configure:
+
+    * a servlet container that supports <<Servlet 2.5>> (or above) and <<JSP
+  2.1>> (or above).
+  
+    * a portlet container that supports <<Portlet 2.0>> (or above).
+
+    * check {{{./dependency-management.html}Dependency management}} for a comprehensive list. 
+  
+Installation
+
+  Tiles 3.0 includes a large number of optional jar files and transitive dependencies. We 
+  recommend that you use maven or a compatible dependency manager to retrieve only the files 
+  you really need. 
+
+  If however you wish to install Tiles in your application by hand:
+
+  * {{{/download.html}download}} a distribution of Tiles;
+
+  * if you downloaded the binary distribution, unpack it;
+
+  * copy all the jar files into the classpath of your application (for instance
+  in the <<<WEB-INF/lib>>> directory of your web application). In a web environment, 
+  it is <<not recommended>> to put them in a location where they are shared
+  across the container;
+
+Usage
+
+  If you are using Tiles for the first time, read the
+  {{{./tutorial/index.html}Tutorial}}.
+
+  If you are migrating from Struts-Tiles, see the
+  {{{./migration/index.html}Migration guide}}.
+
+  If you're an advanced user, you may find the details you're looking for in 
+  the {{{./index.html}reference documentation}}.
+
+Examples
+
+  To see Tiles in action, there are two examples:
+
+  * The Tiles test web application, included in <<<examples>>> directory of the
+  binary distribution ({{{/download.html}download it}}).
+
+  * The Tiles showcase, that shows Tiles features and integration with other
+  technologies and frameworks (currently only Struts 1).
+
+  Currently it is still under development, and you can access it through its
+  subversion repository:
+
+-----------------------------
+http://svn.apache.org/repos/asf/tiles/examples/trunk/tiles-showcase/
+-----------------------------
diff --git a/TILES_3_0_X/src/site/apt/index.apt b/TILES_3_0_X/src/site/apt/index.apt
new file mode 100644
index 0000000..68323f7
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/index.apt
@@ -0,0 +1,63 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Home
+         -----------
+
+Apache Tiles\u2122
+
+
+    <<{{{http://tiles.apache.org}Apache Tiles}}>> is a template composition
+    framework. Tiles was originally built to simplify the development of web 
+    application user interfaces, but it is no longer restricted to the JavaEE
+    web environment.
+
+    Tiles allows authors to define page fragments which can be assembled
+    into a complete page at runtime.  These fragments, or tiles, can be used
+    as simple includes in order to reduce the duplication of common page
+    elements or embedded within other tiles to develop a series of reusable
+    templates. These templates streamline the development of a consistent
+    look and feel across an entire application.
+
+    {{{/download.html}Download Tiles}}
+
+    {{{./security/index.html}Security bulletins}}
+
+* Documentation
+
+    * {{{./whats-new.html}<<What's new in Tiles 3.0>>}}
+
+    * {{{./tutorial/index.html}Tutorial}}
+
+    * {{{http://cwiki.apache.org/TILES/}Wiki}}
+
+    * Reference
+    
+        ** {{{./getting_started.html}Getting Started}} and installing Tiles
+    
+        ** {{{./config-reference.html}Configuration Reference}}
+
+        ** {{{./apidocs/index.html}Javadocs}}
+
+        ** {{{./tiles-jsp/tlddoc/index.html}Tag library documentation}}
+
+        ** {{{./tiles-core/dtddoc/index.html}Tiles definition file documentation}}
+
+    * {{{./migration/index.html}Migration}} from previous versions
diff --git a/TILES_3_0_X/src/site/apt/migration/apis.apt b/TILES_3_0_X/src/site/apt/migration/apis.apt
new file mode 100644
index 0000000..e6572de
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/migration/apis.apt
@@ -0,0 +1,61 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Java APIs considerations
+         -----------
+
+Introduction
+
+  In this part of the migration guide we address the differences of the APIs
+  in Struts Tiles and Apache Tiles\u0099.
+
+  If you are a Tiles extension developer and you want to convert your existing
+  extension, see {{{./extension.html}Tiles extensions}} migration guide.
+
+Controllers and View Preparers
+
+  In Apache Tiles\u0099, the concept of a Tiles <<<Controller>>>, i.e. an object that it is
+  invoked before rendering a definition, has been replaced with
+  <<<ViewPreparer>>>.
+
+  The classes that implement the <<<Controller>>> interface must now implement
+  the new <<<ViewPreparer>>> interface, or extend the <<<ViewPreparerSupport>>>
+  class.
+
+Tiles <<<ComponentContext>>>
+
+  The <<<ComponentContext>>>, i.e. the Tiles-specific context in which the
+  current attribute values are stored, has been renamed to
+  <<<AttributeContext>>>.
+
+  The method <<<getAttribute>>> returns an <<Attribute>>, and not an
+  <<Attribute Value>>, i.e. a simple object.
+
+   * Previous Migration Pages
+
+     ** {{{./index.html}Introduction }}
+
+     ** {{{./configuration.html}Tiles configuration files}}.
+
+     ** {{{./tags.html}Tiles JSP tags}}
+
+   * Next Migration Pages
+
+     ** {{{./extension.html}Tiles extensions}}.
diff --git a/TILES_3_0_X/src/site/apt/migration/configuration.apt b/TILES_3_0_X/src/site/apt/migration/configuration.apt
new file mode 100644
index 0000000..4ca41c4
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/migration/configuration.apt
@@ -0,0 +1,160 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Migrating Tiles configuration files
+         -----------
+
+{Reusing old Tiles configuration files}
+
+  With Tiles 2.1 and 2.2 it is possible to use old Struts-Tiles definition files, since
+  1.1 version.
+
+  To use this feature it is needed to:
+
+  * include the <<<tiles-compat-xxx.jar>>> package in the classpath;
+
+  * configure the compatibility definitions reader instance, that is able to
+  read old definition files.
+
+* Configuration
+
+  Override the
+  {{{../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#createDefinitionsReader(java.lang.Object,%20org.apache.tiles.TilesApplicationContext,%20org.apache.tiles.context.TilesRequestContextFactory)}createDefinitionsReader}}
+  method this way:
+
+---------------------------------------
+@Override
+protected DefinitionsReader createDefinitionsReader(Object context,
+        TilesApplicationContext applicationContext,
+        TilesRequestContextFactory contextFactory) {
+    return new CompatibilityDigesterDefinitionsReader();
+}
+---------------------------------------
+
+  You need to add a renderer for the "page" attribute type, that is in fact the "template" type.
+  So override the
+  {{{../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#registerAttributeRenderers(org.apache.tiles.renderer.impl.BasicRendererFactory,%20java.lang.Object,%20org.apache.tiles.TilesApplicationContext,%20org.apache.tiles.context.TilesRequestContextFactory,%20org.apache.tiles.TilesContainer,%20org.apache.tiles.evaluator.AttributeEvaluator)}registerAttributeRenderers}}
+  method.
+
+---------------------------------------
+@Override
+protected void registerAttributeRenderers(
+        BasicRendererFactory rendererFactory, Object context,
+        TilesApplicationContext applicationContext,
+        TilesRequestContextFactory contextFactory, TilesContainer container,
+        AttributeEvaluator evaluator) {
+    super.registerAttributeRenderers(rendererFactory, context,
+            applicationContext, contextFactory, container, evaluator);
+    TemplateAttributeRenderer templateRenderer = new TemplateAttributeRenderer();
+    templateRenderer.setApplicationContext(applicationContext);
+    templateRenderer.setRequestContextFactory(contextFactory);
+    templateRenderer.setEvaluator(evaluator);
+    rendererFactory.registerRenderer("page", templateRenderer);
+}
+---------------------------------------
+
+  <<WARNING!!!>> Configuration with initialization parameter has been deprecated! If you
+  still want to use it, please refer to the
+  {{{../../2.1/framework/migration/configuration.html}2.1 version of this page}}.
+
+
+Tiles configuration files translation
+
+  A better, and more powerful, choice is to rewrite the definition files, to use
+  the new features of Tiles 2.1.
+
+  Most of XML elements and attributes can be translated one-to-one or
+  many-to-one without losing functionality from the 1.1-1.3 to the 2.1 DTD
+  version.
+
+* Header
+
+  The new header to be put in your Tiles definitions files is:
+
+------------------------------------------------------------
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+------------------------------------------------------------
+
+* Definitions attributes
+
+*---------------------------------+--------------------------------+
+| <<Struts-Tiles>>                | <<Apache Tiles\u0099>>         |
+*---------------------------------+--------------------------------+
+| <<<\<component-definitions\>>>> | <<<\<tiles-definitions\>>>>    |
+| <<<\<tiles-definitions\>>>>     |                                |
+*---------------------------------+--------------------------------+
+| <<<page>>>                      | <<<template>>>                 |
+| <<<path>>>                      |                                |
+| <<<template>>>                  |                                |
+*---------------------------------+--------------------------------+
+| <<<controllerClass>>>           | <<<preparer>>> [1]             |
+| <<<controllerUrl>>>             |                                |
+*---------------------------------+--------------------------------+
+
+  * \[1\] The default behaviour of <<<preparer>>> is to create and use a
+  single instance of the specified class. Anyway it is still possible to use a
+  URL as a preparer under a Struts 1 environment by using the
+  {{{http://svn.apache.org/repos/asf/struts/struts1/trunk/tiles2/}Struts 1 - Apache Tiles\u0099}}
+  integration module, still under development.
+
+
+* Putting and adding attributes values
+
+  The <<<page>>> attribute type has been removed, use <<<template>>> instead.
+
+  The rest of the conversion is in the table below.
+
+*-----------------------+-----------------------------------------------+
+| <<Struts-Tiles>>      | <<Apache Tiles\u0099>>                        |
+*-----------------------+-----------------------------------------------+
+| <<<\<put\>>>>         | <<<\<put-attribute\>>>>                       |
+*-----------------------+-----------------------------------------------+
+| <<<\<putList\>>>>     | <<<\<put-list-attribute\>>>>                  |
+*-----------------------+-----------------------------------------------+
+| <<<\<add\>>>>         | <<<\<add-attribute\>>>>  [2]                  |
+|                       | <<<\<add-list-attribute\>>>>  [3]             |
+*-----------------------+-----------------------------------------------+
+| <<<content>>>         | <<<value>>>                                   |
+| <<<value>>>           |                                               |
+*-----------------------+-----------------------------------------------+
+| <<<direct="true">>>   | <<<type="string">>>                           |
+*-----------------------+-----------------------------------------------+
+
+  * \[2\] <<<\<add-attribute\>>>> is used when it is needed to add a single
+  attribute to a list attribute.
+
+  * \[3\] <<<\<add-list-attribute\>>>> is used when it is needed to a list
+  attribute as an element of another list attribute.
+
+  []
+
+   * Previous Migration Pages
+
+     ** {{{./index.html}Introduction }}
+
+   * Next Migration Pages
+
+     ** {{{./tags.html}Tiles JSP tags}}
+
+     ** {{{./apis.html}Java APIs considerations}}.
+
+     ** {{{./extension.html}Tiles extensions}}.
diff --git a/TILES_3_0_X/src/site/apt/migration/extension.apt b/TILES_3_0_X/src/site/apt/migration/extension.apt
new file mode 100644
index 0000000..fa6a83e
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/migration/extension.apt
@@ -0,0 +1,88 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles extensions migration
+         -----------
+
+Introduction
+
+  Tiles extensions is the part of Tiles where a major effort in refactoring is
+  needed.
+
+  The internal part of Tiles changed completely, not only in classes names, but
+  also in their behaviour.
+
+Writing definitions factories
+
+  Usually, Struts-Tiles extension writing meant writing a
+  <<<DefinitionsFactory>>> or a <<<FactorySet>>> implementation. Here you will
+  find how to convert your definitions factory to work correctly with Apache Tiles\u0099.
+
+* Requests management
+
+  Apache Tiles\u0099 is now technology-independent, that means that Apache Tiles\u0099 is no longer
+  bound to a Servlet environment. That means for you that all references to
+  <<<HttpServletRequest>>> and <<<HttpServletResponse>>> have been removed,
+  replacing them with <<<TilesRequestContext>>>
+
+* Definitions factory implementation
+
+  The most common way to implement a Definitions Factory is extending the
+  <<<UrlDefinitionsFactory>>> class, that contains code to load definitions,
+  resolve Locale-specific definitions, etc.
+
+  If you implemented <<<FactorySet>>>, here comes the bad news: it has been
+  <<removed>>! Getting a "key" to map different definitions factory was an
+  uncommon implementation detail. But it is easily reproducable, since you can
+  take the <<<TilesRequestContext>>> and calculate your "key". This key can be
+  used to map different <<<Definitions>>> instances, or to be given to an
+  instance of a class extending <<<Definitions>>>. Whatever you choose, it's
+  only a question of taste.
+
+Class and interfaces new names
+
+  The following is a conversion table between Struts-Tiles and Apache Tiles\u0099 class
+  names.
+
+*---------------------------------+---------------------------------+
+| <<Struts-Tiles>>                | <<Apache Tiles\u0099>>          |
+*---------------------------------+---------------------------------+
+| <<<ComponentDefinition>>>       | <<<Definition>>>                |
+*---------------------------------+---------------------------------+
+| <<<XmlDefinitionsSet>>>         | <<<Definitions>>>               |
+*---------------------------------+---------------------------------+
+| <<<XmlAttribute>>>              | <<<Attribute>>>                 |
+*---------------------------------+---------------------------------+
+| <<<ComponentListAttribute>>>    | <<<ListAttribute>>>             |
+*---------------------------------+---------------------------------+
+| <<<I18nFactorySet>>>            | <<<UrlDefinitionsFactory>>>     |
+*---------------------------------+---------------------------------+
+| <<<XmlParser>>>                 | <<<DigesterDefinitionsReader>>> |
+*---------------------------------+---------------------------------+
+
+   * Previous Migration Pages
+
+     ** {{{./index.html}Introduction }}
+
+     ** {{{./configuration.html}Tiles configuration files}}.
+
+     ** {{{./tags.html}Tiles JSP tags}}
+
+     ** {{{./apis.html}Java APIs considerations}}.
diff --git a/TILES_3_0_X/src/site/apt/migration/index.apt b/TILES_3_0_X/src/site/apt/migration/index.apt
new file mode 100644
index 0000000..50ec114
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/migration/index.apt
@@ -0,0 +1,57 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Migration from Struts-Tiles
+         -----------
+
+Migration from Struts-Tiles
+
+  This tutorial is intended to provide a help when migrating from the previous
+  version of Tiles, known as
+  <<{{{http://struts.apache.org/1.3.8/struts-tiles/index.html}Struts-Tiles}}>>.
+
+  To use Tiles you need to put in your web application library directory:
+
+  * <<<tiles-api.jar>>>: it contains the API to manipulate and render Tiles.
+
+  * <<<tiles-core.jar>>>: it contains the "engine" of Tiles, and the basic
+  implementation of the APIs.
+
+  * <<<tiles-servlet.jar>>>: it contains the servlet support in Tiles.
+
+  * <<<tiles-jsp.jar>>>: it contains the JSP support to Tiles, i.e. JSP specific
+  classes and the tag library.
+
+  * <<<tiles-compat.jar>>>: it contains the compatibility layer of Tiles to
+  support Struts-Tiles 1.x XML definition files.
+
+* Further steps
+
+   * {{{./configuration.html}Tiles configuration files}}: How to migrate Tiles
+   configuration files, the file usually named <<<tiles-defs.xml>>>.
+
+   * {{{./tags.html}Tiles JSP tags}}: How to migrate Tiles JSP tags, the
+   <<<\<tiles:...\>>>> tags.
+
+   * {{{./apis.html}Java APIs considerations}}: Some information and warnings on
+   the different behaviour of the Tiles Java API.
+
+   * {{{./extension.html}Tiles extensions}}: How to migrate Tiles
+   extensions, with explanation of main changes in the code structure.
diff --git a/TILES_3_0_X/src/site/apt/migration/tags.apt b/TILES_3_0_X/src/site/apt/migration/tags.apt
new file mode 100644
index 0000000..72a8915
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/migration/tags.apt
@@ -0,0 +1,132 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Translation of JSP tags
+         -----------
+
+Introduction
+
+  Tiles JSP tag library changed a lot, to be clearer and simpler than it was
+  before. This means that you need to change ALL of your JSP pages accordingly.
+
+Tag library inclusion
+
+  To include Tiles tag library, write this row on top of your JSP files:
+
+---------------------------------------------------------------------
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+---------------------------------------------------------------------
+
+Tags differences
+
+  Here is the toughest part: Apache Tiles\u0099 tags differ a lot comparing to Struts
+  Tiles. However, after the change you will notice that the JSP code will be
+  easier to understand.
+
+* The <<<\<tiles:insert\>>>> tag replacement
+
+  The <<<\<tiles:insert\>>>> of Struts-Tiles changed, in the sense that it has
+  been split in different parts and many attributes have been removed. The
+  changes are summarized in the table below.
+
+*---------------------------------+----------------------------------+
+| <<Struts-Tiles>>                | <<Apache Tiles\u0099>>           |
+*---------------------------------+----------------------------------+
+| <<<\<tiles:insert\>>>>          | <<<\<tiles:insertTemplate\>>>>   |
+|                                 | <<<\<tiles:insertAttribute\>>>>  |
+|                                 | <<<\<tiles:insertDefinition\>>>> |
+*---------------------------------+----------------------------------+
+| <<<component="definition_name">>> | Use <<<\<tiles:insertDefinition name="definition_name"\>>>> |
+*---------------------------------+----------------------------------+
+| <<<attribute="attribute_name">>>  | Use <<<\<tiles:insertAttribute name="attribute_name"\>>>>   |
+*---------------------------------+----------------------------------+
+| <<<page>>>                      | <<<template>>>                   |
+| <<<template>>>                  |                                  |
+*---------------------------------+----------------------------------+
+| <<<beanName="bean_name">>>         | <<<value="$\{bean_scopeScope.bean_name.bean_property\}">>> |
+| <<<beanProperty="bean_property">>> |                                                            |
+| <<<beanScope="bean_scope">>>       |                                                            |
+*---------------------------------+----------------------------------+
+| <<<controllerClass>>>           | <<<preparer>>> [1]               |
+| <<<controllerUrl>>>             |                                  |
+*---------------------------------+----------------------------------+
+
+
+  * \[1\] The default behaviour of <<<preparer>>> is to create and use a
+  single instance of the specified class. Anyway it is still possible to use a
+  URL as a preparer under a Struts 1 environment by using the
+  {{{http://svn.apache.org/repos/asf/struts/struts1/trunk/tiles2/}Struts 1 - Apache Tiles\u0099}}
+  integration module, still under development.
+
+* Putting and adding attributes values
+
+  The <<<page>>> attribute type has been removed, use <<<template>>> instead.
+
+  The rest of the conversion is in the table below.
+
+*-------------------------+-----------------------------------------------+
+| <<Struts-Tiles>>        | <<Apache Tiles\u0099>>                        |
+*-------------------------+-----------------------------------------------+
+| <<<\<tiles:put\>>>>     | <<<\<tiles:putAttribute\>>>>                  |
+*-------------------------+-----------------------------------------------+
+| <<<\<tiles:putList\>>>> | <<<\<tiles:putAttributeList\>>>>              |
+*-------------------------+-----------------------------------------------+
+| <<<\<tiles:add\>>>>     | <<<\<tiles:addAttribute\>>>>  [2]             |
+|                         | <<<\<tiles:addListAttribute\>>>>  [3]         |
+*-------------------------+-----------------------------------------------+
+| <<<content>>>           | <<<value>>>                                   |
+| <<<value>>>             |                                               |
+*-------------------------+-----------------------------------------------+
+| <<<direct="true">>>     | <<<type="string">>>                           |
+*-------------------------+-----------------------------------------------+
+| <<<beanName="bean_name">>>         | <<<value="$\{bean_scopeScope.bean_name.bean_property\}">>> |
+| <<<beanProperty="bean_property">>> |                                                            |
+| <<<beanScope="bean_scope">>>       |                                                            |
+*---------------------------------+----------------------------------+
+
+  * \[2\] <<<\<tiles:addAttribute\>>>> is used when it is needed to add a single
+  attribute to a list attribute.
+
+  * \[3\] <<<\<tiles:addListAttribute\>>>> is used when it is needed to a list
+  attribute as an element of another list attribute.
+
+* Other changes
+
+*---------------------------------+--------------------------------------------+
+| <<Struts-Tiles>>                | <<Apache Tiles\u0099>>                     |
+*---------------------------------+--------------------------------------------+
+| <<<\<tiles:get\>>>>             | <<<\<tiles:insertAttribute\>>>>            |
+*---------------------------------+--------------------------------------------+
+| <<<\<tiles:definition scope="scope"\>>>> | Removed, definitions are created in request scope. |
+*---------------------------------+--------------------------------------------+
+| <<<\<tiles:initComponentDefinitions\>>>> | <<<\<tiles:initContainer\>>>>     |
+*---------------------------------+--------------------------------------------+
+
+   * Previous Migration Pages
+
+     ** {{{./index.html}Introduction }}
+
+     ** {{{./configuration.html}Tiles configuration files}}.
+
+   * Next Migration Pages
+
+     ** {{{./apis.html}Java APIs considerations}}.
+
+     ** {{{./extension.html}Tiles extensions}}.
diff --git a/TILES_3_0_X/src/site/apt/security/index.apt b/TILES_3_0_X/src/site/apt/security/index.apt
new file mode 100644
index 0000000..5de2994
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/security/index.apt
@@ -0,0 +1,28 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Security bulletins
+         -----------
+
+Security bulletins
+
+  Here are collected all security bulletins about Tiles.
+
+  * {{{./security-bulletin-1.html}Security Bulletin 1}}.
diff --git a/TILES_3_0_X/src/site/apt/security/security-bulletin-1.apt b/TILES_3_0_X/src/site/apt/security/security-bulletin-1.apt
new file mode 100644
index 0000000..8d5d6a1
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/security/security-bulletin-1.apt
@@ -0,0 +1,72 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Security bulletin 1
+         -----------
+
+Security bulletin 1
+
+* Summary
+
+  EL expressions in JSP using some Tiles JSP tags are evaluated twice.
+
+*-------------------------+-----------+
+| Who should read this    | All Tiles 2.1 developers |
+*-------------------------+-----------+
+| Impact of vulnerability | Remote server context exposure |
+*-------------------------+-----------+
+| Maximum security rating | High (read-only exposure) |
+*-------------------------+-----------+
+| Recommendation          | Developers should not install Tiles 2.1.1 under a production environment, |
+|                         | upgrade to Tiles 2.1.2 |
+*-------------------------+-----------+
+| Affected Software       | Tiles 2.1.0/2.1.1 (Tiles 2.0.x versions are safe) |
+*-------------------------+-----------+
+| Original JIRA Ticket    | {{{https://issues.apache.org/jira/browse/TILES-351}TILES-351}}       |
+*-------------------------+-----------+
+| Reporter                | Antonio Petrelli (Tiles PMC member) |
+*-------------------------+-----------+
+
+* Problem
+
+  Tiles 2.1.x allows, with the
+  {{{../tutorial/advanced/el-support.html}correct configuration}},
+  to use EL expressions in Tiles configuration files.
+  
+  The problem is that, if attribute values or templates are defined using
+  some JSP tags (tiles:putAttribute, tiles:insertTemplate), the EL expression
+  is evaluated twice, one by the container, one by the ELAttributeEvaluator
+  class.
+  
+  Now, if at the first evaluation the EL expression is connected to a
+  user-entered content, it could be maliciously exploited to access the
+  server context.
+  
+  Therefore, there could be an unwanted exposure of server data or XSS attacks.
+
+* Solution
+
+  The API and the core have been modified to separate the expression evaluation
+  from the attribute/template manipulation made by JSP tags in a safe way.
+
+  Since Tiles 2.1.1 is still in beta, the recommendation is not to install it
+  in a production environment. A release, in this case, is not necessary.
+  Experimenter can download the latest version of Tiles from the
+  {{{http://svn.apache.org/repos/asf/tiles/framework/trunk/}SVN repository}}.
diff --git a/TILES_3_0_X/src/site/apt/selenium.apt b/TILES_3_0_X/src/site/apt/selenium.apt
new file mode 100755
index 0000000..4be3bd5
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/selenium.apt
@@ -0,0 +1,166 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Selenium Testing
+         -----------
+
+Selenium Testing
+
+ <<{{{http://selenium.openqa.org}Selenium}}>> is a test tool for web
+ applications. Unlike HtmlUnit or HttpUnit tests which <simulate> a browser,
+ Selenium tests run directly in a real browser such as Firefox or Internet
+ Explorer. The Selenium JavaScript code is deployed alongside your running
+ application, and interacts with it just as your users do.
+
+ Apache Tiles\u0099 uses Selenium for functional testing of the example apps.
+ The following example apps include Selenium tests:
+
+  * Tiles Test
+
+* Install
+
+ Selenium is available in OpenQA's Maven repository, so no installation is
+ necessary.
+
+ However, you may want to download the Selenium distribution (which includes
+ the documentation) from
+ {{{http://www.openqa.org/selenium-core/download.action}
+ http://www.openqa.org/selenium-core/download.action}}.
+
+ While you're there, also install the Firefox plugin <<Selenium IDE>> from
+ {{{http://www.openqa.org/selenium-ide/}
+ http://www.openqa.org/selenium-ide/}}.
+
+* Run Selenium tests the easy way
+
+  To run Selenium tests you need to add a configuration parameter in your <<<settings.xml>>> file.
+
+------------------------------
+<settings xmlns="http://maven.apache.org/POM/4.0.0"
+	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
+...
+	<profiles>
+	...
+		<profile>
+			<id>run-selenium</id>
+			<properties>
+				<cargo.tomcat6x.home>/tomcat/installation/directory</cargo.tomcat6x.home>
+			</properties>
+    	</profile>
+    ...
+    </profiles>
+</settings>
+------------------------------
+
+  After that, if you have Firefox installed, you can launch Selenium tests in the command line:
+
+------------------------------
+mvn verity -Prun-selenium
+------------------------------
+
+* Package
+
+ <<Package>> the webapp with the 'selenium' profile activated.
+
+ The {{{http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/pom.xml
+?view=markup}tiles-test pom}} includes a 'selenium' profile that will
+
+  * unpack the Selenium jar under 'target'
+
+  * copy the 'core' directory from the unpacked Selenium jar into the
+  webapp
+
+  * copy any files in 'src/test/selenium' into the webapp
+
+  []
+
++-----+
+mvn package -P selenium
++-----+
+
+  The webapp will contain the following additional directories: 'selenium/core'
+  and 'selenium/tests'.
+
+* Deploy
+
+  <<Deploy>> the webapp to your favorite container. The Cargo plugin is
+  configured to make this easy:
+
++-----+
+mvn package cargo:start -P selenium
+
+   or
+
+mvn package cargo:start -P selenium -Dcargo.tomcat5x.home=/path/to/tomcat5
++-----+
+
+
+* Run
+
+ <<Run>> the tests with the Selenium TestRunner.
+
+ * Visit <<<http://localhost:8080/<appname>/selenium/core/TestRunner.html>>>
+
+ * Click 'go' in the top left frame to load the TestSuite.html page
+
+ * Click 'All' in the top right frame to run the tests
+
+ []
+
+ <<Run>> the tests <automatically>.
+
+ * Check the 'Auto-run' box before clicking 'go' in the top left frame.
+
+ []
+
+ After it runs the tests automatically, Selenium can <<<POST>>> the results to
+ a URL you supply.  If you accept the default, and nothing is there to process
+ the request, you will see a 404 Not Found error page in the bottom frame.
+
+
+* Edit
+
+  <<Edit>> an existing test, or write a new one.
+
+  If you add a new test, remember to add it to src/test/selenium/TestSuite.html
+  so the TestRunner will find it.
+
+** Selenium IDE
+
+  The Selenium IDE Firefox plugin is the easiest way to edit tests. With the
+  example app running, open the HTML file (src/test/selenium/TestSomething.html)
+  from your svn checkout of Apache Tiles\u0099. Use the IDE to edit and run the test, and
+  save your changes.
+
+  <<Note>>: Your changes will not be visible to the TestRunner in the deployed
+  webapp unless you re-package and deploy it.
+
+** HTML Editor
+
+  Selenium tests are written in plain HTML tables, so you may edit them with any
+  text editor.
+
+  If you prefer to edit the tests 'in place' in the running webapp, simply copy
+  the files back to your svn checkout directory and commit the changes (or submit
+  a patch).
+
+
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/attribute-rendering.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/attribute-rendering.apt
new file mode 100644
index 0000000..97a5395
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/attribute-rendering.apt
@@ -0,0 +1,82 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Attribute rendering
+         -----------
+
+Attribute rendering
+
+  Attribute rendering behaviour can be customized. The "type"
+  of an attribute can be still <<<string>>>, <<<definition>>> or <<<template>>>
+  but you can define new types or use a class name directly.
+
+Default behaviour
+
+  The default behaviour of Tiles is compatible with Tiles 2.0 and it applies
+  both to XML definition files and JSP tags. Tiles follows these steps:
+
+  * If the type is not specified:
+
+  ** if the value is a valid definition name, the definition is rendered;
+
+  ** if the value starts with a '/', a template will be rendered;
+
+  ** otherwise, a string will be rendered.
+
+  * If the type is specified:
+
+  ** if the type is <<<string>>>, <<<definition>>> or <<<template>>>, it will
+  be rendered like in Tiles 2.0;
+
+  ** otherwise, Tiles tries to instantiate (only once) a class whose name is
+  specified in the "type" of the attribute. If an error occurs, it pops up as
+  a runtime exception.
+
+Customize attribute rendering
+
+  With Tiles 2.1+ you can customize rendering in three ways:
+
+  * specifying new renderers;
+
+  * overriding the default renderer for untyped attributes;
+
+  * specifying a new renderer factory.
+
+* Custom attribute renderers
+
+  If you don't want to use class names as attribute types, you can use new
+  "named" custom attribute renderers. You can do it by overriding the
+  {{{../../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#method_summary}registerAttributeRenderers}}
+  of <<<BasicTilesContainerFactory>>> if you are using Java-based configuration.
+
+* Custom default attribute renderer
+
+  The behaviour of Tiles when the type of an attribute is not specified can also be
+  customized. You can do it by overriding the
+  {{{../../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#method_summary}createDefaultAttributeRenderer}}
+  of <<<BasicTilesContainerFactory>>> if you are using Java-based configuration.
+
+* Custom attribute renderer factory
+
+  The attribute renderer factory can be completely customized, leaving to you
+  the maximum freedom of choice in the attribute renderer creation. You can
+  specify the factory's implementation by overriding the
+  {{{../../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#method_summary}createRendererFactory}}
+  of <<<BasicTilesContainerFactory>>> if you are using Java-based configuration.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/el-support.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/el-support.apt
new file mode 100644
index 0000000..ec728de
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/el-support.apt
@@ -0,0 +1,98 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Expression Language (EL) support
+         -----------
+
+Expression Language support
+
+  With Tiles it is possible to use expression languages not only in JSP pages, but also in XML
+  definition files.
+
+  Currently supported languages are Unified EL (as in javax.el), i.e. the language used in JSP code,
+  {{{http://mvel.codehaus.org/}MVEL}} and {{{http://commons.apache.org/ognl/}OGNL}}.
+
+* Configuration
+
+  By default, Tiles does not use an expression language, attribute values are simply used as they are.
+  
+  <<<CompleteAutoloadTilesContainerFactory>>> enables support of Unified EL, MVEL and OGNL as follows:
+  
+  - an attribute expression starting with "MVEL:" or "OGNL:" is interpreted in one of those languages.
+  - otherwise, the parts of the expression between the braces in <<<$\{...\}>>> are interpreted in Unified EL.  
+
+* Unified EL support
+
+  The EL language is supported since Tiles 2.1.
+
+  Let's use this example:
+
+------------------------------------
+  <definition name="test.composite.el.definition" templateExpression="${layout}"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   expression="${requestScope.body}"/>
+  </definition>
+------------------------------------
+
+  Before rendering the definition:
+
+  * The template name will be taken from the "layout" attribute, searched in every scope.
+
+  * The body will be taken from the "body" attribute in request scope.
+
+* {MVEL Support}
+
+  Let's use this example:
+
+------------------------------------
+  <definition name="test.composite.mvel.definition" templateExpression="MVEL:layout"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   expression="MVEL:requestScope.body"/>
+  </definition>
+------------------------------------
+
+  Before rendering the definition:
+
+  * The template name will be taken from the "layout" attribute, searched in every scope.
+
+  * The body will be taken from the "body" attribute in request scope.
+
+* {OGNL Support}
+
+  Let's use this example:
+
+------------------------------------
+  <definition name="test.composite.mvel.definition" templateExpression="OGNL:layout"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   expression="OGNL:requestScope.body"/>
+  </definition>
+------------------------------------
+
+  Before rendering the definition:
+
+  * The template name will be taken from the "layout" attribute, searched in every scope.
+
+  * The body will be taken from the "body" attribute in request scope.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/index.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/index.apt
new file mode 100644
index 0000000..2f98cbe
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/index.apt
@@ -0,0 +1,50 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles Advanced Topics
+         -----------
+
+Tiles Advanced Topics
+
+  In this section, advanced usage of Tiles is discussed. These topics let you
+  do more complicated tasks, like composing pages one inside another, localize
+  your pages, etc.
+
+  [[1]] {{{./nesting-extending.html}Nesting and Extending Definitions}}
+
+  [[2]] {{{./list-attributes.html}List Attributes}}
+
+  [[3]] {{{./runtime.html}Runtime Composition}}
+
+  [[4]] {{{./preparer.html}View Preparers}}
+
+  [[5]] {{{./utils.html}Rendering Utilities}}
+
+  [[6]] {{{./l10n.html}Tiles Localization}}
+
+  [[7]] {{{./wildcard.html}Wildcard support}}
+
+  [[8]] {{{./el-support.html}EL support}}
+
+  [[9]] {{{./attribute-rendering.html}Attribute rendering}}
+
+  [[10]] {{{./multiple-containers.html}Using multiple containers}}
+
+  [[11]] {{{./security.html}Security}}
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/l10n.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/l10n.apt
new file mode 100644
index 0000000..80db80b
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/l10n.apt
@@ -0,0 +1,135 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles Localization
+         -----------
+
+Localization support
+
+  Customizing pages for different locales in a common practice: in real-world
+  websites you can see different sites for different languages and countries.
+
+  It can be a matter of changing the layout (for example, in Arab countries the
+  menu should stay on the right, instead of the left), or providing alternate
+  content.
+
+* Creating localized definitions
+
+  Localization is immediately available. To use the benefits of localization you
+  have to create different Tiles definition files for each locale you want to
+  support: it's simply a matter of appending the locale code at the end of the
+  file name (just like <<<.properties>>> files in resource bundles).
+
+  For example, if you have the <<<tiles.xml>>> file and you want to support
+  French and Italian locale, you have to create at least three files:
+
+--------------------------------
+tiles.xml
+tiles_fr.xml
+tiles_it.xml
+--------------------------------
+
+  You can also distinguish between different languages in different country. So
+  if you want to distinguish between British English and American English, you
+  can create these files:
+
+--------------------------------
+tiles_en_GB.xml
+tiles_en_US.xml
+--------------------------------
+
+  and so on.
+
+* Inheritance between localizations
+
+  If you want to support different locales, you don't have to rewrite all the
+  definitions, but only those that differ from the main definitions file. In
+  other words, locale-specific definition files contains the "overrides" to the
+  default definitions.
+
+  For example, suppose that the following definition is declared in
+  <<<tiles.xml>>>:
+
+------------------------------------
+<definition name="myapp.homepage" template="/layouts/classic.jsp">
+  <put-attribute name="title" value="Tiles tutorial homepage" />
+  <put-attribute name="header" value="/tiles/banner.jsp" />
+  <put-attribute name="menu" value="/tiles/common_menu.jsp" />
+  <put-attribute name="body" value="myapp.homepage.body" />
+  <put-attribute name="footer" value="/tiles/credits.jsp" />
+</definition>
+
+<definition name="myapp.homepage.body" template="/layouts/three_rows.jsp">
+  <put-attribute name="one" value="/tiles/headlines.jsp" />
+  <put-attribute name="two" value="/tiles/topics.jsp" />
+  <put-attribute name="one" value="/tiles/comments.jsp" />
+</definition>
+------------------------------------
+
+  In <<<tiles_it.xml>>> there is a new declaration of <<<myapp.homepage>>>
+  definition:
+
+------------------------------------
+<definition name="myapp.homepage" template="/layouts/classic.jsp">
+  <put-attribute name="title" value="Pagina iniziale del tutorial di Tiles" />
+  <put-attribute name="header" value="/tiles/banner.jsp" />
+  <put-attribute name="menu" value="/tiles/common_menu.jsp" />
+  <put-attribute name="body" value="myapp.homepage.body" />
+  <put-attribute name="footer" value="/tiles/credits.jsp" />
+</definition>
+------------------------------------
+
+  Using "it" locale, the title will be different from the default, while the
+  rest remains the same.
+  
+  Notice that the <<<myapp.homepage.body>>> definition is the one defined in
+  the default definitions file: you still can reference to the default
+  definitions, both when composing and when extending.
+  
+  You can also override a <<definition that is extended>>. In this case, when
+  resolving inheritance, the overridden definition will be taken as a basis.
+  For example, if in <<<tiles.xml>>> there are the following definitions:
+
+------------------------------------
+<definition name="myapp.page.common" template="/layouts/classic.jsp">
+  <put-attribute name="header" value="/tiles/banner.jsp" />
+  <put-attribute name="menu" value="/tiles/common_menu.jsp" />
+  <put-attribute name="footer" value="/tiles/credits.jsp" />
+</definition>
+
+<definition name="myapp.bugs" extends="myapp.page.common">
+  <put-attribute name="title" value="Bugs" />
+  <put-attribute name="body" value="myapp.homepage.body" />
+</definition>
+------------------------------------
+
+  If in <<<tiles_it.xml>>> you define the following definition:
+
+------------------------------------
+<definition name="myapp.page.common" template="/layouts/classic.jsp">
+  <put-attribute name="header" value="/tiles/banner_it.jsp" />
+  <put-attribute name="menu" value="/tiles/common_menu_it.jsp" />
+  <put-attribute name="footer" value="/tiles/credits_it.jsp" />
+</definition>
+------------------------------------
+
+  The <<<myapp.bugs>>> will extend the latter definition, and not the default!
+  This is useful if you want to change an abstract definition for a locale,
+  without redefining all the definitions.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/list-attributes.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/list-attributes.apt
new file mode 100644
index 0000000..588d8b8
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/list-attributes.apt
@@ -0,0 +1,96 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         List Attributes
+         -----------
+
+List Attributes
+
+  Up to now we have seen simple attributes, i.e. attributes that have a simple
+  value: a template, a string or a definition. But there are cases where you
+  need a <collection> of values, for example a list of definitions to be
+  redendered one below the other.
+
+* Simple usage
+
+  To include a list attribute you can use the <<<\<put-list-attribute\>>>> tag
+  in your Tiles definitions file:
+
+---------------------------------------
+<definition name="myapp.homepage.body" template="/layouts/variable_rows.jsp">
+  <put-list-attribute name="items">
+    <add-attribute value="/tiles/banner.jsp" />
+    <add-attribute value="/tiles/common_menu.jsp" />
+    <add-attribute value="/tiles/credits.jsp" />
+  </put-list-attribute>
+</definition>
+---------------------------------------
+
+  In your template page, you can read the list attribute iterating over its
+  elements:
+
+---------------------------------------
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
+<tiles:useAttribute id="list" name="items" classname="java.util.List" />
+<c:forEach var="item" items="${list}">
+  <tiles:insertAttribute value="${item}" flush="true" />
+  <br/>
+</c:forEach>
+---------------------------------------
+
+  The list attribute is first converted into a scripting variable; after that
+  it is iterated using the <<<\<c:forEach\>>>> tag. The compound attributes are
+  then rendered one after the other.
+
+* {List attribute inheritance}
+
+  When you extend a definition that contains a list attribute, you can
+  "inherit" its elements. For example:
+
+---------------------------------------
+<definition name="myapp.homepage.body" template="/layouts/variable_rows.jsp">
+  <put-list-attribute name="items">
+    <add-attribute value="/tiles/banner.jsp" />
+    <add-attribute value="/tiles/common_menu.jsp" />
+    <add-attribute value="/tiles/credits.jsp" />
+  </put-list-attribute>
+</definition>
+
+<definition name="myapp.homepage.body.extended" extends="myapp.homepage.body">
+  <put-list-attribute name="items" inherit="true">
+    <add-attribute value="/tiles/greetings.jsp" />
+  </put-list-attribute>
+</definition>
+---------------------------------------
+
+  In this case, the <<<myapp.homepage.body.extended>>> has the <<<items>>>
+  attribute that inherits the content of the <<<items>>> attribute of its
+  parent definition. In other words, the <<<items>>> attribute will container
+  the following elements:
+
+  * /tiles/banner.jsp
+
+  * /tiles/common_menu.jsp
+
+  * /tiles/credits.jsp
+
+  * /tiles/greetings.jsp
+ 
\ No newline at end of file
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/multiple-containers.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/multiple-containers.apt
new file mode 100644
index 0000000..84b93aa
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/multiple-containers.apt
@@ -0,0 +1,86 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Using multiple containers
+         -----------
+
+Defining multiple containers
+
+  It is possible to use more that one Tiles container in your application.
+
+* Configuration
+
+  To use an alternate container, you need to override the
+  {{{../../apidocs/org/apache/tiles/startup/AbstractTilesInitializer.html#method_summary}getContainerKey}}
+  method of <<<AbstractTilesInitializer>>> this way:
+
+------------------------------------
+public class TestAlternateTilesListener extends AbstractTilesListener {
+
+    /** {@inheritDoc} */
+    @Override
+    protected TilesInitializer createTilesInitializer() {
+        return new TestAlternateTilesInitializer();
+    }
+
+    /**
+     * Test Tiles initializer for Tiles initialization of the alternate container.
+     */
+    private static class TestAlternateTilesInitializer extends AbstractTilesInitializer {
+
+        // Other customizations go here.
+
+        /** {@inheritDoc} */
+        @Override
+        protected String getContainerKey(
+                TilesApplicationContext applicationContext) {
+            return "myContainerKey";
+        }
+    }
+}
+------------------------------------
+
+Selecting one non-default container
+
+  Once defined, it is possible to select a non-default container through Java
+  or JSP
+
+* Selection through Java
+
+  It is possible to use, for the current request, a different container
+  stored under another key, by using
+  {{{../../apidocs/org/apache/tiles/access/TilesAccess.html#method_summary}<<<setCurrentContainer>>>}}
+  method of TilesAccess class. For example:
+
+------------------------------------
+TilesAccess.setCurrentContainer(request, applicationContext, "myContainerKey");
+------------------------------------
+
+  If the last parameter is <<<null>>>, the default container is selected.
+
+* Selection through JSP
+
+  The current container can be selected also through the use of JSP:
+
+------------------------------------
+<tiles:setCurrentContainer containerKey="myContainerKey" />
+------------------------------------
+
+  If the <<<containerKey>>> attribute is not present, the default container is selected.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/nesting-extending.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/nesting-extending.apt
new file mode 100644
index 0000000..5f91da2
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/nesting-extending.apt
@@ -0,0 +1,168 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Nesting and Extending Definitions
+         -----------
+
+Nesting Definitions
+
+  Sometimes it is useful to have a structured page with, say, a structured body.
+  Tipically, there is a main layout (for example, the "classic" layout) and the
+  body is made of certain number of sections. In this case, nesting a definition
+  (the one for the body) inside another definition (the main layout) can be
+  useful.
+
+* {Named subdefinitions}
+
+  Tiles supports nesting definitions natively. One way of usng nested definitions
+  is creating a named "subdefinition" and using it as an attribute. For example:
+
+------------------------------------
+<definition name="myapp.homepage.body" template="/layouts/three_rows.jsp">
+  <put-attribute name="one" value="/tiles/headlines.jsp" />
+  <put-attribute name="two" value="/tiles/topics.jsp" />
+  <put-attribute name="one" value="/tiles/comments.jsp" />
+</definition>
+
+<definition name="myapp.homepage" template="/layouts/classic.jsp">
+  <put-attribute name="title" value="Tiles tutorial homepage" />
+  <put-attribute name="header" value="/tiles/banner.jsp" />
+  <put-attribute name="menu" value="/tiles/common_menu.jsp" />
+  <put-attribute name="body" value="myapp.homepage.body" />
+  <put-attribute name="footer" value="/tiles/credits.jsp" />
+</definition>
+------------------------------------
+
+  The <<<myapp.homepage.body>>> definition will be put inside the
+  <<<myapp.homepage>>>, by putting it inside its <<<body>>> attribute. You will
+  be seeing the definition one inside the other.
+
+* {Anonymous nested definitions}
+
+  What you can do with named subdefinitions can be done with nested anonymous
+  definitions. The above example can be rewritten in:
+  
+------------------------------------
+<definition name="myapp.homepage.body" template="/layouts/three_rows.jsp">
+  <put-attribute name="one" value="/tiles/headlines.jsp" />
+  <put-attribute name="two" value="/tiles/topics.jsp" />
+  <put-attribute name="one" value="/tiles/comments.jsp" />
+</definition>
+
+<definition name="myapp.homepage" template="/layouts/classic.jsp">
+  <put-attribute name="title" value="Tiles tutorial homepage" />
+  <put-attribute name="header" value="/tiles/banner.jsp" />
+  <put-attribute name="menu" value="/tiles/common_menu.jsp" />
+  <put-attribute name="body">
+    <definition template="/layouts/three_rows.jsp">
+      <put-attribute name="one" value="/tiles/headlines.jsp" />
+      <put-attribute name="two" value="/tiles/topics.jsp" />
+      <put-attribute name="one" value="/tiles/comments.jsp" />
+    </definition>
+  </put-attribute>
+  <put-attribute name="footer" value="/tiles/credits.jsp" />
+</definition>
+------------------------------------
+
+  The anonymous definition put under the "body" attribute can be used only by
+  the surrounding definition. Moreover, you can nest a definition into a nested
+  definition, with the desired level of depth.
+
+* {Cascaded attributes}
+
+  Attributes defined into a definition can be cascaded to be available to all
+  nested definitions and templates. For example the
+  {{{./nesting-extending.html#Named_subdefinitions}sample definition}} detailed above can be rewritten
+  this way:
+
+------------------------------------
+<definition name="myapp.homepage" template="/layouts/classic.jsp">
+  <put-attribute name="title" value="Tiles tutorial homepage" />
+  <put-attribute name="header" value="/tiles/banner.jsp" />
+  <put-attribute name="menu" value="/tiles/common_menu.jsp" />
+  <put-attribute name="body" value="/layouts/three_rows.jsp" />
+  <put-attribute name="footer" value="/tiles/credits.jsp" />
+
+  <put-attribute name="one" value="/tiles/headlines.jsp" cascade="true" />
+  <put-attribute name="two" value="/tiles/topics.jsp" cascade="true" />
+  <put-attribute name="one" value="/tiles/comments.jsp" cascade="true" />
+</definition>
+------------------------------------
+
+  The template of <<<myapp.homepage.body>>> definitionhas been used as the
+  <<<body>>> attribute in the <<<myapp.homepage>>> definition. All of the
+  attributes of <<<myapp.homepage.body>>> has been then moved as attributes
+  of <<<myapp.homepage>>> definition, but with the addition of the "cascade"
+  flag.
+
+Extending Definitions
+
+  You can extend definitions like a Java class. The concepts of <abstract
+  definition>, <extension> and <override> are available.
+  
+  * <<Abstract definition>>: it is a definition in which the template attributes
+  are not completely filled. They are useful to create a base page and a number
+  of extending definitions, reusing already created layout. For example:
+
+------------------------------------
+<definition name="myapp.page.common" template="/layouts/classic.jsp">
+  <put-attribute name="header" value="/tiles/banner.jsp" />
+  <put-attribute name="menu" value="/tiles/common_menu.jsp" />
+  <put-attribute name="footer" value="/tiles/credits.jsp" />
+</definition>
+------------------------------------
+
+  * <<Definition extension>>: a definition can inherit from another definition,
+  to reuse an already made (abstract or not) definition:
+
+------------------------------------
+<definition name="myapp.homepage" extends="myapp.page.common">
+  <put-attribute name="title" value="Tiles tutorial homepage" />
+  <put-attribute name="body" value="myapp.homepage.body" />
+</definition>
+------------------------------------
+
+  In this case, the <<<header>>>, <<<menu>>> and <<<footer>>> are inherited from
+  the <<<myapp.page.common>>> definition, while the rest is defined inside the
+  "concrete" definition.
+
+  * <<Template and attribute override>>: when extending a definition, its
+  template and attributes can be overridden.
+  
+    ** Overriding a template:
+    
+------------------------------------
+<definition name="myapp.homepage.alternate" extends="myapp.homepage"
+    template="/layouts/alternate.jsp" />
+------------------------------------
+
+    The definition has the same attributes, but its template changed. The result
+    is that the content is the same, but the layout is different.
+    
+    ** Overriding attributes:
+
+------------------------------------
+<definition name="myapp.homepage.customer" extends="myapp.homepage">
+  <put-attribute name="menu" value="/tiles/common_menu_for_customers.jsp" />
+</definition>
+------------------------------------
+    
+    In this case, the page will have the same appearance as the
+    <<<myapp.homepage>>> definition, but its menu subpage is different.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/preparer.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/preparer.apt
new file mode 100644
index 0000000..0cdf30a
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/preparer.apt
@@ -0,0 +1,70 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles View Preparers
+         -----------
+
+View Preparers
+
+  Sometimes a definition, before it is rendered, needs to be "prepared". For
+  example when showing a menu, the menu structure must be created and stored
+  in the request scope.
+
+  For this reason, a <<View Preparer>> can be used: it is called <<before>> the
+  definition is rendered, so all the things needed to render correctly the
+  definition can be prepared.
+
+* Creating a view preparer
+
+  A View Preparer is simply a class that implement the <<<ViewPreparer>>>
+  interface. The <<<execute>>> method allows to execute code <<before>> a
+  definition is rendered. You can extend the <<<ViewPreparerSupport>>> class to
+  avoid compiling problems in the case the <<<ViewPreparer>>> interface changes.
+
+----------------------------------------------
+package my.package;
+
+import org.apache.tiles.preparer.PreparerException;
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.Attribute;
+
+public class TestViewPreparer implements ViewPreparer {
+
+    public void execute(Request tilesRequest, AttributeContext attributeContext)
+    throws PreparerException {
+        attributeContext.putAttribute(
+            "body",
+            new Attribute("This is the value added by the ViewPreparer"));
+    }
+}
+----------------------------------------------
+
+* Associating a preparer
+
+  To associate a preparer to a definition, put its complete path name to the
+  <<<preparer>>> attribute of the <<<\<definition\>>>> element:
+
+----------------------------------------------
+<definition name="preparer.definition" preparer="org.apache.tiles.test.preparer.TestViewPreparer">
+  <put-attribute name="foo" value="/bar/foo.jsp" />
+</definition>
+----------------------------------------------
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/runtime.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/runtime.apt
new file mode 100644
index 0000000..4ab8258
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/runtime.apt
@@ -0,0 +1,127 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles Runtime Composition
+         -----------
+
+Tiles Runtime Composition
+
+  Tiles allows to create statically-determined page structures, like we've seen
+  in {{{../basic/pages.html}Creating Pages}}. But Tiles allows to fill
+  templates, modify definitions and create new definitions during the execution.
+
+Runtime Composition in JSP pages
+
+  Making runtime changes in JSP pages is pretty simple. You can use special JSP
+  tags that allow to create page structures on-the-fly.
+
+* Inserting templates
+
+  You can insert a template directly inside a JSP page, filling its attributes
+  at runtime. To do it, you can use the <<<\<tiles:insertTemplate\>>>> tag. The
+  attributes can be put using <<<\<tiles:putAttribute\>>>> and related tags.
+
+  Notice that you have all the features present in XML definition files, such as
+  {{{./nesting-extending.html#Anonymous_nested_definitions}anonymous nested definitions}}
+  and {{{./nesting-extending.html#Cascaded_attributes}cascade attributes}}.
+
+-----------------------------------
+<tiles:insertTemplate template="/layouts/classic.jsp">
+  <tiles:putAttribute name="title" value="Tiles tutorial homepage" />
+  <tiles:putAttribute name="header" value="/tiles/banner.jsp" />
+  <tiles:putAttribute name="menu" value="/tiles/common_menu.jsp" />
+  <tiles:putAttribute name="body">
+    <tiles:insertTemplate template="/layouts/variable_rows.jsp">
+      <tiles:putListAttribute name="items">
+        <tiles:addAttribute value="/tiles/banner.jsp" />
+        <tiles:addAttribute value="/tiles/common_menu.jsp" />
+        <tiles:addAttribute value="/tiles/credits.jsp" />
+      </tiles:putListAttribute>
+    </tiles:insertTemplate>
+  </tiles:putAttribute
+  <tiles:putAttribute name="footer" value="/tiles/credits.jsp" />
+</tiles:insertTemplate>
+-----------------------------------
+
+* {Inserting modified definitions}
+
+  Definitions can be inserted not only just as they are, but also overriding
+  their attributes and their template at runtime:
+
+------------------------------------
+<tiles:insertDefinition name="myapp.homepage.customer" template="/layouts/alternative_layout.jsp">
+  <tiles:putAttribute name="menu" value="/tiles/common_menu_for_customers.jsp" />
+</tiles:insertDefinition>
+------------------------------------
+
+* Creating Definitions
+
+  To create definitions at runtime, first of all you need to configure your
+  Tiles-based application to use a
+  {{{../../config-reference.html#Feature-Complete_configuration}mutable container}}.
+
+  In your JSP page, now you can create definitions. This definition will be
+  available during the request, and then it will expire.
+
+-----------------------------------------
+<tiles:definition name="myapp.homepage.customer" extends="myapp.homepage">
+  <tiles:putAttribute name="menu" value="/tiles/common_menu_for_customers.jsp" />
+</tiles:definition>
+<tiles:insertDefinition name="myapp.homepage.customer" />
+-----------------------------------------
+
+Runtime Composition using APIs
+
+  If you want to compose pages using the Tiles APIs, for example in a servlet
+  environment, you can use the <<container>> feature of Tiles. Essentially Tiles
+  is a container that stores definitions, allow to render pages and allows to
+  modify the configuration at runtime.
+
+* Using the Tiles container
+
+  To get the current container (in a servlet environment) you can use the
+  <<TilesAccess>> class:
+
+-------------------------------------
+TilesContainer container = TilesAccess.getContainer(
+        request.getSession().getServletContext());
+Request tilesRequest = new ServletRequest(container.getApplicationContext(), request, response);
+container.render("myapp.homepage", tilesRequest);
+-------------------------------------
+
+  <<Warning!>> The direct use of <<<AttributeContext>>> is deprecated. The same purpose can be
+  achieved easier and in a more maintainable way using {{{./el-support.html}Expression Languages}}
+
+* Creating Definitions
+
+  To create definitions at runtime, first of all you need to configure your
+  Tiles-based application to use a
+  {{{../../config-reference.html#Feature-Complete_configuration}mutable container}}.
+
+  This is a snippet to show how to create a definition.
+
+-------------------------------------
+MutableTilesContainer container = TilesAccess.getContainer(
+        request.getSession().getServletContext());
+Definition definition = new Definition();
+definition.setTemplate("/layouts/my_layout.jsp");
+definition.putAttribute("body", new Attribute("/tiles/body.jsp");
+container.register(definition, request, response);
+-------------------------------------
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/security.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/security.apt
new file mode 100644
index 0000000..0b610d6
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/security.apt
@@ -0,0 +1,91 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Security
+         -----------
+
+Security
+
+  Tiles allows the visibility of a template, an attribute or a definition only
+  to selected roles.
+
+* Allowing definitions
+
+  A definition can be allowed to be rendered only by selected roles:
+
+  * in XML definition files:
+
+---------------------------------
+<definition name="test.definition"
+    template="/layout/my-template.jsp role="myrole">
+    ...
+</definition>
+---------------------------------
+
+  * in JSP pages, when inserting definitions:
+
+---------------------------------
+<tiles:insertDefinition name="test.definition" role="myrole" />
+---------------------------------
+
+  * in JSP pages, when definining definitions:
+
+---------------------------------
+<tiles:definition name="test.definition"
+    template="/layout/my-template.jsp" role="myrole">
+    ...
+</tiles:definition>
+---------------------------------
+
+* Allowing attributes
+
+  An attribute can be allowed to be rendered only by selected roles:
+
+  * in XML definition files:
+
+---------------------------------
+<definition name="test.definition"
+    template="/layout/my-template.jsp>
+  <put-attribute name="header" value="/header.jsp" role="myrole" />
+</definition>
+---------------------------------
+
+  * in JSP pages, when inserting attributes:
+
+---------------------------------
+<tiles:insertAttribute name="header" role="myrole" />
+---------------------------------
+
+  * in JSP pages, when putting attributes:
+
+---------------------------------
+<tiles:putAttribute name="header" value="/header.jsp" role="myrole" />
+---------------------------------
+
+* Allowing templates
+
+  Templates can be allowed to be rendered only by selected rows in JSP pages:
+
+---------------------------------
+<tiles:insertTemplate name="test.definition"
+    template="/layout/my-template.jsp" "role="myrole">
+    ...
+</tiles:insertTemplate>
+---------------------------------
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/utils.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/utils.apt
new file mode 100644
index 0000000..3d3b244
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/utils.apt
@@ -0,0 +1,82 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Rendering Utilities
+         -----------
+
+Tiles Rendering Utilities
+
+  The core package of Tiles contains utilities to render Tiles definitions
+  without the need of a JSP page or a supporting framework.
+
+* <<<TilesDispatchServlet>>>
+
+  The <<<TilesDispatchServlet>>> is a servlet that intercepts the URLs ending
+  with "<<<.tiles>>>" and render the definition whose name is the path name
+  before the "<<<.tiles>>>" part.
+  
+  For example, if you call the <<<testdispatchservlet.tiles>>> path, the
+  rendered definition will be <<<testdispatchservlet>>>.
+
+  You can configure the <<<TilesDispatchServlet>>> this way:
+
+------------------------------------
+<servlet>
+    <servlet-name>Tiles Dispatch Servlet</servlet-name>
+    <servlet-class>org.apache.tiles.web.util.TilesDispatchServlet</servlet-class>
+</servlet>
+...
+<servlet-mapping>
+    <servlet-name>Tiles Dispatch Servlet</servlet-name>
+    <url-pattern>*.tiles</url-pattern>
+</servlet-mapping>
+------------------------------------
+
+  By using the <<<org.apache.tiles.web.util.TilesDispatchServlet.CONTAINER_KEY>>>
+  you can use a different container. The value of this parameter will be used
+  as the key under which the container is stored.
+
+* <<<TilesDecorationFilter>>>
+
+  You can use the <<<TilesDecorationFilter>>> to use Tiles as a <decorator>
+  framework. All the requests intercepted by the filter will be put inside the
+  configured attribute of the configured definition, and then that definition is
+  rendered.
+  
+  You can configure the filter this way:
+
+------------------------------------
+<filter>
+    <filter-name>Tiles Decoration Filter</filter-name>
+    <filter-class>org.apache.tiles.web.util.TilesDecorationFilter</filter-class>
+    <init-param>
+        <param-name>definition</param-name>
+        <param-value>test.definition</param-value>
+    </init-param>
+    <init-param>
+        <param-name>attribute-name</param-name>
+        <param-value>body</param-value>
+    </init-param>
+</filter>
+------------------------------------
+
+  By using the <<<org.apache.tiles.web.util.TilesDecorationFilter.CONTAINER_KEY>>>
+  you can use a different container. The value of this parameter will be used
+  as the key under which the container is stored.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/advanced/wildcard.apt b/TILES_3_0_X/src/site/apt/tutorial/advanced/wildcard.apt
new file mode 100644
index 0000000..4b0b244
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/advanced/wildcard.apt
@@ -0,0 +1,79 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Wildcard support
+         -----------
+
+Wildcard support
+
+  By default, Tiles supports wildcards in definition names. Wilcards help a
+  lot in writing less code to declare your definitions.
+
+  There are two styles:
+
+  * the wildcard-based style (available by default):
+
+------------------------------------
+<definition name="test.definition*.message*" template="/layout{1}.jsp">
+    <put-attribute name="title"  value="This definition has a message: {2}."/>
+    <put-attribute name="header" value="/header.jsp"/>
+    <put-attribute name="body"   value="/body.jsp"/>
+</definition>
+------------------------------------
+
+* {Using different pattern matching languages}
+
+  If you're using the <<<CompleteAutoloadTilesContainerFactory>>>, you must use a predix to specify
+  the pattern matching language you're using: either WILDCARD or REGEXP:
+
+------------------------------------
+<definition name="WILDCARD:test.definition*.message*" template="/layout{1}.jsp">
+    <put-attribute name="title"  value="This definition has a message: {2}."/>
+    <put-attribute name="header" value="/header.jsp"/>
+    <put-attribute name="body"   value="/body.jsp"/>
+</definition>
+------------------------------------
+
+  And, if you want to use Regular Expressions:
+
+------------------------------------
+<definition name="REGEXP:test\.definition(.*)\.message(.*)" template="/layout{1}.jsp">
+    <put-attribute name="title"  value="This definition has a message: {2}."/>
+    <put-attribute name="header" value="/header.jsp"/>
+    <put-attribute name="body"   value="/body.jsp"/>
+</definition>
+------------------------------------
+
+  In both cases, if you insert a definition that matches the definition, for example:
+
+------------------------------------
+<tiles:insertDefinition name="test.definitionOne.messageThisIsAMessage" />
+------------------------------------
+
+  The definition is automatically mapped, replacing placeholders, marked by
+  curly brackets, with the value of matched definitions. In this case:
+
+------------------------------------
+<definition name="test.definitionOne.messageThisIsAMessage" template="/layoutOne.jsp">
+    <put-attribute name="title"  value="This definition has a message: ThisIsAMessage."/>
+    <put-attribute name="header" value="/header.jsp"/>
+    <put-attribute name="body"   value="/body.jsp"/>
+</definition>
+------------------------------------
diff --git a/TILES_3_0_X/src/site/apt/tutorial/basic/concepts.apt b/TILES_3_0_X/src/site/apt/tutorial/basic/concepts.apt
new file mode 100644
index 0000000..654d61e
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/basic/concepts.apt
@@ -0,0 +1,123 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles Concepts
+         -----------
+
+Tiles concepts
+
+  Tiles is an implementation of the {{{../pattern.html}Composite View pattern}}.
+  Tiles adds to this pattern its own concepts to make the pattern concrete. The
+  implementation of Tiles around the <Composite View> pattern consists of the
+  {{{./concepts.html#Template}Template}}, {{{./concepts.html#Attribute}Attribute}}
+  and {{{./concepts.html#Definition}Definition}} concepts. The <View Helper>
+  pattern is implemented by the {{{./concepts.html#View Preparer}View Preparer}}
+  concept. 
+
+* {Template}
+
+  In Tiles, a <<template>> is the layout part of a page. You can see as a page
+  structure with some gaps, called <<attributes>>, to be filled.
+  
+  For instance, consider the "classic layout" page structure.
+
+[../../images/tiled_page.png] The "classic layout", a typical structure of a web
+page.
+
+  You can replicate this structure by creating a JSP page, as you can see below.
+
+-------------------------------
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<table>
+  <tr>
+    <td colspan="2">
+      <tiles:insertAttribute name="header" />
+    </td>
+  </tr>
+  <tr>
+    <td>
+      <tiles:insertAttribute name="menu" />
+    </td>
+    <td>
+      <tiles:insertAttribute name="body" />
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2">
+      <tiles:insertAttribute name="footer" />
+    </td>
+  </tr>
+</table>
+-------------------------------
+  
+  Notice that a template <<can have no attributes>>: in this case it can be used
+  directly.
+
+* {Attribute}
+
+  An <<attribute>> is a gap in a template that needs to be filled in your
+  application. An attribute can be of three types:
+  
+  * <<string>>: it is a string to be directly rendered as it is.
+  
+  * <<template>>: it is a template, with or without attributes. If it has
+  attributes, you have to fill them too to render a page.
+  
+  * <<definition>>: it is a reusable composed page, with all (or some)
+  attributes filled (see below).
+
+* {Definition}
+
+  A <<definition>> is a composition to be rendered to the end user; essentially
+  a definition is composed of a <<template>> and completely or partially
+  <<filled attributes>>.
+  
+  * If <<all>> of its attributes are filled, it can be rendered to the end user.
+  
+  * If <<not all>> of its attributes are filled, it is called an <<abstract
+  definition>>, and it can be used as a base definition for extended
+  definitions, or their missing attributes can be filled at runtime.
+  
+  []
+  
+  For example, you can create a page using the <classic layout> as seen before,
+  by modifying the {{{./pages.html}Tiles configuration file}}.
+  
+------------------------------------
+<definition name="myapp.homepage" template="/layouts/classic.jsp">
+  <put-attribute name="header" value="/tiles/banner.jsp" />
+  <put-attribute name="menu" value="/tiles/common_menu.jsp" />
+  <put-attribute name="body" value="/tiles/home_body.jsp" />
+  <put-attribute name="footer" value="/tiles/credits.jsp" />
+</definition>
+------------------------------------
+
+* {View Preparer}
+
+  Sometimes a definition, before it is rendered, needs to be "prepared". For
+  example when showing a menu, the menu structure must be created and stored
+  in the request scope.
+  
+  For this reason, a <<View Preparer>> can be used: it is called <<before>> the
+  definition is rendered, so all the things needed to render correctly the
+  definition can be prepared.
+  
+  See the {{{../advanced/preparer.html}Tiles View Preparer configuration}} for
+  more information.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/basic/index.apt b/TILES_3_0_X/src/site/apt/tutorial/basic/index.apt
new file mode 100644
index 0000000..b8a4e91
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/basic/index.apt
@@ -0,0 +1,32 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles Basic Usage
+         -----------
+
+Tiles Basic Usage
+
+  In this part of the tutorial, you will learn the basics of Tiles and its
+  simple usage in the most common cases.
+  
+  * {{{./concepts.html}Tiles concepts}}.
+  
+  * {{{./pages.html}Building Tiles-enabled pages}}.
+
diff --git a/TILES_3_0_X/src/site/apt/tutorial/basic/pages.apt b/TILES_3_0_X/src/site/apt/tutorial/basic/pages.apt
new file mode 100644
index 0000000..6afc4c8
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/basic/pages.apt
@@ -0,0 +1,134 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Creating Tiles Pages
+         -----------
+
+Creating and using Tiles pages
+
+  After installing and learning some of Tiles concepts, it is time to create
+  some pages. Here you will find the steps to create reusable Tiles pieces and
+  complete pages.
+
+* Create a template
+
+  Let's take the <<classic layout>> page structure:
+
+[../../images/tiled_page.png] The "classic layout", a typical structure of a web
+page.
+
+  Create a JSP page that acts as this layout and place it under
+  <<</layouts/classic.jsp>>> file.
+
+-------------------------------
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<html>
+  <head>
+    <title><tiles:getAsString name="title"/></title>
+  </head>
+  <body>
+	<table>
+      <tr>
+        <td colspan="2">
+          <tiles:insertAttribute name="header" />
+        </td>
+      </tr>
+      <tr>
+        <td>
+          <tiles:insertAttribute name="menu" />
+        </td>
+        <td>
+          <tiles:insertAttribute name="body" />
+        </td>
+      </tr>
+      <tr>
+        <td colspan="2">
+          <tiles:insertAttribute name="footer" />
+        </td>
+      </tr>
+    </table>
+  </body>
+</html>
+-------------------------------
+
+  This template has five attributes: <<<title>>> (of <<<string>>> type),
+  <<<header>>>, <<<menu>>>, <<<body>>> and <<<footer>>>.
+
+* Create the composing pages
+
+  In this phase, you have to create four JSP pages, that will take place of
+  <<<header>>>, <<<menu>>>, <<<body>>> and <<<footer>>> attributes in the
+  previously created template.
+
+  You can put everything you want in this pages, they are just a test.
+
+* Create a definition
+
+  By default, the definition file is <<</WEB-INF/tiles.xml>>>. If you're using <<<CompleteAutoloadTilesListener>>>,
+  tiles will use any file in the webapp that matches <<</WEB-INF/tiles*.xml>>> or any file in the classpath that matches
+  <<</META-INF/tiles*.xml>>>; if several are found, it will merge them together.  
+  
+  But for now, let's stick to the default and create the <<</WEB-INF/tiles.xml>>> file, with a definition
+  as described in {{{./concepts.html}concepts}}:
+
+------------------------------------
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+<tiles-definitions>
+  <definition name="myapp.homepage" template="/layouts/classic.jsp">
+    <put-attribute name="title" value="Tiles tutorial homepage" />
+    <put-attribute name="header" value="/tiles/banner.jsp" />
+    <put-attribute name="menu" value="/tiles/common_menu.jsp" />
+    <put-attribute name="body" value="/tiles/home_body.jsp" />
+    <put-attribute name="footer" value="/tiles/credits.jsp" />
+  </definition>
+</tiles-definitions>
+------------------------------------
+
+* Render the definition
+
+  After creating the definition, you can render it:
+
+  * by using the <<<\<tiles:insertDefinition /\>>>> tag, inserting it in a JSP
+  page:
+
+-------------------------------------
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<tiles:insertDefinition name="myapp.homepage" />
+-------------------------------------
+
+  * in other cases, you can render directly in the response, by using the Tiles
+  container:
+
+-----------------------------------
+TilesContainer container = TilesAccess.getContainer(
+        request.getSession().getServletContext());
+container.render("myapp.homepage", request, response);
+-----------------------------------
+
+  * by using {{{../advanced/utils.html}Rendering Utilities}} provided by Tiles. For instance,
+  if you've configured <<<TilesDispatchServlet>>>, you can render the definition above by
+  requesting <<<http://example.com/webapp/myapp.homepage.tiles>>>.
+
+  * by using a supporting framework. See
+  {{{../integration/index.html}Integrations}} for a list of supporting
+  frameworks.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/configuration.apt b/TILES_3_0_X/src/site/apt/tutorial/configuration.apt
new file mode 100644
index 0000000..05b9b74
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/configuration.apt
@@ -0,0 +1,74 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles Configuration
+         -----------
+
+Configuring Tiles in your web application
+
+  Tiles has always been a web application package, usually used in conjunction
+  with Struts. Apache Tiles\u0099 evolved to the point of being technology-independent, but
+  its use in a Servlet-based web application is still the most frequent use case.
+
+* Required libraries
+
+  The first thing is to install the required libraries. For the purpose of this tutorial,
+  we will install everything: the more we can do, the better. Just know that a 
+  more "lightweight" but limited configuration is available.
+  
+  If you're using maven, just include this dependency, it will include the rest:
+  
+-------------
+<groupId>org.apache.tiles</groupId>
+<artefactId>tiles-extras</artefactId>
+-------------  
+  
+  If you're not using maven, just {{{/download.html}download}} tiles and copy all the jars
+  into the /WEB-INF/lib directory.
+
+* Starting Tiles engine
+
+  Load the tiles container by using the appropriate listener it in your <<<web.xml>>> file. Since we
+  decided to load everything, we'll use <<<CompleteAutoloadTilesListener>>>:
+
+-------------------------------
+<listener>
+    <listener-class>org.apache.tiles.extras.complete.CompleteAutoloadTilesListener</listener-class>
+</listener>
+-------------------------------
+
+  For this tutorial, we'll configure Tiles to work directly with the servlet API, without a controller.
+  In the real world, you'll probably use an MVC framework like Struts or Shale or Spring. You have to 
+  configure your framework to work with Tiles; please refer to your framework's documentation for that. 
+  For now, we'll just declare <<<TilesDispatchServlet>>> in <<<web.xml>>>:
+  
+-------------------------------
+<servlet>
+    <servlet-name>Tiles Dispatch Servlet</servlet-name>
+    <servlet-class>org.apache.tiles.web.util.TilesDispatchServlet</servlet-class>
+</servlet>
+<servlet-mapping>
+    <servlet-name>Tiles Dispatch Servlet</servlet-name>
+    <url-pattern>*.tiles</url-pattern>
+</servlet-mapping>
+-------------------------------
+
+  This means that any request to an URL ending in ".tiles" will be dispatched directly to the matching
+  Tiles Definition.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/index.apt b/TILES_3_0_X/src/site/apt/tutorial/index.apt
new file mode 100644
index 0000000..fb0262c
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/index.apt
@@ -0,0 +1,68 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tutorial
+         -----------
+
+Introduction
+
+  This tutorial is intended to provide a help for first-time Tiles users, in the context of a web application.
+
+Summary
+
+  [[1]] {{{./pattern.html}The "composite view" pattern}}
+
+  [[2]] {{{./configuration.html}Configuring your web application}}
+
+  [[3]] {{{./basic/index.html}Basic Usage}}
+
+        [[1]] {{{./basic/concepts.html}Tiles Concepts}}
+
+        [[2]] {{{./basic/pages.html}Creating Tiles Pages}}
+
+  [[4]] {{{./advanced/index.html}Advanced Topics}}
+
+        [[1]] {{{./advanced/nesting-extending.html}Nesting and Extending Definitions}}
+
+        [[2]] {{{./advanced/list-attributes.html}List Attributes}}
+
+        [[3]] {{{./advanced/runtime.html}Runtime Composition}}
+
+        [[4]] {{{./advanced/preparer.html}View Preparers}}
+
+        [[5]] {{{./advanced/utils.html}Rendering Utilities}}
+
+        [[6]] {{{./advanced/l10n.html}Tiles Localization}}
+
+        [[7]] {{{./advanced/wildcard.html}Wildcard support}}
+
+        [[8]] {{{./advanced/el-support.html}EL support}}
+
+        [[8]] {{{./advanced/attribute-rendering.html}Attribute rendering}}
+
+        [[9]] {{{./advanced/multiple-containers.html}Using multiple containers}}
+
+        [[10]] {{{./advanced/security.html}Security}}
+
+  [[5]] {{{./integration/index.html}Integration with other technologies}}
+
+        [[1]] {{{./integration/frameworks.html}Integration with other frameworks}}
+
+        [[2]] {{{./integration/view.html}Integration with other view technologies}}
diff --git a/TILES_3_0_X/src/site/apt/tutorial/integration/frameworks.apt b/TILES_3_0_X/src/site/apt/tutorial/integration/frameworks.apt
new file mode 100644
index 0000000..e64ec44
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/integration/frameworks.apt
@@ -0,0 +1,41 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Integration with other Frameworks
+         -----------
+
+Integration with other web Frameworks
+
+  Tiles can be integrated with other web frameworks. Usually this kind of
+  integration is made through extensions/plugins to Tiles.
+  
+  * {{{http://struts.apache.org/1.x/index.html}Struts 1}}: Currently under
+  development. A Struts 1 plugin is available in the SVN trunk, that presumably
+  will be released along with Struts 1.4.
+  
+  * {{{http://struts.apache.org/2.x/docs/tiles-plugin.html}Struts 2}}: at the time of this 
+  writing, the Struts 2 Tiles plugin still uses Tiles version 2.
+  
+  * {{{http://static.springsource.org/spring/docs/current/spring-framework-reference/html/view.html#view-tiles}Spring MVC}}: 
+  At the time of this writing, Spring uses Tiles version 2.
+  
+  * {{{http://shale.apache.org/shale-tiles/index.html}Shale}}: An integration
+  layer is provided, but it needs to be updated to the latest released version
+  of Tiles.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/integration/freemarker.apt b/TILES_3_0_X/src/site/apt/tutorial/integration/freemarker.apt
new file mode 100644
index 0000000..0e6b974
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/integration/freemarker.apt
@@ -0,0 +1,121 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Integration with FreeMarker
+         -----------
+
+Integration with FreeMarker
+
+  {{{http://freemarker.sourceforge.net/}FreeMarker}} is a templating framework
+  that can be used as a replacement for JavaServer Pages (JSP). Tiles can be
+  used with FreeMarker through the use of Tiles FreeMarker package.
+
+* Configuration
+
+  To use FreeMarker together with Tiles
+
+  * Add FreeMarker jars (tested with FreeMarker 2.3.15).
+
+  * Add <<<tiles-template-x.x.x.jar>>> and <<<tiles-freemarker-x.x.x.jar>>> files
+  to your application
+
+  * To access ".ftl" files from HTTP requests, add this piece of configuration in <<<web.xml>>>
+  (the parameters can be modified as needed).
+
+----------------------------------
+<servlet>
+    <servlet-name>freemarker</servlet-name>
+    <servlet-class>org.apache.tiles.freemarker.servlet.TilesFreemarkerServlet</servlet-class>
+
+    <!-- FreemarkerServlet settings: -->
+    <init-param>
+        <param-name>TemplatePath</param-name>
+        <param-value>/</param-value>
+    </init-param>
+    <init-param>
+        <param-name>NoCache</param-name>
+        <param-value>true</param-value>
+    </init-param>
+    <init-param>
+        <param-name>ContentType</param-name>
+        <param-value>text/html</param-value>
+    </init-param>
+
+    <!-- FreeMarker settings: -->
+    <init-param>
+        <param-name>template_update_delay</param-name>
+        <param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. -->
+    </init-param>
+    <init-param>
+        <param-name>default_encoding</param-name>
+        <param-value>ISO-8859-1</param-value>
+    </init-param>
+    <init-param>
+        <param-name>number_format</param-name>
+        <param-value>0.##########</param-value>
+    </init-param>
+
+    <load-on-startup>5</load-on-startup>
+</servlet>
+----------------------------------
+
+  * To access ".ftl" files as attributes, register FreeMarkerAttributeRenderer
+  this way (only available in a servlet environment):
+
+----------------------------------
+@Override
+protected void registerAttributeRenderers(
+        BasicRendererFactory rendererFactory, TilesApplicationContext applicationContext,
+        TilesRequestContextFactory contextFactory,
+        TilesContainer container, AttributeEvaluator evaluator) {
+    super.registerAttributeRenderers(rendererFactory, applicationContext, contextFactory,
+            container, evaluator);
+    FreeMarkerAttributeRenderer freemarkerRenderer = new FreeMarkerAttributeRenderer();
+    freemarkerRenderer.setApplicationContext(applicationContext);
+    freemarkerRenderer.setEvaluator(evaluator);
+    freemarkerRenderer.setRequestContextFactory(contextFactory);
+    freemarkerRenderer.setParameter("TemplatePath", "/");
+    freemarkerRenderer.setParameter("NoCache", "true");
+    freemarkerRenderer.setParameter("ContentType", "text/html");
+    freemarkerRenderer.setParameter("template_update_delay", "0");
+    freemarkerRenderer.setParameter("default_encoding", "ISO-8859-1");
+    freemarkerRenderer.setParameter("number_format", "0.##########");
+    freemarkerRenderer.commit();
+    rendererFactory.registerRenderer("freemarker", freemarkerRenderer);
+}
+----------------------------------
+
+  This way you can specify an attribute that is rendered directly using this syntax:
+
+----------------------------------
+<put-attribute name="myAttribute" value="/pages/myPage.ftl" type="freemarker" />
+----------------------------------
+
+* Usage in FreeMarker templates
+
+  Tiles directives are available this way:
+
+----------------------------------
+<@tiles.nameOfDirective>
+  Other stuff...
+</@tiles.nameOfDirective>
+----------------------------------
+
+  For details about directives see the {{{../../apidocs/index.html}Javadocs}}.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/integration/index.apt b/TILES_3_0_X/src/site/apt/tutorial/integration/index.apt
new file mode 100644
index 0000000..1593ad8
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/integration/index.apt
@@ -0,0 +1,32 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Tiles Integrations
+         -----------
+
+Tiles integrations
+
+  Tiles can be integrated with various frameworks and view technologies, to
+  include Tiles elements into their specific features.
+  
+  * {{{./frameworks.html}Integration in web frameworks}}.
+  
+  * {{{./view.html}Integration in view technologies}}.
+
diff --git a/TILES_3_0_X/src/site/apt/tutorial/integration/velocity.apt b/TILES_3_0_X/src/site/apt/tutorial/integration/velocity.apt
new file mode 100644
index 0000000..a5c5529
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/integration/velocity.apt
@@ -0,0 +1,163 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Integration with Apache Velocity
+         -----------
+
+Integration with Apache Velocity
+
+  {{{http://velocity.apache.org/}Apache Velocity}} is a templating framework
+  that can be used as a replacement for JavaServer Pages (JSP). Tiles can be
+  used with Velocity through the use of Tiles Velocity package.
+
+* Configuration
+
+  To use Velocity together with Tiles
+
+  * Add Velocity (1.7 or better) and Velocity Tools (2.0 or better) jars to your application.
+
+  * Add <<<tiles-template-x.x.x.jar>>> and <<<tiles-velocity-x.x.x.jar>>> files
+  to your application.
+  * Add this code in you <<<velocity.properties>>> file:
+
+----------------------------------
+userdirective=org.apache.tiles.velocity.template.AddAttributeDirective,\
+  org.apache.tiles.velocity.template.AddListAttributeDirective,\
+  org.apache.tiles.velocity.template.DefinitionDirective,\
+  org.apache.tiles.velocity.template.GetAsStringDirective,\
+  org.apache.tiles.velocity.template.ImportAttributeDirective,\
+  org.apache.tiles.velocity.template.InsertAttributeDirective,\
+  org.apache.tiles.velocity.template.InsertDefinitionDirective,\
+  org.apache.tiles.velocity.template.InsertTemplateDirective,\
+  org.apache.tiles.velocity.template.PutAttributeDirective,\
+  org.apache.tiles.velocity.template.PutListAttributeDirective
+----------------------------------
+
+
+  * To access ".vm" files from HTTP requests, add this piece of configuration in <<<web.xml>>>
+  (the parameters can be modified as needed).
+
+----------------------------------
+<servlet>
+  <servlet-name>velocity</servlet-name>
+  <servlet-class>org.apache.velocity.tools.view.VelocityViewServlet</servlet-class>
+
+  <init-param>
+    <param-name>org.apache.velocity.toolbox</param-name>
+    <param-value>/WEB-INF/tools.xml</param-value>
+  </init-param>
+
+  <init-param>
+    <param-name>org.apache.velocity.properties</param-name>
+    <param-value>/WEB-INF/velocity.properties</param-value>
+  </init-param>
+</servlet>
+----------------------------------
+
+  * To access ".vm" files as attributes, register VelocityAttributeRenderer
+  this way (only available in a servlet environment):
+
+----------------------------------
+@Override
+protected void registerAttributeRenderers(
+        BasicRendererFactory rendererFactory, TilesApplicationContext applicationContext,
+        TilesRequestContextFactory contextFactory,
+        TilesContainer container, AttributeEvaluator evaluator) {
+    super.registerAttributeRenderers(rendererFactory, applicationContext, contextFactory,
+            container, evaluator);
+
+    VelocityAttributeRenderer velocityRenderer = new VelocityAttributeRenderer();
+    velocityRenderer.setApplicationContext(applicationContext);
+    velocityRenderer.setEvaluator(evaluator);
+    velocityRenderer.setRequestContextFactory(contextFactory);
+    velocityRenderer.setParameter("org.apache.velocity.toolbox", "/WEB-INF/tools.xml");
+    velocityRenderer.setParameter("org.apache.velocity.properties", "/WEB-INF/velocity.properties");
+    velocityRenderer.commit();
+    rendererFactory.registerRenderer("velocity", velocityRenderer);
+}
+----------------------------------
+
+  This way you can specify an attribute that is rendered directly using this syntax:
+
+----------------------------------
+<put-attribute name="myAttribute" value="/pages/myPage.vm" type="velocity" />
+----------------------------------
+
+* Usage in Velocity templates
+
+  There are two ways to use Tiles-Velocity integration:
+
+  * the <<<tiles>>> tool, that is a Velocity-style tool:
+
+----------------------------------
+$tilesAlt.startAttributeContext()
+$set($templateAttribute = $tilesAlt.createTemplateAttribute("/page/myTemplate.vm"))
+$set($attributeContext = $tilesAlt.getAttributeContext())
+  $set($attribute = $tilesAlt.createAttribute())
+  $attribute.setValue("This is the title.")
+  $attributeContext.putAttribute("title", $attribute})
+
+  $set($attribute = $tilesAlt.createAttribute())
+  $attribute.setValue("/velocity/header.vm")
+  $attribute.setRenderer("velocity")
+  $attributeContext.putAttribute("header", $attribute})
+
+  $set($attribute = $tilesAlt.createAttribute())
+  $attribute.setValue("/velocity/body.vm")
+  $attribute.setRenderer("velocity")
+  $attributeContext.putAttribute("body", $attribute})
+
+$tilesAlt.render($templateAttribute)
+$tilesAlt.endAttributeContext()
+----------------------------------
+
+  * the <<<tiles>>> directives, that have a tag-like meaning.
+
+----------------------------------
+#tiles_insertTemplate({"template":"/page/myTemplate.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
+----------------------------------
+
+  Other <<<tiles>>> directives are:
+  
+      * <<<getAsString(String attributeName)>>> - get the value of named attribute as string.
+
+      * <<<importAttribute(String attributeName, String toName)>>> - import the named attribute into the scope of
+  	template context under the (optional) custom name.
+
+      * <<<insertAttribute(String attributeName)>>> - inserts given attribute in the output in its own context.
+        If this is a string a string is printed, if this is a definition - it is included in the output.
+
+      * <<<insertAttribute(String attributeName, boolean ownContext)>>> - inserts given attribute in the output.
+        If this is a string a string is printed, if this is a definition - it is included in the output. You can specify whether
+        a separate context is created for rendering the definition - in this case variables with duplicate names
+        will not be inherited from the parent definition
+
+      * <<<insertDefinition(String definitionName)>>> - renders a definition in its own context.
+
+      * <<<insertDefinition(String definitionName, boolean ownContext)>>> - inserts definition, optionally in the shared context.
+
+      * <<<insertTemplate(String template)>>> - inserts a named page, equivalent to Velocity's <<<#parse>>>.
+
+
+  For details about the tool and directives see the {{{../../apidocs/index.html}Javadocs}}.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/integration/view.apt b/TILES_3_0_X/src/site/apt/tutorial/integration/view.apt
new file mode 100644
index 0000000..170015b
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/integration/view.apt
@@ -0,0 +1,31 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         Integration with other View Technologies
+         -----------
+
+Integration with other View Technologies
+
+  Currently Apache Tiles\u0099 is not only integrated with JavaServer Pages, but it can be used
+  with:
+
+  * {{{./freemarker.html}FreeMarker}}.
+
+  * {{{./velocity.html}Velocity}}.
diff --git a/TILES_3_0_X/src/site/apt/tutorial/pattern.apt b/TILES_3_0_X/src/site/apt/tutorial/pattern.apt
new file mode 100644
index 0000000..2d39d4d
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/tutorial/pattern.apt
@@ -0,0 +1,109 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         The Composite View Pattern
+         -----------
+
+The Composite View Pattern
+
+  All websites have something in common: they are made of pages that share
+  similar structures. The pages share the same layout, while each page is made
+  of different independent pieces, but always placed in the same position across
+  all the site.
+
+  The <<Composite View>> pattern formalizes this typical use, by allowing to
+  create pages that have a similar structure, in which each section of the page
+  vary in different situations.
+
+* How the pattern works
+
+  To understand this pattern, let's take an example. In the following picture
+  you can see a typical structure of a web page.
+
+[../images/tiled_page.png] The "classic layout", a typical structure of a web
+page.
+
+  This structure is called "Classic Layout". The template organizes the page
+  according to this layout, putting each "piece" in the needed place, so that
+  the header goes up, the footer down, etc.
+
+  It can happen that, for example clicking on a link, it is needed to change
+  only a part of the page, typically the body.
+
+[../images/page_to_page.png] The body changes, while the rest remains the same.
+
+  As you can see, the pages are different, but their difference is only in the
+  body part. Note that, however, <<the pages are distinct>>, it is not like a
+  refresh of a frame in a frameset!
+  
+  Using the composite view pattern, the other part of the page have been reused,
+  and the layout consistence has been preserved.
+  
+* The role of the View Helper
+
+  Each piece of the composed page can have a "view helper". This pattern allows
+  the preparation of the data to be displayed in a consistent way for the page
+  piece itself, for example to create a menu.
+
+* Composite View vs. Decorator
+
+  Tiles is a composite view framework: it allows to reuse page pieces across
+  the application. But another approach to achieve the same result is using the
+  <<Decorator pattern>>. For example,
+  {{{http://www.sitemesh.org/}Sitemesh}} is based on the Decorator
+  pattern.
+  
+  Instead of creating a template and organizing the pieces together, the
+  Decorator pattern (in this case) takes a simple HTML page, transforms it
+  adding the missing pieces (in our example, adding header, footer and menu) and
+  finally renders it.
+  
+  Here you can find a comparison table between the two patterns.
+  
+*---------------+--------------------------------+-----------------------------+
+| <<Aspect>>    | <<Composite View>>             | <<Decorator>>               |
+*---------------+--------------------------------+-----------------------------+
+| Reusability   | The different parts of the     | Each decorator can be       |
+|               | page (template and pieces) can | reused, but the decoration  |
+|               | be reused across the whole     | itself can be applied to    |
+|               | application.                   | one page at a time.         |
+*---------------+--------------------------------+-----------------------------+
+| Ease of       | Each page must be defined      | The decorator can be        |
+| configuration | explicitly.                    | applied even to the entire  |
+|               |                                | application.                |
+*---------------+--------------------------------+-----------------------------+
+| Runtime       | The pages can be configured    | Since one page is decorated |
+| configuration | and organized at runtime       | at a time, this feature is  |
+|               |                                | not present.                |
+*---------------+--------------------------------+-----------------------------+
+| Performances  | Low overhead for composition.  | The page to be decorated    |
+|               |                                | has to be parsed.           |
+*---------------+--------------------------------+-----------------------------+
+
+
+* References
+
+  You can see the complete description of the Composite View pattern at:
+  
+  * {{{http://java.sun.com/blueprints/corej2eepatterns/Patterns/CompositeView.html}
+  Sun's Core J2EE Patterns}}
+  
+  * {{{http://java.sun.com/blueprints/patterns/CompositeView.html}
+  Sun's Blueprints Patterns}}
diff --git a/TILES_3_0_X/src/site/apt/whats-new.apt b/TILES_3_0_X/src/site/apt/whats-new.apt
new file mode 100644
index 0000000..dedac2d
--- /dev/null
+++ b/TILES_3_0_X/src/site/apt/whats-new.apt
@@ -0,0 +1,52 @@
+~~ $Id$
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+~~
+         -----------
+         What's new in Tiles 3.0
+         -----------
+
+What's new in Tiles 3.0
+
+* New features in Tiles 3.0
+
+  * {{{/tiles-request/}Apache Request}}: a framework independent request abstraction. Implementations for Servlet, 
+  Portlet, JSP, Velocity, FreeMarker and Mustache.
+
+  * {{{/tiles-autotag/}Apache Autotag}}: a tool that automatically generates tags (or tag-like) artifact from a common template code for a range of templating languages.
+  All the Tiles 3 boilerplate code to templating models has been removed and uses the Autotag plugins instead:
+  it's a lot of boilerplate, boring code, now generated automatically.
+
+* Deprecations in Tiles 3.0
+
+  * Starting Tiles in a web environment using a dummy Servlet. Use a SerlvetContextListener instead.
+  
+  * Don't use the AttributeContext interface to pass attribute values to Tiles. Expression Languages are an easier, more maintainable 
+  way to change the value of attributes on a per-render basis.
+
+  * ...
+
+* Removals in Tiles 3.0
+
+  * Upgraded from JavaSE 5.0 to JavaSE 6.0.
+  
+  * Upgraded from Servlet 2.4 and JSP 2.0 to Servlet 2.5 and JSP 2.1.
+  
+  * Changed the Java API to adopt the Request API. The XML files and taglibs are compatible with tiles 2.2.
+  
+  * Dropped the parameter based configuration that was deprecated in 2.2.
diff --git a/TILES_3_0_X/src/site/resources/images/page_to_page.png b/TILES_3_0_X/src/site/resources/images/page_to_page.png
new file mode 100644
index 0000000..78883ad
--- /dev/null
+++ b/TILES_3_0_X/src/site/resources/images/page_to_page.png
Binary files differ
diff --git a/TILES_3_0_X/src/site/resources/images/tiled_page.png b/TILES_3_0_X/src/site/resources/images/tiled_page.png
new file mode 100644
index 0000000..f8f2ee1
--- /dev/null
+++ b/TILES_3_0_X/src/site/resources/images/tiled_page.png
Binary files differ
diff --git a/TILES_3_0_X/src/site/site.xml b/TILES_3_0_X/src/site/site.xml
new file mode 100644
index 0000000..ab8686e
--- /dev/null
+++ b/TILES_3_0_X/src/site/site.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Framework">
+    <bannerLeft>
+        <name>Apache Software Foundation</name>
+        <src>http://www.apache.org/images/asf-logo.gif</src>
+        <href>http://www.apache.org</href>
+    </bannerLeft>
+    <bannerRight>
+        <name>Apache Tiles&#8482;</name>
+        <src>http://tiles.apache.org/images/logo.png</src>
+        <href>http://tiles.apache.org</href>
+    </bannerRight>
+    <body>
+
+        <links>
+            <item name="Apache" href="http://www.apache.org" />
+            <item name="Tiles" href="http://tiles.apache.org" />
+        </links>
+
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../index.html"/>
+            <item
+                   name="Tiles project start page"
+                   href="./index.html"/>
+            <item
+                   name="Security bulletins"
+                   href="security/index.html"/>
+        </menu>
+        <menu name="Documentation">
+            <item
+                    name="What's new"
+                    href="whats-new.html"/>
+            <item
+                    name="Tutorial"
+                    href="tutorial/index.html"
+                    collapse="true">
+                <item
+                        name="The composite view pattern"
+                        href="tutorial/pattern.html"/>
+                <item
+                        name="Configuration"
+                        href="tutorial/configuration.html"/>
+                <item
+                        name="Basic Usage"
+                        href="tutorial/basic/index.html"
+                        collapse="true">
+                    <item
+                            name="Tiles Concepts"
+                            href="tutorial/basic/concepts.html"/>
+                    <item
+                            name="Creating Pages"
+                            href="tutorial/basic/pages.html"/>
+                </item>
+                <item
+                        name="Advanced Topics"
+                        href="tutorial/advanced/index.html"
+                        collapse="true">
+                    <item
+                            name="Nesting and Extending"
+                            href="tutorial/advanced/nesting-extending.html"/>
+                    <item
+                            name="List Attributes"
+                            href="tutorial/advanced/list-attributes.html"/>
+                    <item
+                            name="Runtime Composition"
+                            href="tutorial/advanced/runtime.html"/>
+                    <item
+                            name="View Preparers"
+                            href="tutorial/advanced/preparer.html"/>
+                    <item
+                            name="Rendering Utilities"
+                            href="tutorial/advanced/utils.html"/>
+                    <item
+                            name="Localization"
+                            href="tutorial/advanced/l10n.html"/>
+                    <item
+                            name="Wildcard support"
+                            href="tutorial/advanced/wildcard.html"/>
+                    <item
+                            name="EL support"
+                            href="tutorial/advanced/el-support.html"/>
+                    <item
+                            name="Attribute rendering"
+                            href="tutorial/advanced/attribute-rendering.html"/>
+                    <item
+                            name="Multiple containers"
+                            href="tutorial/advanced/multiple-containers.html"/>
+                    <item
+                            name="Security"
+                            href="tutorial/advanced/security.html"/>
+                </item>
+                <item
+                        name="Integrations"
+                        href="tutorial/integration/index.html"
+                        collapse="true">
+                    <item
+                            name="Frameworks"
+                            href="tutorial/integration/frameworks.html"/>
+                    <item
+                            name="View technologies"
+                            href="tutorial/integration/view.html">
+                        <item
+                                name="FreeMarker"
+                                href="tutorial/integration/freemarker.html"/>
+                        <item
+                                name="Velocity"
+                                href="tutorial/integration/velocity.html"/>
+                    </item>
+                </item>
+            </item>
+            <item
+                    name="Wiki"
+                    href="http://cwiki.apache.org/TILES/"/>
+            <item
+                    name="Migration"
+                    href="migration/index.html"/>
+        </menu>
+        <menu name="Reference">
+            <item
+                    name="Getting Started"
+                    href="getting_started.html"/>
+            <item
+                    name="Configuration reference"
+                    href="config-reference.html"/>
+            <item
+                    name="Javadoc"
+                    href="apidocs/index.html"/>
+            <item
+                    name="Taglibdoc"
+                    href="tiles-jsp/tlddoc/index.html"/>
+            <item
+                    name="Taglib Reference"
+                    href="tiles-jsp/tagreference.html"/>
+            <item
+                    name="DTD Doc"
+                    href="tiles-core/dtddoc/index.html"/>
+        </menu>
+
+        <menu name="Developers">
+            <item
+                    name="Building"
+                    href="/dev/building.html"/>
+            <item
+                    name="Snapshots"
+                    href="/dev/snapshots.html"/>
+            <item
+                    name="Release Process"
+                    href="/dev/release.html"/>
+            <item
+                    name="Selenium Testing"
+                    href="/selenium.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/src/site/xdoc/dev/building.xml b/TILES_3_0_X/src/site/xdoc/dev/building.xml
new file mode 100644
index 0000000..7fb099a
--- /dev/null
+++ b/TILES_3_0_X/src/site/xdoc/dev/building.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<document>
+
+    <properties>
+        <title>Apache Tiles</title>
+    </properties>
+
+    <body>
+        <section name="Building Tiles">
+          <subsection name="Prerequisites">
+            <p>For all the next instructions, we assume that you downloaded and
+            installed <a href="http://maven.apache.org/">Maven</a>.</p>
+            <p>To download packages from the source repository, you need to
+            download and install <a href="http://subversion.tigris.org/">
+            Subversion</a>.</p>
+            <p>If you want to build something including JavaDocs (assemblies,
+            sites and JavaDoc report itself) you need to install
+            <a href="http://www.graphviz.org/">GraphViz</a>, otherwise you will
+            notice missing pictures inside JavaDocs pages.</p>
+          </subsection>
+          <subsection name="Building main packages">
+            <p>To build Tiles from source you need to:</p>
+            <ul>
+            <li><p><a href="/download.html">download</a> the source
+            distribution, or checkout the latest version:</p>
+            <p><source>svn co http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-parent</source></p></li>
+            <li><p>go into the source directory and type:</p>
+            <p><source>mvn package</source></p></li>
+            </ul>
+            <p>You will find the generated JARs under:</p>
+            <ul>
+            <li>{tiles-dir}/tiles-{module}/target/tiles-{module}-${version}.jar</li>
+            </ul>
+          </subsection>
+          <subsection name="Building Tiles Test webapp">
+            <p>See <a href="../selenium.html">Selenium testing with Tiles Test
+            webapp</a>.</p>
+          </subsection>
+          <subsection name="Building distributions">
+            <p>To build distributions, you need to:</p>
+            <ul>
+            <li><p><a href="/download.html">download</a> the source
+            distribution, or checkout the latest version:</p>
+            <p><source>svn co http://svn.apache.org/repos/asf/tiles/framework/trunk/</source></p></li>
+            <li><p>go into the source directory and type:</p>
+            <p><source>mvn install site</source></p></li>
+            <li><p>go into the <code>{tiles-dir}/assembly</code> directory and
+            type:</p>
+            <p><source>mvn assembly:assembly</source></p></li>
+            </ul>
+            <p>You will find the generated distribution under
+            <code>{tiles-dir}/assembly/target/assembly/out</code>.</p>
+          </subsection>
+        </section>
+        <section name="Building Tiles websites">
+          <p>There are four Tiles websites: the main website and the projects
+          websitesi (tiles-request, tiles-autotag, framework).</p>
+          <subsection name="Building main website">
+            <p>To build the main website:</p>
+            <ul>
+            <li><p>checkout the site from the source repository:</p>
+            <p><source>svn co http://svn.apache.org/repos/asf/tiles/site/</source></p></li>
+            <li><p>go into the site directory and type:</p>
+            <p><source>mvn site</source></p></li>
+            </ul>
+            <p>You will find the generated distribution under
+            <code>{tiles-site-dir}/target/site</code>.</p>
+          </subsection>
+          <subsection name="Building a project's website">
+            <p>To build the framework website:</p>
+            <ul>
+            <li><p><a href="/download.html">download</a> the source
+            distribution, or checkout the latest version:</p>
+            <p><source>svn co http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-parent/</source></p></li>
+            <li><p>go into the source directory and type:</p>
+            <p><source>mvn site site:stage</source></p></li>
+            </ul>
+            <p>You will find the generated website under:</p>
+            <ul>
+            <li>{tiles-dir}/target/staging</li>
+            </ul>
+          </subsection>
+        </section>
+    </body>
+
+</document>
diff --git a/TILES_3_0_X/src/site/xdoc/dev/snapshots.xml b/TILES_3_0_X/src/site/xdoc/dev/snapshots.xml
new file mode 100644
index 0000000..d73af59
--- /dev/null
+++ b/TILES_3_0_X/src/site/xdoc/dev/snapshots.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<document>
+
+    <properties>
+        <title>Apache Tiles</title>
+    </properties>
+
+    <body>
+        <section name="Apache Tiles&#8482;">
+        <subsection name="Snapshots">
+
+        <p>Looking for snapshot builds of the latest version of Tiles?
+           Snapshots are occasionally published to Apache's Maven snapshot
+           repository, which can be accessed with the following configuration:</p>
+
+        <source>
+        <![CDATA[
+          <repository>
+              <id>apache.snapshots</id>
+              <name>Apache Maven Snapshot Repository</name>
+              <url>http://repository.apache.org/snapshots</url>
+          </repository>
+        ]]>
+        </source>
+
+        <p>After configuring the repository, declare a dependency on
+        Tiles:</p>
+
+        <source><![CDATA[
+          <dependency>
+              <groupId>org.apache.tiles</groupId>
+              <artifactId>tiles-core</artifactId>
+              <version>3.0.0-SNAPSHOT</version>
+          </dependency>
+        ]]>
+        </source>
+
+   <p>You can see Tiles in action by downloading a snapshot of the 'tiles-test' webapp,
+   <a href="http://repository.apache.org/snapshots/org/apache/tiles/tiles-test/3.0.0-SNAPSHOT">
+   here</a>.</p>
+
+    </subsection>
+</section>
+</body>
+
+</document>
diff --git a/TILES_3_0_X/src/site/xdoc/images/page_to_page.svg b/TILES_3_0_X/src/site/xdoc/images/page_to_page.svg
new file mode 100644
index 0000000..72ac013
--- /dev/null
+++ b/TILES_3_0_X/src/site/xdoc/images/page_to_page.svg
@@ -0,0 +1,450 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="297mm"
+   height="210mm"
+   id="svg17456"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   sodipodi:docbase="C:\Documents and Settings\Administrator\Documenti\devs\workspace\tiles-site\src\site\xdoc\images"
+   sodipodi:docname="page_to_page.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="C:\Documents and Settings\Administrator\Documenti\devs\workspace\tiles-site\src\site\xdoc\images\page_to_page.png"
+   inkscape:export-xdpi="45.738995"
+   inkscape:export-ydpi="45.738995">
+  <defs
+     id="defs17458">
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Lstart"
+       style="overflow:visible">
+      <path
+         id="path10215"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         transform="scale(0.8) translate(12.5,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Lend"
+       style="overflow:visible;">
+      <path
+         id="path10218"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
+         transform="scale(0.8) rotate(180) translate(12.5,0)" />
+    </marker>
+    <filter
+       y="-0.11950515"
+       x="-0.025476923"
+       height="1.2390103"
+       inkscape:collect="always"
+       id="filter16368"
+       width="1.0509538">
+      <feGaussianBlur
+         stdDeviation="5.9752577"
+         id="feGaussianBlur16370"
+         inkscape:collect="always" />
+    </filter>
+    <filter
+       y="-0.026283871"
+       x="-0.10446155"
+       height="1.0525677"
+       inkscape:collect="always"
+       id="filter16360"
+       width="1.2089231">
+      <feGaussianBlur
+         stdDeviation="5.7574194"
+         id="feGaussianBlur16362"
+         inkscape:collect="always" />
+    </filter>
+    <filter
+       id="filter16364"
+       inkscape:collect="always">
+      <feGaussianBlur
+         stdDeviation="8.1709926"
+         id="feGaussianBlur16366"
+         inkscape:collect="always" />
+    </filter>
+    <filter
+       y="-0.1026308"
+       x="-0.026569395"
+       height="1.2052616"
+       inkscape:collect="always"
+       id="filter15383"
+       width="1.0531388">
+      <feGaussianBlur
+         stdDeviation="6.2311555"
+         id="feGaussianBlur15385"
+         inkscape:collect="always" />
+    </filter>
+    <linearGradient
+       id="linearGradient9013">
+      <stop
+         offset="0"
+         style="stop-color:#0000f1;stop-opacity:1;"
+         id="stop9015" />
+      <stop
+         offset="1"
+         style="stop-color:#0000e7;stop-opacity:1;"
+         id="stop9017" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9013"
+       id="linearGradient3270"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-85.176716,-201.15627)"
+       x1="100"
+       y1="179.50504"
+       x2="662.85712"
+       y2="179.50504" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9013"
+       id="linearGradient3293"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-85.176716,-201.15627)"
+       x1="100"
+       y1="179.50504"
+       x2="662.85712"
+       y2="179.50504" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:document-units="mm"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.73377778"
+     inkscape:cx="526.18109"
+     inkscape:cy="372.04724"
+     inkscape:current-layer="layer1"
+     id="namedview17460"
+     inkscape:window-width="1024"
+     inkscape:window-height="742"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4" />
+  <metadata
+     id="metadata17462">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       width="562.85712"
+       id="rect2164"
+       style="fill:url(#linearGradient3270);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter15383)"
+       height="145.71428"
+       x="14.823284"
+       y="-94.508362"
+       ry="39.891556"
+       rx="39.891556"
+       transform="matrix(0.5314768,0,0,0.5314768,61.511991,173.91617)" />
+    <rect
+       width="408.08701"
+       id="rect2160"
+       style="fill:#a56f63;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.97929907px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16364)"
+       height="525.74072"
+       x="169.61116"
+       y="68.342117"
+       ry="47.144566"
+       rx="47.144566"
+       transform="matrix(0.5314768,0,0,0.5314768,61.511991,173.91617)" />
+    <rect
+       width="132.27649"
+       id="rect2166"
+       style="fill:#a42ae3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99249059px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16360)"
+       height="525.71429"
+       x="14.81953"
+       y="68.34877"
+       ry="36.265053"
+       rx="36.265053"
+       transform="matrix(0.5314768,0,0,0.5314768,61.511991,173.91617)" />
+    <rect
+       width="562.8866"
+       id="rect2168"
+       style="fill:#d34ba1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.98513663px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16368)"
+       height="120"
+       x="14.815853"
+       y="614.06311"
+       ry="43.518063"
+       rx="43.518063"
+       transform="matrix(0.5314768,0,0,0.5314768,61.511991,173.91617)" />
+    <rect
+       width="335.80774"
+       id="rect2178"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.01408041;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       height="471.15994"
+       x="50.299847"
+       y="108.69428"
+       ry="0"
+       rx="0" />
+    <text
+       x="155.08797"
+       y="173.56755"
+       id="text9029"
+       style="font-size:32.03010941px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="155.08797"
+         y="173.56755"
+         id="tspan9031"
+         sodipodi:role="line">Header</tspan></text>
+    <text
+       x="174.85722"
+       y="255.69447"
+       id="text12917"
+       style="font-size:32.03010941px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan18497"
+         x="174.85722"
+         y="255.69447">Body 1</tspan></text>
+    <text
+       inkscape:transform-center-x="-61.281104"
+       xml:space="preserve"
+       inkscape:transform-center-y="218.68718"
+       id="text12921"
+       style="font-size:32.03010941px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="-389.19147"
+       y="113.1748"
+       transform="matrix(0,-1,1,0,0,0)"><tspan
+         x="-389.19147"
+         y="113.1748"
+         id="tspan12923"
+         sodipodi:role="line">Menu</tspan></text>
+    <text
+       x="170.38945"
+       y="539.88239"
+       id="text12925"
+       style="font-size:32.03010941px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="170.38945"
+         y="539.88239"
+         id="tspan12927"
+         sodipodi:role="line">Footer</tspan></text>
+    <text
+       x="54.635624"
+       y="100.42758"
+       id="text12929"
+       style="font-size:32.03010941px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="54.635624"
+         y="100.42758"
+         id="tspan12931"
+         sodipodi:role="line">Template</tspan></text>
+    <path
+       style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 371.94791,611.12074 L 22.947911,611.12074 L 22.947911,57.120742 L 418.94791,57.120742 L 418.94791,562.12074"
+       id="rect2193"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#e0cdda;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.95418596;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 417.97082,562.3824 L 372.54218,611.05262 C 380.85914,591.75202 374.67472,574.86832 367.26476,558.18888 C 385.05185,567.20981 390.43537,571.137 417.97082,562.3824 z "
+       id="path2208"
+       sodipodi:nodetypes="cccc" />
+    <text
+       x="20.474751"
+       y="45.45446"
+       id="text3182"
+       style="font-size:32.03010941px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="20.474751"
+         y="45.45446"
+         id="tspan3184"
+         sodipodi:role="line">Page 1</tspan></text>
+    <rect
+       width="562.85712"
+       id="rect3186"
+       style="fill:url(#linearGradient3293);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter15383)"
+       height="145.71428"
+       x="14.823284"
+       y="-94.508362"
+       ry="39.891556"
+       rx="39.891556"
+       transform="matrix(0.5314768,0,0,0.5314768,665.06438,174.33843)" />
+    <rect
+       width="408.08701"
+       id="rect3188"
+       style="fill:#d24d31;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.97929907px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16364)"
+       height="525.74072"
+       x="169.61116"
+       y="68.342117"
+       ry="47.144566"
+       rx="47.144566"
+       transform="matrix(0.5314768,0,0,0.5314768,665.06438,174.33843)" />
+    <rect
+       width="132.27649"
+       id="rect3190"
+       style="fill:#a42ae3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99249059px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16360)"
+       height="525.71429"
+       x="14.81953"
+       y="68.34877"
+       ry="36.265053"
+       rx="36.265053"
+       transform="matrix(0.5314768,0,0,0.5314768,665.06438,174.33843)" />
+    <rect
+       width="562.8866"
+       id="rect3192"
+       style="fill:#d34ba1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.98513663px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16368)"
+       height="120"
+       x="14.815853"
+       y="614.06311"
+       ry="43.518063"
+       rx="43.518063"
+       transform="matrix(0.5314768,0,0,0.5314768,665.06438,174.33843)" />
+    <rect
+       width="335.80774"
+       id="rect3194"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.01408041;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       height="471.15994"
+       x="653.85223"
+       y="109.11654"
+       ry="0"
+       rx="0" />
+    <text
+       x="758.64038"
+       y="173.98979"
+       id="text3196"
+       style="font-size:32.03010941px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="758.64038"
+         y="173.98979"
+         id="tspan3198"
+         sodipodi:role="line">Header</tspan></text>
+    <text
+       x="811.11707"
+       y="352.87628"
+       id="text3200"
+       style="font-size:32.03010941px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         x="811.11707"
+         y="352.87628"
+         id="tspan3314">Body 2</tspan></text>
+    <text
+       inkscape:transform-center-x="-61.281104"
+       xml:space="preserve"
+       inkscape:transform-center-y="218.68718"
+       id="text3204"
+       style="font-size:32.03010941px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="-389.61377"
+       y="716.72717"
+       transform="matrix(0,-1,1,0,0,0)"><tspan
+         x="-389.61377"
+         y="716.72717"
+         id="tspan3206"
+         sodipodi:role="line">Menu</tspan></text>
+    <text
+       x="773.94183"
+       y="540.30469"
+       id="text3208"
+       style="font-size:32.03010941px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="773.94183"
+         y="540.30469"
+         id="tspan3210"
+         sodipodi:role="line">Footer</tspan></text>
+    <text
+       x="658.18799"
+       y="100.84985"
+       id="text3212"
+       style="font-size:32.03010941px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="658.18799"
+         y="100.84985"
+         id="tspan3214"
+         sodipodi:role="line">Template</tspan></text>
+    <path
+       style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 975.5003,611.543 L 626.5003,611.543 L 626.5003,57.543004 L 1022.5003,57.543004 L 1022.5003,562.543"
+       id="path3216"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#e0cdda;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.95418596;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 1021.5232,562.80466 L 976.09457,611.47488 C 984.41153,592.17428 978.22711,575.29058 970.81715,558.61114 C 988.60424,567.63207 993.98776,571.55926 1021.5232,562.80466 z "
+       id="path3218"
+       sodipodi:nodetypes="cccc" />
+    <text
+       x="624.0271"
+       y="45.876732"
+       id="text3220"
+       style="font-size:32.03010941px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3226"
+         x="624.0271"
+         y="45.876732">Page 2</tspan></text>
+    <g
+       id="g7251"
+       transform="translate(-24.530587,0)">
+      <text
+         sodipodi:linespacing="125%"
+         xml:space="preserve"
+         style="font-size:22.17276764px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+         id="text4326"
+         y="336.59854"
+         x="189.11517"><tspan
+           y="336.59854"
+           x="189.11517"
+           id="tspan4328"
+           sodipodi:role="line">Link to Page 2</tspan></text>
+      <path
+         id="path4338"
+         d="M 190.79346,343.42822 C 195.47152,343.42822 209.08858,343.42822 218.04967,343.42822 C 225.31799,343.42822 232.58631,343.42822 239.85463,343.42822 C 247.12295,343.42822 254.39128,343.42822 261.6596,343.42822 C 269.38219,343.42822 277.10478,343.42822 284.82738,343.42822 C 292.54997,343.42822 300.27256,343.42822 307.99515,343.42822 C 314.8092,343.42822 321.62326,343.42822 328.43731,343.42822 C 333.88855,343.42822 339.33979,343.42822 344.79103,343.42822"
+         style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.06220484;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    </g>
+    <path
+       style="opacity:1;fill:#2e54e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.84306264;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 596.5625 312.96875 L 596.5625 325.4375 L 322.71875 325.4375 L 322.71875 331.4375 L 596.5625 331.4375 L 596.5625 343.71875 L 623.1875 328.34375 L 596.5625 312.96875 z "
+       id="rect14612" />
+  </g>
+</svg>
diff --git a/TILES_3_0_X/src/site/xdoc/images/tiled_page.svg b/TILES_3_0_X/src/site/xdoc/images/tiled_page.svg
new file mode 100644
index 0000000..7fe04ff
--- /dev/null
+++ b/TILES_3_0_X/src/site/xdoc/images/tiled_page.svg
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   sodipodi:docbase="C:\Documents and Settings\Administrator\Documenti\devs\workspace\tiles-site\src\site\xdoc\images"
+   sodipodi:docname="tiled_page.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="C:\Documents and Settings\PTRNTN77A26E506O\Documenti\disegno.png"
+   inkscape:export-xdpi="23.716087"
+   inkscape:export-ydpi="23.716087">
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.51883278"
+     inkscape:cx="372.04724"
+     inkscape:cy="526.18109"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     inkscape:window-width="1024"
+     inkscape:window-height="742"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4"
+     showguides="true"
+     showgrid="false"
+     width="131.10236px"
+     height="184.25197px" />
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient9013">
+      <stop
+         offset="0"
+         style="stop-color:#0000f1;stop-opacity:1;"
+         id="stop9015" />
+      <stop
+         offset="1"
+         style="stop-color:#0000e7;stop-opacity:1;"
+         id="stop9017" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient6077">
+      <stop
+         offset="0"
+         style="stop-color:#0000ff;stop-opacity:1;"
+         id="stop6079" />
+      <stop
+         offset="0.125"
+         style="stop-color:#0000ff;stop-opacity:0.8745098;"
+         id="stop7064" />
+      <stop
+         offset="0.25"
+         style="stop-color:#0000ff;stop-opacity:0.74901961;"
+         id="stop6091" />
+      <stop
+         offset="0.5"
+         style="stop-color:#0000ff;stop-opacity:0.49803922;"
+         id="stop6089" />
+      <stop
+         offset="1"
+         style="stop-color:#0000ff;stop-opacity:0;"
+         id="stop6081" />
+    </linearGradient>
+    <linearGradient
+       x2="662.85712"
+       y2="179.50504"
+       inkscape:collect="always"
+       x1="100"
+       id="linearGradient9019"
+       y1="179.50504"
+       xlink:href="#linearGradient9013"
+       gradientUnits="userSpaceOnUse" />
+    <filter
+       y="-0.1026308"
+       x="-0.026569395"
+       height="1.2052616"
+       inkscape:collect="always"
+       id="filter15383"
+       width="1.0531388">
+      <feGaussianBlur
+         stdDeviation="6.2311555"
+         id="feGaussianBlur15385"
+         inkscape:collect="always" />
+    </filter>
+    <filter
+       y="-0.026283871"
+       x="-0.10446155"
+       height="1.0525677"
+       inkscape:collect="always"
+       id="filter16360"
+       width="1.2089231">
+      <feGaussianBlur
+         stdDeviation="5.7574194"
+         id="feGaussianBlur16362"
+         inkscape:collect="always" />
+    </filter>
+    <filter
+       id="filter16364"
+       inkscape:collect="always">
+      <feGaussianBlur
+         stdDeviation="8.1709926"
+         id="feGaussianBlur16366"
+         inkscape:collect="always" />
+    </filter>
+    <filter
+       y="-0.11950515"
+       x="-0.025476923"
+       height="1.2390103"
+       inkscape:collect="always"
+       id="filter16368"
+       width="1.0509538">
+      <feGaussianBlur
+         stdDeviation="5.9752577"
+         id="feGaussianBlur16370"
+         inkscape:collect="always" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9013"
+       id="linearGradient16485"
+       gradientUnits="userSpaceOnUse"
+       x1="100"
+       y1="179.50504"
+       x2="662.85712"
+       y2="179.50504" />
+  </defs>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Livello 1"
+     id="layer1"
+     inkscape:groupmode="layer">
+    <rect
+       width="562.85712"
+       id="rect2164"
+       style="fill:url(#linearGradient16485);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter15383)"
+       height="145.71428"
+       x="100"
+       y="106.6479"
+       ry="21.201435"
+       rx="21.201435" />
+    <rect
+       width="408.08701"
+       id="rect2160"
+       style="fill:#a56f63;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.97929907px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16364)"
+       height="525.74072"
+       x="254.78787"
+       y="269.49838"
+       ry="25.056242"
+       rx="25.056242" />
+    <rect
+       width="132.27649"
+       id="rect2166"
+       style="fill:#a42ae3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99249059px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16360)"
+       height="525.71429"
+       x="99.996246"
+       y="269.50504"
+       ry="19.274033"
+       rx="19.274033" />
+    <rect
+       width="562.8866"
+       id="rect2168"
+       style="fill:#d34ba1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.98513663px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16368)"
+       height="120"
+       x="99.992569"
+       y="815.21936"
+       ry="23.128839"
+       rx="23.128839" />
+    <rect
+       width="631.83899"
+       id="rect2178"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.90804267;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       height="886.51086"
+       x="64.080521"
+       y="78.438026"
+       ry="22.219292"
+       rx="21.853825" />
+    <text
+       x="261.2446"
+       y="200.50032"
+       id="text9029"
+       style="font-size:60.2662468px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="261.2446"
+         y="200.50032"
+         id="tspan9031"
+         sodipodi:role="line">Header</tspan></text>
+    <text
+       x="378.79764"
+       y="537.08411"
+       id="text12917"
+       style="font-size:60.2662468px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="378.79764"
+         y="537.08411"
+         id="tspan12919"
+         sodipodi:role="line">Body</tspan></text>
+    <text
+       inkscape:transform-center-x="-29.162036"
+       xml:space="preserve"
+       inkscape:transform-center-y="-34.693259"
+       id="text12921"
+       style="font-size:60.2662468px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="-606.20746"
+       y="182.38286"
+       transform="matrix(0,-1,1,0,0,0)"><tspan
+         x="-606.20746"
+         y="182.38286"
+         id="tspan12923"
+         sodipodi:role="line">Menu</tspan></text>
+    <text
+       x="290.0351"
+       y="889.73987"
+       id="text12925"
+       style="font-size:60.2662468px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="290.0351"
+         y="889.73987"
+         id="tspan12927"
+         sodipodi:role="line">Footer</tspan></text>
+    <text
+       x="72.238495"
+       y="62.883839"
+       id="text12929"
+       style="font-size:60.2662468px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         x="72.238495"
+         y="62.883839"
+         id="tspan12931"
+         sodipodi:role="line">Template</tspan></text>
+  </g>
+</svg>
diff --git a/TILES_3_0_X/tiles-api/pom.xml b/TILES_3_0_X/tiles-api/pom.xml
new file mode 100644
index 0000000..ece72cc
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.apache.tiles</groupId>
+        <artifactId>tiles-parent</artifactId>
+        <version>3.0.1</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>tiles-api</artifactId>
+    <packaging>jar</packaging>
+    <name>Tiles - API</name>
+    <description>Tiles APIs, containing interfaces and classes to interact with
+    Tiles.</description>
+
+    <properties>
+        <tiles.osgi.symbolicName>org.apache.tiles.api</tiles.osgi.symbolicName>
+    </properties>
+
+    <build>
+
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <excludes>
+                    <exclude>LICENSE.txt</exclude>
+                    <exclude>NOTICE.txt</exclude>
+                </excludes>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>LICENSE.txt</include>
+                    <include>NOTICE.txt</include>
+                </includes>
+                <targetPath>META-INF</targetPath>
+            </resource>
+        </resources>
+
+    </build>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+              <groupId>junit</groupId>
+              <artifactId>junit</artifactId>
+              <scope>test</scope>
+          </dependency>
+        <dependency>
+              <groupId>org.easymock</groupId>
+              <artifactId>easymockclassextension</artifactId>
+              <scope>test</scope>
+          </dependency>
+        <dependency>
+        	<groupId>org.slf4j</groupId>
+        	<artifactId>slf4j-jdk14</artifactId>
+        	<optional>true</optional>
+        </dependency>
+        <dependency>
+        	<groupId>org.apache.tiles</groupId>
+        	<artifactId>tiles-request-api</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/Attribute.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/Attribute.java
new file mode 100644
index 0000000..ee0652c
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/Attribute.java
@@ -0,0 +1,384 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+import static org.apache.tiles.CompareUtil.*;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.tiles.request.Request;
+
+/**
+ * Common implementation of attribute definition.
+ *
+ * @version $Rev$ $Date$
+ */
+public class Attribute implements Serializable, Cloneable {
+
+    /**
+     * The name of the template renderer.
+     */
+    private static final String TEMPLATE_RENDERER = "template";
+
+    /**
+     * The roles that can render this attribute.
+     * @since 2.0.6
+     */
+    protected Set<String> roles = null;
+
+    /**
+     * The value of the attribute.
+     */
+    protected Object value = null;
+
+    /**
+     * The expression to evaluate. Ignored if {@link #value} is not
+     * <code>null</code>.
+     *
+     * @since 2.2.0
+     */
+    protected Expression expressionObject = null;
+
+    /**
+     * The renderer name of the attribute. Default names are <code>string</code>,
+     * <code>template</code>, <code>definition</code>, <code>object</code>.
+     */
+    private String renderer = null;
+
+    /**
+     * Constructor.
+     *
+     */
+    public Attribute() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param value Object to store.
+     */
+    public Attribute(Object value) {
+        this.value = value;
+    }
+
+    /**
+     * Copy constructor.
+     *
+     * @param attribute The attribute to copy from.
+     */
+    public Attribute(Attribute attribute) {
+        this.roles = attribute.roles;
+        this.value = attribute.getValue();
+        if (attribute.expressionObject != null) {
+            this.expressionObject = new Expression(attribute.expressionObject);
+        } else {
+            this.expressionObject = null;
+        }
+        this.renderer = attribute.renderer;
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param value Object to store.
+     * @param role  Asociated role.
+     */
+    public Attribute(Object value, String role) {
+        this.value = value;
+        setRole(role);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param value Object to store. If specified, the <code>expression</code>
+     * parameter will be ignored.
+     * @param expression The expression to be evaluated. Ignored if the
+     * <code>value</code> is not null.
+     * @param role Associated role.
+     * @param rendererName The renderer name.
+     * @since 2.2.0
+     */
+    public Attribute(Object value, Expression expression, String role, String rendererName) {
+        this.value = value;
+        this.expressionObject = expression;
+        this.renderer = rendererName;
+        setRole(role);
+    }
+
+    /**
+     * Creates a template attribute, starting from the name of the template.
+     *
+     * @param template The template that will be rendered.
+     * @return The template attribute.
+     * @since 2.1.2
+     */
+    public static Attribute createTemplateAttribute(String template) {
+        Attribute attribute = new Attribute();
+        attribute.setValue(template);
+        attribute.setRenderer(TEMPLATE_RENDERER);
+        return attribute;
+    }
+
+    /**
+     * Creates a template attribute, starting from the name of the template.
+     *
+     * @param template The template that will be rendered.
+     * @param templateExpression The template expression that will be evaluated
+     * to a template.
+     * @param templateType The type, or renderer, of the template. If null, the
+     * default <code>template</code> will be used.
+     * @param role The comma-separated roles for which the template is
+     * authorized to be rendered.
+     * @return The template attribute.
+     * @since 2.2.2
+     */
+    public static Attribute createTemplateAttribute(String template,
+            String templateExpression, String templateType, String role) {
+        Attribute templateAttribute = createTemplateAttribute(template);
+        templateAttribute.setRole(role);
+        if (templateType != null) {
+            templateAttribute.setRenderer(templateType);
+        }
+        templateAttribute
+                .setExpressionObject(Expression
+                        .createExpressionFromDescribedExpression(templateExpression));
+        return templateAttribute;
+    }
+
+    /**
+     * Creates a template attribute, starting from the expression to evaluate to
+     * obtain the template.
+     *
+     * @param templateExpression The expression to evaluate.
+     * @return The template attribute.
+     * @since 2.1.2
+     */
+    public static Attribute createTemplateAttributeWithExpression(
+            String templateExpression) {
+        Attribute attribute = new Attribute();
+        attribute.setExpressionObject(new Expression(templateExpression));
+        attribute.setRenderer(TEMPLATE_RENDERER);
+        return attribute;
+    }
+
+    /**
+     * Get role.
+     * @return the name of the required role(s)
+     */
+    public String getRole() {
+        String retValue = null;
+
+        if (roles != null && !roles.isEmpty()) {
+            StringBuilder builder = new StringBuilder();
+            Iterator<String> roleIt = roles.iterator();
+            if (roleIt.hasNext()) {
+                builder.append(roleIt.next());
+                while (roleIt.hasNext()) {
+                    builder.append(",");
+                    builder.append(roleIt.next());
+                }
+                retValue = builder.toString();
+            }
+        }
+
+        return retValue;
+    }
+
+    /**
+     * Returns the roles that can render this attribute.
+     *
+     * @return The enabled roles.
+     * @since 2.0.6
+     */
+    public Set<String> getRoles() {
+        return roles;
+    }
+
+    /**
+     * Set role.
+     *
+     * @param role Associated role.
+     */
+    public void setRole(String role) {
+        if (role != null && role.trim().length() > 0) {
+            String[] rolesStrings = role.split("\\s*,\\s*");
+            roles = new HashSet<String>();
+            for (int i = 0; i < rolesStrings.length; i++) {
+                roles.add(rolesStrings[i]);
+            }
+        } else {
+            roles = null;
+        }
+    }
+
+    /**
+     * Sets the roles that can render this attribute.
+     *
+     * @param roles The enabled roles.
+     * @since 2.0.6
+     */
+    public void setRoles(Set<String> roles) {
+        this.roles = roles;
+    }
+
+    /**
+     * Get value.
+     * @return the value
+     */
+    public Object getValue() {
+        return value;
+    }
+
+    /**
+     * Set value.
+     *
+     * @param value New value.
+     */
+    public void setValue(Object value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns The expression to evaluate. Ignored if {@link #value} is not
+     * <code>null</code>.
+     *
+     * @return The expression to be evaluated.
+     * @since 2.2.0
+     */
+    public Expression getExpressionObject() {
+        return expressionObject;
+    }
+
+    /**
+     * Sets The expression to evaluate. Ignored if {@link #value} is not
+     * <code>null</code>.
+     *
+     * @param expressionObject The expression to be evaluated.
+     * @since 2.2.0
+     */
+    public void setExpressionObject(Expression expressionObject) {
+        this.expressionObject = expressionObject;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String toString() {
+        if (value != null) {
+            return value.toString();
+        }
+        return null;
+    }
+
+    /**
+     * Returns the renderer name to use.
+     *
+     * @return The renderer name.
+     * @since 2.1.0
+     */
+    public String getRenderer() {
+        return renderer;
+    }
+
+    /**
+     * Sets the renderer name to use.
+     *
+     * @param rendererName The renderer.
+     * @since 2.1.0
+     */
+    public void setRenderer(String rendererName) {
+        this.renderer = rendererName;
+    }
+
+    /**
+     * Inherits an attribute, i.e. overwrites null properties with the ones
+     * provided by the attribute.
+     *
+     * @param attribute The attribute to inherit.
+     * @since 2.1.2
+     */
+    public void inherit(Attribute attribute) {
+        if (value == null) {
+            value = attribute.getValue();
+        }
+        Expression targetExpressionObject = attribute.getExpressionObject();
+        if (targetExpressionObject != null
+                && (expressionObject == null || expressionObject
+                        .getExpression() == null)) {
+            expressionObject = new Expression(targetExpressionObject);
+        }
+        if (roles == null || roles.isEmpty()) {
+            roles = attribute.getRoles();
+        }
+        if (renderer == null) {
+            renderer = attribute.getRenderer();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean equals(Object obj) {
+        Attribute attribute = (Attribute) obj;
+        return nullSafeEquals(value, attribute.value)
+                && nullSafeEquals(renderer, attribute.renderer)
+                && nullSafeEquals(roles, attribute.roles)
+                && nullSafeEquals(expressionObject, attribute.expressionObject);
+    }
+
+    /**
+     * Checks if the current user can use this attribute.
+     *
+     * @param request The request context.
+     * @return <code>true</code> if the current user can see this attribute.
+     * @since 3.0.0
+     */
+    public boolean isPermitted(Request request) {
+        if (roles == null || roles.isEmpty()) {
+            return true;
+        }
+
+        boolean retValue = false;
+
+        for (Iterator<String> roleIt = roles.iterator(); roleIt.hasNext()
+                && !retValue;) {
+            retValue = request.isUserInRole(roleIt.next());
+        }
+
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int hashCode() {
+        return nullSafeHashCode(value) + nullSafeHashCode(renderer)
+                + nullSafeHashCode(roles) + nullSafeHashCode(expressionObject);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Attribute clone() {
+        return new Attribute(this);
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/AttributeContext.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/AttributeContext.java
new file mode 100644
index 0000000..ab899ec
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/AttributeContext.java
@@ -0,0 +1,171 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Encapsulation of the current state of execution.
+ *
+ * @since Tiles 2.0
+ * @version $Rev$ $Date$
+ */
+public interface AttributeContext {
+
+    /**
+     * Returns the attribute that will be used to render a template.
+     *
+     * @return The template attribute.
+     * @since 2.1.2
+     */
+    Attribute getTemplateAttribute();
+
+    /**
+     * Sets the template attribute, that will be used to render the template
+     * page.
+     *
+     * @param templateAttribute The template attribute.
+     * @since 2.1.2
+     */
+    void setTemplateAttribute(Attribute templateAttribute);
+
+    /**
+     * Get associated preparer instance.
+     *
+     * @return The preparer name.
+     * @since 2.1.0
+     */
+    String getPreparer();
+
+    /**
+     * Set associated preparer instance.
+     *
+     * @param url The preparer name.
+     * @since 2.1.0
+     */
+    void setPreparer(String url);
+
+    /**
+     * Add all attributes to the context.
+     *
+     * @param newAttributes the attributes to be added.
+     */
+    void addAll(Map<String, Attribute> newAttributes);
+
+    /**
+     * Add all attributes to the context.
+     *
+     * @param defaultAttributes attributes which should be present.
+     */
+    void addMissing(Map<String, Attribute> defaultAttributes);
+
+    /**
+     * Copies the cascaded attributes to this attribute context.
+     *
+     * @param parent The parent context to be used.
+     * @since 2.1.0
+     */
+    void inheritCascadedAttributes(AttributeContext parent);
+
+    /**
+     * Copies all missing attributes from the <code>parent</code> attribute
+     * context to this one.
+     *
+     * @param parent The attribute context to copy attributes from.
+     * @since 2.1.0
+     */
+    void inherit(AttributeContext parent);
+
+    /**
+     * Retrieve the named attribute, either cascaded or not.
+     *
+     * @param name key name for the attribute.
+     * @return Attribute associated with the given name.
+     */
+    Attribute getAttribute(String name);
+
+    /**
+     * Retrieve the attribute that has been defined in this context (i.e. not
+     * cascaded).
+     *
+     * @param name key name for the attribute.
+     * @return Attribute The local attribute associated with the given name, if
+     * present, or <code>null</code> otherwise.
+     * @since 2.1.0
+     */
+    Attribute getLocalAttribute(String name);
+
+    /**
+     * Retrieve the attribute that has been cascaded at upper levels.
+     *
+     * @param name key name for the attribute.
+     * @return Attribute The cascaded attribute associated with the given name,
+     * if present, or <code>null</code> otherwise.
+     * @since 2.1.0
+     */
+    Attribute getCascadedAttribute(String name);
+
+    /**
+     * Returns the names of the local attributes, i.e. the one that have not
+     * been cascaded.
+     *
+     * @return The local attribute names.
+     * @since 2.1.0
+     */
+    Set<String> getLocalAttributeNames();
+
+    /**
+     * Returns the names of the cascaded attributes.
+     *
+     * @return The cascaded attribute names.
+     * @since 2.1.0
+     */
+    Set<String> getCascadedAttributeNames();
+
+    /**
+     * Add the specified attribute. The attribute value will be available only
+     * in the current context, i.e. it is like calling
+     * {@link AttributeContext#putAttribute(String, Attribute, boolean)} with
+     * <code>cascade = false</code>.
+     *
+     * @param name name of the attribute
+     * @param value value of the attribute
+     */
+    void putAttribute(String name, Attribute value);
+
+    /**
+     * Add the specified attribute.
+     *
+     * @param name name of the attribute
+     * @param value value of the attribute
+     * @param cascade If <code>true</code>, the attribute value will be
+     * available in all nested contexts. If <code>false</code>, it will be
+     * available only in the current context.
+     * @since 2.1.0
+     */
+    void putAttribute(String name, Attribute value, boolean cascade);
+
+    /**
+     * Clear the attributes.
+     */
+    void clear();
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/BasicAttributeContext.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/BasicAttributeContext.java
new file mode 100644
index 0000000..d6cfc7f
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/BasicAttributeContext.java
@@ -0,0 +1,471 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+import static org.apache.tiles.CompareUtil.*;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+
+/**
+ * Basic implementation for <code>AttributeContext</code>.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class BasicAttributeContext implements AttributeContext, Serializable {
+
+    /**
+     * The template attribute, to render a template.
+     *
+     * @since 2.1.2
+     */
+    protected Attribute templateAttribute;
+
+    /**
+     * Associated ViewPreparer URL or classname, if defined.
+     *
+     * @since 2.1.0
+     */
+    protected String preparer = null;
+
+    /**
+     * Template attributes.
+     * @since 2.1.0
+     */
+    protected Map<String, Attribute> attributes = null;
+
+    /**
+     * Cascaded template attributes.
+     * @since 2.1.0
+     */
+    protected Map<String, Attribute> cascadedAttributes = null;
+
+    /**
+     * Constructor.
+     *
+     * @since 2.1.0
+     */
+    public BasicAttributeContext() {
+    }
+
+    /**
+     * Constructor.
+     * Create a context and set specified attributes.
+     *
+     * @param attributes Attributes to initialize context.
+     * @since 2.1.0
+     */
+    public BasicAttributeContext(Map<String, Attribute> attributes) {
+        if (attributes != null) {
+            this.attributes = deepCopyAttributeMap(attributes);
+        }
+    }
+
+    /**
+     * Copy constructor.
+     *
+     * @param context The constructor to copy.
+     * @since 2.1.0
+     */
+    public BasicAttributeContext(AttributeContext context) {
+        if (context instanceof BasicAttributeContext) {
+            copyBasicAttributeContext((BasicAttributeContext) context);
+        } else {
+            Attribute parentTemplateAttribute = context.getTemplateAttribute();
+            if (parentTemplateAttribute != null) {
+                this.templateAttribute = new Attribute(parentTemplateAttribute);
+            }
+            this.preparer = context.getPreparer();
+            this.attributes = new HashMap<String, Attribute>();
+            Set<String> parentAttributeNames = context.getLocalAttributeNames();
+            if (parentAttributeNames != null) {
+                for (String name : parentAttributeNames) {
+                    attributes.put(name, new Attribute(context.getLocalAttribute(name)));
+                }
+            }
+            inheritCascadedAttributes(context);
+        }
+    }
+
+    /**
+     * Copy constructor.
+     *
+     * @param context The constructor to copy.
+     * @since 2.1.0
+     */
+    public BasicAttributeContext(BasicAttributeContext context) {
+        copyBasicAttributeContext(context);
+    }
+
+    /** {@inheritDoc} */
+    public Attribute getTemplateAttribute() {
+        return templateAttribute;
+    }
+
+    /** {@inheritDoc} */
+    public void setTemplateAttribute(Attribute templateAttribute) {
+        this.templateAttribute = templateAttribute;
+    }
+
+    /** {@inheritDoc} */
+    public String getPreparer() {
+        return preparer;
+    }
+
+    /** {@inheritDoc} */
+    public void setPreparer(String url) {
+        this.preparer = url;
+    }
+
+    /** {@inheritDoc} */
+    public void inheritCascadedAttributes(AttributeContext context) {
+        if (context instanceof BasicAttributeContext) {
+            copyCascadedAttributes((BasicAttributeContext) context);
+        } else {
+            this.cascadedAttributes = new HashMap<String, Attribute>();
+            Set<String> parentAttributeNames = context.getCascadedAttributeNames();
+            if (parentAttributeNames != null) {
+                for (String name : parentAttributeNames) {
+                    cascadedAttributes.put(name, new Attribute(context
+                            .getCascadedAttribute(name)));
+                }
+            }
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void inherit(AttributeContext parent) {
+        if (parent instanceof BasicAttributeContext) {
+            inherit((BasicAttributeContext) parent);
+        } else {
+            // Inheriting template, roles and preparer.
+            Attribute parentTemplateAttribute = parent.getTemplateAttribute();
+            inheritParentTemplateAttribute(parentTemplateAttribute);
+            if (preparer == null) {
+                preparer = parent.getPreparer();
+            }
+
+            // Inheriting attributes.
+            Set<String> names = parent.getCascadedAttributeNames();
+            if (names != null && !names.isEmpty()) {
+                for (String name : names) {
+                    Attribute attribute = parent.getCascadedAttribute(name);
+                    Attribute destAttribute = getCascadedAttribute(name);
+                    if (destAttribute == null) {
+                        putAttribute(name, attribute, true);
+                    } else if (attribute instanceof ListAttribute
+                            && destAttribute instanceof ListAttribute
+                            && ((ListAttribute) destAttribute).isInherit()) {
+                        ((ListAttribute) destAttribute).inherit((ListAttribute) attribute);
+                    }
+                }
+            }
+            names = parent.getLocalAttributeNames();
+            if (names != null && !names.isEmpty()) {
+                for (String name : names) {
+                    Attribute attribute = parent.getLocalAttribute(name);
+                    Attribute destAttribute = getLocalAttribute(name);
+                    if (destAttribute == null) {
+                        putAttribute(name, attribute, false);
+                    } else if (attribute instanceof ListAttribute
+                            && destAttribute instanceof ListAttribute
+                            && ((ListAttribute) destAttribute).isInherit()) {
+                        ((ListAttribute) destAttribute).inherit((ListAttribute) attribute);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Inherits the attribute context, inheriting, i.e. copying if not present,
+     * the attributes.
+     *
+     * @param parent The attribute context to inherit.
+     * @since 2.1.0
+     */
+    public void inherit(BasicAttributeContext parent) {
+        // Set template, roles and preparer if not set.
+        inheritParentTemplateAttribute(parent.getTemplateAttribute());
+        if (preparer == null) {
+            preparer = parent.preparer;
+        }
+
+        // Sets attributes.
+        cascadedAttributes = addMissingAttributes(parent.cascadedAttributes,
+                cascadedAttributes);
+        attributes = addMissingAttributes(parent.attributes, attributes);
+    }
+
+    /**
+     * Add all attributes to this context.
+     * Copies all of the mappings from the specified attribute map to this context.
+     * New attribute mappings will replace any mappings that this context had for any of the keys
+     * currently in the specified attribute map.
+     *
+     * @param newAttributes Attributes to add.
+     * @since 2.1.0
+     */
+    public void addAll(Map<String, Attribute> newAttributes) {
+        if (newAttributes == null) {
+            return;
+        }
+
+        if (attributes == null) {
+            attributes = new HashMap<String, Attribute>(newAttributes);
+            return;
+        }
+
+        attributes.putAll(newAttributes);
+    }
+
+    /**
+     * Add all missing attributes to this context.
+     * Copies all of the mappings from the specified attributes map to this context.
+     * New attribute mappings will be added only if they don't already exist in
+     * this context.
+     *
+     * @param defaultAttributes Attributes to add.
+     * @since 2.1.0
+     */
+    public void addMissing(Map<String, Attribute> defaultAttributes) {
+        if (defaultAttributes == null) {
+            return;
+        }
+
+        if (attributes == null) {
+            attributes = new HashMap<String, Attribute>();
+            if (cascadedAttributes == null || cascadedAttributes.isEmpty()) {
+                attributes.putAll(defaultAttributes);
+                return;
+            }
+        }
+
+        Set<Map.Entry<String, Attribute>> entries = defaultAttributes.entrySet();
+        for (Map.Entry<String, Attribute> entry : entries) {
+            String key = entry.getKey();
+            if (!attributes.containsKey(key)
+                    && (cascadedAttributes == null || !cascadedAttributes
+                            .containsKey(key))) {
+                attributes.put(entry.getKey(), entry.getValue());
+            }
+        }
+    }
+
+    /** {@inheritDoc} */
+    public Attribute getAttribute(String name) {
+        Attribute retValue = null;
+        if (attributes != null) {
+            retValue = attributes.get(name);
+        }
+
+        if (retValue == null && cascadedAttributes != null) {
+            retValue = cascadedAttributes.get(name);
+        }
+
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    public Attribute getLocalAttribute(String name) {
+        if (attributes == null) {
+            return null;
+        }
+
+        return attributes.get(name);
+    }
+
+    /** {@inheritDoc} */
+    public Attribute getCascadedAttribute(String name) {
+        if (cascadedAttributes == null) {
+            return null;
+        }
+
+        return cascadedAttributes.get(name);
+    }
+
+    /** {@inheritDoc} */
+    public Set<String> getLocalAttributeNames() {
+        if (attributes != null && !attributes.isEmpty()) {
+            return attributes.keySet();
+        }
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    public Set<String> getCascadedAttributeNames() {
+        if (cascadedAttributes != null && !cascadedAttributes.isEmpty()) {
+            return cascadedAttributes.keySet();
+        }
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    public void putAttribute(String name, Attribute value) {
+        if (attributes == null) {
+            attributes = new HashMap<String, Attribute>();
+        }
+
+        attributes.put(name, value);
+    }
+
+    /** {@inheritDoc} */
+    public void putAttribute(String name, Attribute value, boolean cascade) {
+        Map<String, Attribute> mapToUse;
+        if (cascade) {
+            if (cascadedAttributes == null) {
+                cascadedAttributes = new HashMap<String, Attribute>();
+            }
+            mapToUse = cascadedAttributes;
+        } else {
+            if (attributes == null) {
+                attributes = new HashMap<String, Attribute>();
+            }
+            mapToUse = attributes;
+        }
+        mapToUse.put(name, value);
+    }
+
+    /** {@inheritDoc} */
+    public void clear() {
+        templateAttribute = null;
+        preparer = null;
+        attributes.clear();
+        cascadedAttributes.clear();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean equals(Object obj) {
+        BasicAttributeContext bac = (BasicAttributeContext) obj;
+        return nullSafeEquals(templateAttribute, bac.templateAttribute)
+                && nullSafeEquals(preparer, bac.preparer)
+                && nullSafeEquals(attributes, bac.attributes)
+                && nullSafeEquals(cascadedAttributes, bac.cascadedAttributes);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int hashCode() {
+        return nullSafeHashCode(templateAttribute) + nullSafeHashCode(preparer)
+                + nullSafeHashCode(attributes)
+                + nullSafeHashCode(cascadedAttributes);
+    }
+
+    /**
+     * Inherits the parent template attribute.
+     *
+     * @param parentTemplateAttribute The parent template attribute.
+     */
+    private void inheritParentTemplateAttribute(
+            Attribute parentTemplateAttribute) {
+        if (parentTemplateAttribute != null) {
+            if (templateAttribute == null) {
+                templateAttribute = new Attribute(parentTemplateAttribute);
+            } else {
+                templateAttribute.inherit(parentTemplateAttribute);
+            }
+        }
+    }
+
+    /**
+     * Copies a BasicAttributeContext in an easier way.
+     *
+     * @param context The context to copy.
+     */
+    private void copyBasicAttributeContext(BasicAttributeContext context) {
+        Attribute parentTemplateAttribute = context.getTemplateAttribute();
+        if (parentTemplateAttribute != null) {
+            this.templateAttribute = new Attribute(parentTemplateAttribute);
+        }
+        preparer = context.preparer;
+        if (context.attributes != null && !context.attributes.isEmpty()) {
+            attributes = deepCopyAttributeMap(context.attributes);
+        }
+        copyCascadedAttributes(context);
+    }
+
+    /**
+     * Copies the cascaded attributes to the current context.
+     *
+     * @param context The context to copy from.
+     */
+    private void copyCascadedAttributes(BasicAttributeContext context) {
+        if (context.cascadedAttributes != null
+                && !context.cascadedAttributes.isEmpty()) {
+            cascadedAttributes = deepCopyAttributeMap(context.cascadedAttributes);
+        }
+    }
+
+    /**
+     * Adds missing attributes to the destination map.
+     *
+     * @param source The source attribute map.
+     * @param destination The destination attribute map.
+     * @return The destination attribute map if not null, a new one otherwise.
+     */
+    private Map<String, Attribute> addMissingAttributes(Map<String, Attribute> source,
+            Map<String, Attribute> destination) {
+        if (source != null && !source.isEmpty()) {
+            if (destination == null) {
+                destination = new HashMap<String, Attribute>();
+            }
+            for (Map.Entry<String, Attribute> entry : source.entrySet()) {
+                String key = entry.getKey();
+                Attribute destAttribute = destination.get(key);
+                if (destAttribute == null) {
+                    destination.put(key, entry.getValue());
+                } else if (destAttribute instanceof ListAttribute
+                        && entry.getValue() instanceof ListAttribute
+                        && ((ListAttribute) destAttribute).isInherit()) {
+                    ((ListAttribute) destAttribute)
+                            .inherit((ListAttribute) entry.getValue());
+                }
+            }
+        }
+
+        return destination;
+    }
+
+    /**
+     * Deep copies the attribute map, by creating clones (using copy
+     * constructors) of the attributes.
+     *
+     * @param attributes The attribute map to copy.
+     * @return The copied map.
+     */
+    private Map<String, Attribute> deepCopyAttributeMap(
+            Map<String, Attribute> attributes) {
+        Map<String, Attribute> retValue = new HashMap<String, Attribute>(attributes.size());
+        for (Map.Entry<String, Attribute> entry : attributes.entrySet()) {
+            Attribute toCopy = entry.getValue();
+            if (toCopy != null) {
+                retValue.put(entry.getKey(), toCopy.clone());
+            }
+        }
+        return retValue;
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/CompareUtil.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/CompareUtil.java
new file mode 100644
index 0000000..a3cce93
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/CompareUtil.java
@@ -0,0 +1,67 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+/**
+ * Utilities to work with comparation between objects.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public final class CompareUtil {
+
+    /**
+     * Private constructor to avoid instantiation.
+     */
+    private CompareUtil() { }
+
+    /**
+     * Checks if two objects (eventually null) are the same. They are considered the same
+     * even if they are both null.
+     *
+     * @param obj1 The first object to check.
+     * @param obj2 The second object to check.
+     * @return <code>true</code> if the objects are the same.
+     * @since 2.2.0
+     */
+    public static boolean nullSafeEquals(Object obj1, Object obj2) {
+        if (obj1 != null) {
+            return obj1.equals(obj2);
+        }
+        return obj2 == null;
+    }
+
+    /**
+     * Returns <code>0</code> if the object is null, the hash code of the object
+     * otherwise.
+     *
+     * @param obj The object from which the hash code must be calculated..
+     * @return The hash code.
+     * @since 2.2.0
+     */
+    public static int nullSafeHashCode(Object obj) {
+        if (obj != null) {
+            return obj.hashCode();
+        }
+        return 0;
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/Definition.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/Definition.java
new file mode 100644
index 0000000..8584b2c
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/Definition.java
@@ -0,0 +1,162 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles;
+
+import static org.apache.tiles.CompareUtil.*;
+
+import java.util.Map;
+
+/**
+ * A definition, i.e. a template with (completely or not) filled attributes.
+ * Attributes of a template can be defined with the help of this class.<br>
+ * It can be used as a data transfer object used for registering new
+ * definitions with the Container.
+ *
+ * @since Tiles 2.0
+ * @version $Rev$ $Date$
+ */
+public class Definition extends BasicAttributeContext {
+    /**
+     * Extends attribute value.
+     */
+    protected String inherit;
+    /**
+     * Definition name.
+     */
+    protected String name = null;
+
+    /**
+     * Constructor.
+     */
+    public Definition() {
+    }
+
+    /**
+     * Copy Constructor.
+     * Create a new definition initialized with parent definition.
+     * Do a shallow copy : attributes are shared between copies, but not the Map
+     * containing attributes.
+     *
+     * @param definition The definition to copy.
+     */
+    public Definition(Definition definition) {
+        super(definition);
+        this.name = definition.name;
+        this.inherit = definition.inherit;
+    }
+
+    /**
+     * Constructor.
+     * @param name The name of the definition.
+     * @param templateAttribute The template attribute of the definition.
+     * @param attributes The attribute map of the definition.
+     *
+     * @since 2.1.2
+     */
+    public Definition(String name, Attribute templateAttribute,
+                               Map<String, Attribute> attributes) {
+        super(attributes);
+        this.name = name;
+        this.templateAttribute = templateAttribute;
+    }
+
+    /**
+     * Access method for the name property.
+     *
+     * @return the current value of the name property
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     *
+     * @param aName the new value of the name property
+     */
+    public void setName(String aName) {
+        name = aName;
+    }
+
+    /**
+     * Set extends.
+     *
+     * @param name Name of the extended definition.
+     */
+    public void setExtends(String name) {
+        inherit = name;
+    }
+
+    /**
+     * Get extends.
+     *
+     * @return Name of the extended definition.
+     */
+    public String getExtends() {
+        return inherit;
+    }
+
+
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean equals(Object obj) {
+        Definition def = (Definition) obj;
+        return nullSafeEquals(name, def.name)
+                && nullSafeEquals(inherit, def.inherit) && super.equals(def);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int hashCode() {
+        return nullSafeHashCode(name) + nullSafeHashCode(inherit)
+                + super.hashCode();
+    }
+
+    /**
+     * Get extends flag.
+     *
+     * @return <code>true</code> if this definition extends another.
+     */
+    public boolean isExtending() {
+        return inherit != null;
+    }
+
+    /**
+     * Returns a description of the attributes.
+     *
+     * @return A string representation of the content of this definition.
+     */
+    @Override
+    public String toString() {
+        return "{name="
+            + name
+            + ", template="
+            + (templateAttribute != null ? templateAttribute.getValue() : "<null>")
+            + ", role="
+            + (templateAttribute != null ? templateAttribute.getRoles() : "<null>")
+            + ", preparerInstance="
+            + preparer
+            + ", attributes="
+            + attributes
+            + "}";
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/Expression.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/Expression.java
new file mode 100644
index 0000000..4b495af
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/Expression.java
@@ -0,0 +1,157 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+import static org.apache.tiles.CompareUtil.*;
+
+/**
+ * It is an expression, along with the expression language (e.g. EL, MVEL, OGNL)
+ * it is expressed with.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class Expression {
+
+    /**
+     * The expression itself.
+     */
+    private String expression;
+
+    /**
+     * The language of the expression.
+     */
+    private String language;
+
+    /**
+     * Constructor.
+     *
+     * @param expression The expression itself.
+     * @param language The language of the expression.
+     * @since 2.2.0
+     */
+    public Expression(String expression, String language) {
+        this.expression = expression;
+        this.language = language;
+    }
+
+    /**
+     * Constructor, using the default (i.e. <code>null</code>) language.
+     *
+     * @param expression The expression itself.
+     * @since 2.2.0
+     */
+    public Expression(String expression) {
+        this(expression, null);
+    }
+
+    /**
+     * Copy constructor.
+     *
+     * @param toCopy The expression to copy.
+     * @since 2.2.0
+     */
+    public Expression(Expression toCopy) {
+        this.expression = toCopy.expression;
+        this.language = toCopy.language;
+    }
+
+    /**
+     * Creates an Expression object from a string in the form
+     * <code>LANGUAGE:EXPRESSION</code>.
+     *
+     * @param describedExpression The expression in the form
+     * <code>LANGUAGE:EXPRESSION</code>. The LANGUAGE part should be expressed
+     * only with letters and numbers.
+     * @return The created object, or <code>null</code> if the expression is null.
+     * @since 2.2.0
+     */
+    public static Expression createExpressionFromDescribedExpression(String describedExpression) {
+        if (describedExpression != null) {
+            String language = null;
+            String expression = describedExpression;
+            if (describedExpression.matches("[a-zA-Z0-9]+:.+")) {
+                language = describedExpression.substring(0, describedExpression.indexOf(':'));
+                expression = describedExpression.substring(describedExpression.indexOf(':') + 1);
+            }
+            return new Expression(expression, language);
+        }
+
+        return null;
+    }
+
+    /**
+     * Creates an Expression object from the expression and its language.
+     *
+     * @param expression The expression itself.
+     * @param language The language of the expression.
+     * @return The created object, or <code>null</code> if the expression is null.
+     * @since 2.2.0
+     */
+    public static Expression createExpression(String expression, String language) {
+        if (expression != null) {
+            return new Expression(expression, language);
+        }
+
+        return null;
+    }
+
+    /**
+     * Returns the expression string.
+     *
+     * @return The expression itself.
+     * @since 2.2.0
+     */
+    public String getExpression() {
+        return expression;
+    }
+
+    /**
+     * Returns the language in which the expression is expressed.
+     *
+     * @return The expression language.
+     * @since 2.2.0
+     */
+    public String getLanguage() {
+        return language;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean equals(Object obj) {
+        Expression exp = (Expression) obj;
+        return nullSafeEquals(expression, exp.expression)
+                && nullSafeEquals(language, exp.language);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int hashCode() {
+        return nullSafeHashCode(expression) + nullSafeHashCode(language);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String toString() {
+        return (language == null ? "DEFAULT" : language) + ":" + expression;
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/ListAttribute.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/ListAttribute.java
new file mode 100644
index 0000000..ae3b25a
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/ListAttribute.java
@@ -0,0 +1,179 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * An attribute as a <code>List</code>.
+ * This attribute associates a name with a list. The list can be found by the
+ * property name.
+ * Elements in list are retrieved using List methods.
+ * This class is used to read configuration files.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class ListAttribute extends Attribute {
+
+    /**
+     * If true, the attribute will put the elements of the attribute with the
+     * same name of the parent definition before the ones specified here. By
+     * default, it is 'false'.
+     */
+    private boolean inherit = false;
+
+    /**
+     * Constructor.
+     *
+     * @since 2.1.0
+     */
+    public ListAttribute() {
+        setValue(new ArrayList<Object>());
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param value List.
+     * @since 2.1.0
+     */
+    public ListAttribute(List<Attribute> value) {
+        setValue(value);
+    }
+
+    /**
+     * Copy constructor.
+     *
+     * @param toCopy The list attribute to copy.
+     * @since 2.1.3
+     */
+    public ListAttribute(ListAttribute toCopy) {
+        super(toCopy);
+        List<Attribute> attributesToCopy = toCopy.getValue();
+        if (attributesToCopy != null) {
+            List<Attribute> attributes = new ArrayList<Attribute>(attributesToCopy.size());
+            for (Attribute attribute : attributesToCopy) {
+                if (attribute != null) {
+                    attributes.add(attribute.clone());
+                } else {
+                    attributes.add(null);
+                }
+            }
+            setValue(attributes);
+        }
+        this.inherit = toCopy.inherit;
+    }
+
+    /**
+     * Sets the list of the attributes that are elements of this attribute.
+     *
+     * @param attributes The attributes.
+     * @since 3.0.0
+     */
+    public void setValue(List<Attribute> attributes) {
+        super.setValue(attributes);
+    }
+
+    /**
+     * Returns the list of the attributes that are elements of this attribute.
+     *
+     * @return The attributes.
+     * @since 3.0.0
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public List<Attribute> getValue() {
+        return (List<Attribute>) super.getValue();
+    }
+
+    /**
+     * Add an element in list.
+     * We use a property to avoid rewriting a new class.
+     *
+     * @param element XmlAttribute to add.
+     * @since 2.1.0
+     */
+    public void add(Attribute element) {
+        getValue().add(element);
+    }
+
+    /**
+     * If true, the attribute will put the elements of the attribute with the
+     * same name of the parent definition before the ones specified here. By
+     * default, it is 'false'
+     *
+     * @param inherit The "inherit" value.
+     * @since 2.1.0
+     */
+    public void setInherit(boolean inherit) {
+        this.inherit = inherit;
+    }
+
+    /**
+     * If true, the attribute will put the elements of the attribute with the
+     * same name of the parent definition before the ones specified here. By
+     * default, it is 'false'
+     *
+     * @return inherit The "inherit" value.
+     * @since 2.1.0
+     */
+    public boolean isInherit() {
+        return inherit;
+    }
+
+    /**
+     * Inherits elements present in a "parent" list attribute. The elements will
+     * be put before the ones already present.
+     *
+     * @param parent The parent list attribute.
+     * @since 2.1.0
+     */
+    @SuppressWarnings("unchecked")
+    public void inherit(ListAttribute parent) {
+        List<Attribute> tempList = new ArrayList<Attribute>();
+        tempList.addAll((List<Attribute>) parent.value);
+        tempList.addAll((List<Attribute>) value);
+        setValue(tempList);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean equals(Object obj) {
+        ListAttribute attribute = (ListAttribute) obj;
+        return super.equals(attribute) && this.inherit == attribute.inherit;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int hashCode() {
+        return super.hashCode() + Boolean.valueOf(inherit).hashCode();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public ListAttribute clone() {
+        return new ListAttribute(this);
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/NoSuchContainerException.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/NoSuchContainerException.java
new file mode 100644
index 0000000..631e5c0
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/NoSuchContainerException.java
@@ -0,0 +1,71 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles;
+
+
+/**
+ * Indicates that a keyed container has not been found.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class NoSuchContainerException extends TilesException {
+
+    /**
+     * Constructor.
+     *
+     * @since 2.1.0
+     */
+    public NoSuchContainerException() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @since 2.1.0
+     */
+    public NoSuchContainerException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e The exception to be wrapped.
+     * @since 2.1.0
+     */
+    public NoSuchContainerException(Throwable e) {
+        super(e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @param e The exception to be wrapped.
+     * @since 2.1.0
+     */
+    public NoSuchContainerException(String message, Throwable e) {
+        super(message, e);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/TilesContainer.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/TilesContainer.java
new file mode 100644
index 0000000..da426a9
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/TilesContainer.java
@@ -0,0 +1,143 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles;
+
+import java.io.IOException;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+
+/**
+ * An encapsulation of the tiles framework.  This interface is
+ * used to expose tiles features to frameworks which leverage
+ * it as a plugin.  It can alternately be used by web applications
+ * which would like a programmatic interface.
+ *
+ * @since 2.0
+ * @version $Rev$ $Date$
+ */
+public interface TilesContainer {
+
+    /**
+     * Retrieve the containers context.
+     *
+     * @return current application context
+     */
+    ApplicationContext getApplicationContext();
+
+    /**
+     * Retrive the attribute context of the current request.
+     * @param request The request.
+     * @return map of the attributes in the current attribute context.
+     */
+    AttributeContext getAttributeContext(Request request);
+
+    /**
+     * Starts a new context, where attribute values are stored independently
+     * from others.<br>
+     * When the use of the contexts is finished, call
+     * {@link TilesContainer#endContext(Request)}
+     * @param request The request.
+     *
+     * @return The newly created context.
+     */
+    AttributeContext startContext(Request request);
+
+    /**
+     * Ends a context, where attribute values are stored independently
+     * from others.<br>
+     * It must be called after a
+     * {@link TilesContainer#startContext(Request)} call.
+     * @param request The request.
+     */
+    void endContext(Request request);
+
+    /**
+     * Renders the current context, as it is.
+     * @param request The request.
+     *
+     * @since 2.1.0
+     */
+    void renderContext(Request request);
+
+    /**
+     * Executes a preparer.
+     *
+     * @param preparer The name of the preparer to execute.
+     * @param request The request.
+     */
+    void prepare(String preparer, Request request);
+
+    /**
+     * Render the given tiles request.
+     *
+     * @param definition the current definition.
+     * @param request The request.
+     */
+    void render(String definition, Request request);
+
+    /**
+     * Renders the specified definition.
+     * @param definition The definition to render.
+     * @param request The request context.
+     */
+    void render(Definition definition, Request request);
+
+    /**
+     * Render the given Attribute.
+     *
+     * @param attribute The attribute to render.
+     * @param request The request.
+     * @throws IOException If something goes wrong during writing to the output.
+     * @since 2.1.2
+     */
+    void render(Attribute attribute, Request request)
+        throws IOException;
+
+    /**
+     * Evaluates the given attribute.
+     *
+     * @param attribute The attribute to evaluate.
+     * @param request The request.
+     * @return The evaluated object.
+     * @since 2.1.0
+     */
+    Object evaluate(Attribute attribute, Request request);
+
+    /**
+     * Returns a definition specifying its name.
+     *
+     * @param definitionName The name of the definition to find.
+     * @param request The request context.
+     * @return The definition, if found.
+     */
+    Definition getDefinition(String definitionName,
+            Request request);
+
+    /**
+     * Determine whether or not the definition exists.
+     *
+     * @param definition the name of the definition.
+     * @param request The request.
+     * @return true if the definition is found.
+     */
+    boolean isValidDefinition(String definition, Request request);
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/TilesContainerWrapper.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/TilesContainerWrapper.java
new file mode 100644
index 0000000..4a2ac7c
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/TilesContainerWrapper.java
@@ -0,0 +1,120 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles;
+
+import java.io.IOException;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+
+/**
+ * Wraps a Tiles container to allow easy decoration.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesContainerWrapper implements TilesContainer {
+
+    /**
+     * The container to wrap.
+     */
+    protected TilesContainer container;
+
+    /**
+     * Constructor.
+     *
+     * @param container The container to wrap.
+     */
+    public TilesContainerWrapper(TilesContainer container) {
+        this.container = container;
+        if (container == null) {
+            throw new NullPointerException("The wrapped container must be not null");
+        }
+    }
+
+    /**
+     * Returns the wrapped container.
+     *
+     * @return The wrapped container.
+     */
+    public TilesContainer getWrappedContainer() {
+        return container;
+    }
+
+    @Override
+    public void endContext(Request request) {
+        container.endContext(request);
+    }
+
+    @Override
+    public Object evaluate(Attribute attribute, Request request) {
+        return container.evaluate(attribute, request);
+    }
+
+    @Override
+    public ApplicationContext getApplicationContext() {
+        return container.getApplicationContext();
+    }
+
+    @Override
+    public AttributeContext getAttributeContext(Request request) {
+        return container.getAttributeContext(request);
+    }
+
+    @Override
+    public Definition getDefinition(String definitionName, Request request) {
+        return container.getDefinition(definitionName, request);
+    }
+
+    @Override
+    public boolean isValidDefinition(String definition, Request request) {
+        return container.isValidDefinition(definition, request);
+    }
+
+    @Override
+    public void prepare(String preparer, Request request) {
+        container.prepare(preparer, request);
+    }
+
+    @Override
+    public void render(String definition, Request request) {
+        container.render(definition, request);
+    }
+
+    @Override
+    public void render(Definition definition, Request request) {
+        container.render(definition, request);
+    }
+
+    @Override
+    public void render(Attribute attribute, Request request) throws IOException {
+        container.render(attribute, request);
+    }
+
+    @Override
+    public void renderContext(Request request) {
+        container.renderContext(request);
+    }
+
+    @Override
+    public AttributeContext startContext(Request request) {
+        return container.startContext(request);
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/TilesException.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/TilesException.java
new file mode 100644
index 0000000..674584d
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/TilesException.java
@@ -0,0 +1,73 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles;
+
+
+/**
+ * Root class for all Tiles-exceptions.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesException extends RuntimeException {
+
+    /**
+     * Constructor.
+     */
+    public TilesException() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The error or warning message.
+     */
+    public TilesException(String message) {
+        super(message);
+    }
+
+
+    /**
+     * Create a new <code>TilesException</code> wrapping an existing exception.
+     * <p/>
+     * <p>The existing exception will be embedded in the new
+     * one, and its message will become the default message for
+     * the TilesException.</p>
+     *
+     * @param e The cause to be wrapped.
+     */
+    public TilesException(Throwable e) {
+        super(e);
+    }
+
+
+    /**
+     * Create a new <code>TilesException</code> from an existing exception.
+     * <p/>
+     * <p>The existing exception will be embedded in the new
+     * one, but the new exception will have its own message.</p>
+     *
+     * @param message The detail message.
+     * @param e       The cause to be wrapped.
+     */
+    public TilesException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/access/TilesAccess.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/access/TilesAccess.java
new file mode 100644
index 0000000..5df14cd
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/access/TilesAccess.java
@@ -0,0 +1,180 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.access;
+
+import java.util.Map;
+
+import org.apache.tiles.NoSuchContainerException;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Provides static access to the tiles container.
+ *
+ * @version $Rev$ $Date$
+ */
+public final class TilesAccess {
+
+    /**
+     * Name of the attribute used to store the current used container.
+     */
+    public static final String CURRENT_CONTAINER_ATTRIBUTE_NAME =
+        "org.apache.tiles.servlet.context.ServletTilesRequestContext.CURRENT_CONTAINER_KEY";
+
+    /**
+     * Constructor, private to avoid instantiation.
+     */
+    private TilesAccess() {
+    }
+
+    /**
+     * The name of the attribute to use when getting and setting the container
+     * object in a context.
+     */
+    public static final String CONTAINER_ATTRIBUTE =
+        "org.apache.tiles.CONTAINER";
+
+    /**
+     * Configures the default container to be used in the application.
+     *
+     * @param context The Tiles application context object to use.
+     * @param container The container object to set.
+     * @since 2.1.2
+     */
+    public static void setContainer(ApplicationContext context,
+            TilesContainer container) {
+        setContainer(context, container, CONTAINER_ATTRIBUTE);
+    }
+
+    /**
+     * Configures the container to be used in the application.
+     *
+     * @param context The Tiles application context object to use.
+     * @param container The container object to set.
+     * @param key The key under which the container will be stored.
+     * @since 2.1.2
+     */
+    public static void setContainer(ApplicationContext context,
+            TilesContainer container, String key) {
+        Logger log = LoggerFactory.getLogger(TilesAccess.class);
+        if (key == null) {
+            key = CONTAINER_ATTRIBUTE;
+        }
+
+        if (container == null) {
+            if (log.isInfoEnabled()) {
+                log.info("Removing TilesContext for context: " + context.getClass().getName());
+            }
+            context.getApplicationScope().remove(key);
+        } else {
+            if (log.isInfoEnabled()) {
+                log.info("Publishing TilesContext for context: " + context.getClass().getName());
+            }
+            context.getApplicationScope().put(key, container);
+        }
+    }
+
+    /**
+     * Returns default the container to be used in the application.
+     *
+     * @param context The Tiles application context object to use.
+     * @return The default container object.
+     * @since 3.0.0
+     */
+    public static TilesContainer getContainer(ApplicationContext context) {
+        return getContainer(context, CONTAINER_ATTRIBUTE);
+    }
+
+    /**
+     * Returns the container to be used in the application registered under a specific key.
+     *
+     * @param context The Tiles application context object to use.
+     * @param key The key under which the container will be stored.
+     * @return The container object.
+     * @since 3.0.0
+     */
+    public static TilesContainer getContainer(ApplicationContext context,
+            String key) {
+        if (key == null) {
+            key = CONTAINER_ATTRIBUTE;
+        }
+
+        return (TilesContainer) context.getApplicationScope().get(key);
+    }
+
+    /**
+     * Sets the current container to use in web pages.
+     *
+     * @param request The request to use.
+     * @param key The key under which the container is stored.
+     * @since 2.1.0
+     */
+    public static void setCurrentContainer(Request request,
+            String key) {
+        ApplicationContext applicationContext = request.getApplicationContext();
+        TilesContainer container = getContainer(applicationContext, key);
+        if (container != null) {
+            request.getContext("request").put(CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        } else {
+            throw new NoSuchContainerException("The container with the key '"
+                    + key + "' cannot be found");
+        }
+    }
+
+    /**
+     * Sets the current container to use in web pages.
+     *
+     * @param request The request to use.
+     * @param container The container to use as the current container.
+     * @since 2.1.0
+     */
+    public static void setCurrentContainer(Request request,
+            TilesContainer container) {
+        if (container != null) {
+            request.getContext("request").put(CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        } else {
+            throw new NullPointerException("The container cannot be null");
+        }
+    }
+
+    /**
+     * Returns the current container that has been set, or the default one.
+     *
+     * @param request The request to use.
+     * @return The current Tiles container to use in web pages.
+     * @since 2.1.0
+     */
+    public static TilesContainer getCurrentContainer(Request request) {
+        ApplicationContext context = request.getApplicationContext();
+        Map<String, Object> requestScope = request.getContext("request");
+        TilesContainer container = (TilesContainer) requestScope.get(CURRENT_CONTAINER_ATTRIBUTE_NAME);
+        if (container == null) {
+            container = getContainer(context);
+            requestScope.put(CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        }
+
+        return container;
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/access/package-info.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/access/package-info.java
new file mode 100644
index 0000000..45ab9b7
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/access/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Tiles access package. Utility classes to access Tiles funcionality from an application.
+ */
+package org.apache.tiles.access;
+
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/mgmt/MutableTilesContainer.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/mgmt/MutableTilesContainer.java
new file mode 100644
index 0000000..88865a5
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/mgmt/MutableTilesContainer.java
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.mgmt;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.Request;
+
+/**
+ * Defines a mutable version of the TilesContainer.
+ *
+ * @since Tiles 2.0
+ * @version $Rev$ $Date$
+ */
+public interface MutableTilesContainer extends TilesContainer {
+
+    /**
+     * Register a new definition with the container.
+     *
+     * @param definition The definition to register.
+     * @param request TODO
+     */
+    void register(Definition definition, Request request);
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/mgmt/package-info.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/mgmt/package-info.java
new file mode 100644
index 0000000..7ce089d
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/mgmt/package-info.java
@@ -0,0 +1,26 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes and interfaces to be used when it is needed to create Tiles definitions
+ * during the execution of the application.
+ */
+package org.apache.tiles.mgmt;
+
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/package-info.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/package-info.java
new file mode 100644
index 0000000..3234f7d
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/package-info.java
@@ -0,0 +1,387 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * The Tiles taglib and framework allows building web pages by assembling reusable
+ pieces of pages, called Tiles. A Tiles is usually a simple JSP page.
+
+ <div class="section">
+ <h2>Introduction</h2>
+
+ <p>The Tiles framework allows building pages by assembling reusable Tiles.
+ As an example, the page in the next figure can be build by assembling a
+ header, a footer, a menu and a body.</p>
+
+ <p><img src="doc-files/image001.gif" height="169" width="145" alt="doc-files/image001"></p>
+
+ <p>Each Tiles (header, menu, body, ...) is a JSP page and can itself be build
+ by assembling other Tiles.</p>
+
+ <p>Using Tiles can be compared as using Java methods: You need to define the Tiles (the method body), and then you
+ can &quot;call&quot; this body anywhere you want, passing it some parameters. In Tiles, parameters are called
+ &quot;attributes&quot; in order to avoid confusion with the request parameters.</p>
+
+ <p>The Tiles body can be a simple JSP page, a Struts action or any URI pointing
+ to a resource inside the current web site.</p>
+
+ <p>Inserting the body, or calling it, is done with the tag &lt;tiles:insert
+ ...&gt; anywhere in a JSP page. Insertion can also be done by specifying
+ a <em>definition name </em>as the path of a Struts forward or as input,
+ forward or include attributes of a Struts action.</p>
+
+ <p>Tiles bodies are used to create layouts, reusable parts, ... Tiles insertions
+ are used to insert Tiles. The same Tiles can be reused several times in
+ the same site, or even in the same page.</p>
+
+ <p>Insertion of a Tiles body can be associated to a logical name in what Tiles calls a &quot;definition&quot;. A
+ definition contains a logical name, a page used as body and some attribute values. The definition declaration
+ doesn't insert the associated Tiles body. It just associates it with the name. A definition name can be used
+ anywhere insertion of a Tiles body can occur. The associated Tiles body is then inserted with associated
+ attributes.</p>
+
+ <p>The definition declarations can be done in JSP pages or in one or more
+ centralized files. A definition can extend another one, overload some attributes,
+ add new attributes ... This allows the declaration of a &quot;master&quot; definition
+ declaring the common layout, header, menu and footer. All other definitions
+ extend this master layout thereby making it possible to change the entire
+ site look &amp; feel simply by changing the master definition. </p>
+ </div>
+ <div class="section">
+ <h2>Simple Examples</h2>
+
+ <div class="subsection1">
+ <h3>Insert a JSP page</h3>
+ <pre>&lt;tiles:insert <strong>page</strong>=&quot;/layouts/commonLayout.jsp&quot; flush=&quot;true&quot; /&gt;
+ </pre>
+ <p>This example inserts the specified page in place of the tag. The page attribute is any valid URL pointing to
+ a resource inside the current site.</p>
+ </div>
+ <div class="subsection1">
+ <a name="doc.InsertPageWithAttributes"></a>
+
+ <h3>Insert a Tiles passing some attributes</h3>
+ <pre>
+ &lt;tiles:insert page=&quot;/layouts/classicLayout.jsp&quot; flush=&amp;quot;true&quot;&gt;
+ &lt;tiles:put name=&quot;title&quot;  value=&quot;Page Title&quot; /&gt;
+ &lt;tiles:put name=&quot;header&quot; value=&quot;/common/header.jsp&quot; /&gt;
+ &lt;tiles:put name=&quot;footer&quot; value=&quot;/common/footer.jsp&quot; /&gt;
+ &lt;tiles:put name=&quot;menu&quot;   value=&quot;/common/menu.jsp&quot; /&gt;
+ &lt;tiles:put name=&quot;body&quot;   value=&quot;/tiles/mainBody.jsp&quot; /&gt;
+ &lt;/tiles:insert&gt;
+ </pre>
+ <p>This example inserts the specified page, passing it the attributes. Attributes
+ are stored in a Tiles context which is passed to the inserted pag and
+ can then be accesssed by their names.</p>
+ </div>
+ <div class="subsection1">
+ <h3>Retrieve an attribute value as String</h3>
+ <pre>
+ &lt;tiles:getAsString name=&quot;title&quot; /&gt;
+ </pre>
+ <p>This example retrieves the value of the attribute &quot;title&quot; and prints it as a String in the current
+ output stream. The method toString() is applied on the attribute value, allowing to pass any kind of object
+ as value.</p>
+ </div>
+ <div class="subsection1">
+ <h3>Insert Tiles referenced by an attribute</h3>
+ <pre>
+ &lt;tiles:insert attribute='menu' /&gt;
+ </pre>
+ <p>This inserts the Tiles referenced by the attribute &quot;menu&quot; value. The
+ specified attribute value is first retrieved from current Tiles's context,
+ and then the value is used as a page target to insert.</p>
+ </div>
+ <div class="subsection1">
+ <h3>Classic Layout </h3>
+
+ <p>This example is a layout assembling a page in the classic header-footer-menu-body
+ fashion.</p>
+ <pre>
+ &lt;%@ taglib uri=&quot;http://tiles.apache.org/tags-tiles&quot; prefix=&quot;tiles&quot; %&gt;
+ &lt;HTML&gt;
+ &lt;HEAD&gt;
+ &lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;%=request.getContextPath()%&gt;/layouts/stylesheet.css&quot;
+ type=&quot;text/css&quot;/&gt;
+ &lt;title&gt;&lt;tiles:getAsString name=&quot;title&quot;/&gt;&lt;/title&gt;
+ &lt;/HEAD&gt;
+ &lt;body&gt;
+ &lt;table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;5&quot;&gt;
+ &lt;tr&gt;
+ &lt;td colspan=&quot;2&quot;&gt;&lt;tiles:insert attribute=&quot;header&quot; /&gt;&lt;/td&gt;
+ &lt;/tr&gt;
+ &lt;tr&gt;
+ &lt;td width=&quot;140&quot; valign=&quot;top&quot;&gt;
+ &lt;tiles:insert attribute='menu' /&gt;
+ &lt;/td&gt;
+ &lt;td valign=&quot;top&quot;  align=&quot;left&quot;&gt;
+ &lt;tiles:insert attribute='body' /&gt;
+ &lt;/td&gt;
+ &lt;/tr&gt;
+ &lt;tr&gt;
+ &lt;td colspan=&quot;2&quot;&gt;
+ &lt;tiles:insert attribute=&quot;footer&quot; /&gt;
+ &lt;/td&gt;
+ &lt;/tr&gt;
+ &lt;/table&gt;
+ &lt;/body&gt;
+ &lt;/html&gt;
+ </pre>
+ <p>The layout is declared in a JSP page (ex: /layouts/classicLayout.jsp).
+ It can be used in conjunction with the tag described in &quot;<a href="#doc.InsertPageWithAttributes">Insert
+ a page passing some attributes</a>&quot;. </p>
+ </div>
+ </div>
+ <div class="section">
+ <h2>Definitions</h2>
+
+ <p>A definition associates a logical name with the URL of a Tiles to be inserted
+ and some attribute values. A definition doesn't insert the Tiles. This is
+ done later using the definition name. A definition name can be inserted
+ as often as you want in your site, making it easy to reuse a Tiles. </p>
+
+ <p>A definition can extend another definition and overload some attributes
+ or add new ones. This makes easy factorization of definitions differing
+ by some attributes. For example, you can define a master definition declaring
+ the main header, menu, footer, and a default title. Then let each of your
+ page definitions extend this master definition and overload the title and
+ the body.</p>
+
+ <p>Definitions can be declared in a JSP page, or in one or more centralized
+ files. To enable the definitions from centralized files, you need to initialize
+ the &quot;definitions factory&amp;&amp;quot; which will parse the definitions from the files
+ and provide them to the Tiles framework.</p>
+
+ <div class="subsection1">
+ <h3>Enabling Definition Factory</h3>
+
+ <p>To enable Tiles definitions described in one or more files, you need to write these files and to initialize the
+ definition factory. </p>
+
+ <p>Initialization is different depending on the Struts version you use,
+ or if you do not use Struts at all.</p>
+
+ <div class="subsection2">
+ <h4>Struts1.1</h4>
+
+ <p>Use the Tiles plug-in to enable Tiles definitions. This plug-in creates
+ the definition factory and passese it a configuration object populated
+ with parameters. Parameters can be specified in the web.xml file or
+ as plug-in parameters. The plug-in first reads parameters from web.xml,
+ and then overloads them with the ones found in the plug-in. All parameters
+ are optional and can be omitted. The plug-in should be declared in each
+ struts-config file:</p>
+ <pre>
+ &lt;plug-in className=&amp;&amp;quot;org.apache.struts.tiles.TilesPlugin&amp;&amp;quot; &gt;
+ &lt;set-property property=&amp;&amp;quot;definitions-config&amp;&amp;quot;
+ value=&amp;&amp;quot;/WEB-INF/tiles-defs.xml,
+ /WEB-INF/tiles-tests-defs.xml,/WEB-INF/tiles-tutorial-defs.xml,
+ /WEB-INF/tiles-examples-defs.xml&amp;&amp;quot; /&gt;
+ &lt;set-property property=&amp;&amp;quot;moduleAware&amp;&amp;quot; value=&amp;&amp;quot;true&amp;&amp;quot; /&gt;
+ &lt;set-property
+ property=&amp;&amp;quot;org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE&amp;&amp;quot;
+ value=&amp;&amp;quot;true&amp;&amp;quot; /&gt;
+ &lt;/plug-in&gt;
+ </pre>
+ <ul>
+ <li>definitions-config: (optional)
+ <ul>
+ <li>Specify configuration file names. There can be several comma separated file names (default: ?? )
+ </li>
+ </ul>
+ </li>
+ <li>org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE: (optional)
+ <ul>
+ <li>Specify if XML parser should validate the Tiles configuration
+ file
+ <ul>
+ <li>true : validate. DTD should be specified in file header (default)</li>
+ <li>false : no validation</li>
+
+ </ul>
+ </li>
+ </ul>
+ </li>
+
+ <li>moduleAware: (optional)
+ <ul>
+ <li>Specify if the Tiles definition factory is module aware. If true (default),
+ there will be one factory for each Struts module.
+ If false, there will be one common factory for all module. In this later case,
+ it is still needed to declare one plugin per module. The factory will be
+ initialized with parameters found in the first initialized plugin (generally the
+ one associated with the default module).
+ <ul>
+ <li>true : Tiles framework is module aware</li>
+ <li>false :Tiles framework has one single factoy shared among modules (default)</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+
+ <li>tilesUtilImplClassname: (optional - for advanced user)
+ <ul>
+ <li>Specify The classname of the TilesUtil implementation to use. The specified class should
+ be a subclass of TilesUtilStrutsImpl. This option disable the moduleAware option.
+ <br>Specifying &amp;&amp;&quot;TilesUtilStrutsImpl&amp;&amp;&quot; is equivalent to moduleAware =
+ false.
+ <br>Specifying &amp;&amp;&quot;TilesUtilStrutsModuleImpl&amp;&amp;&quot; is equivalent to moduleAware
+ = true.
+ This option is taken into account only once, when it is first encountered. To avoid problems,
+ it is advice to specify the same values in all TilesPlugin declaration.
+ </li>
+ </ul>
+ </li>
+
+ </ul>
+ <p>The TilesPlugin class creates one definition factory for each struts module.
+ </p>
+
+ <p>
+ If the flag moduleAware is false, only one shared factory is created for all modules.
+ In this later case, the factory is initialized with parameters found in the first plugin.
+ The plugins should be declared in all modules, and the moduleAware flag should be
+ the same for the entire application.</p>
+
+ <p>
+ Paths found in Tiles definitions are relative to the main context.</p>
+
+ <p>You don't need to specify a TilesRequestProcessor, this is automatically
+ done by the plug-in. If, however, you want to specify your own RequestProcessor,
+ it should extend the TilesRequestProcessor. The plug-in checks this
+ constraint.</p>
+ </div>
+ <div class="subsection2">
+ <h4>Struts1.0.x</h4>
+
+ <p>You need to use a special servlet extending the Struts servlet. This is specified in the web.xml file of your
+ application:</p>
+ <pre>
+ &lt;servlet&gt;
+ &lt;servlet-name&gt;action&lt;/servlet-name&gt;
+ &lt;servlet-class&gt;org.apache.tiles.web.startup.TilesServlet&lt;/servlet-class&gt;
+ &lt;!-- Tiles Servlet parameter
+ Specify configuration file names. There can be several comma
+ separated file names
+ --&gt;
+ &lt;init-param&gt;
+ &lt;param-name&gt;definitions-config&lt;/param-name&gt;
+ &lt;param-value&gt;/WEB-INF/tiles-defs.xml&lt;/param-value&gt;
+ &lt;/init-param&gt;
+ &lt;!-- Tiles Servlet parameter
+ Specify if XML parser should validate the Tiles configuration file(s).
+ true : validate. DTD should be specified in file header.
+ false : no validation
+ --&gt;
+ &lt;init-param&gt;
+ &lt;param-name&gt;org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE&lt;/param-name&gt;
+ &lt;param-value&gt;true&lt;/param-value&gt;
+ &lt;/init-param&gt;
+ ...
+ &lt;/servlet&gt;
+ </pre>
+ </div>
+ <div class="subsection2">
+ <h4>Without Struts</h4>
+
+ <p>Tiles can be used without Struts. To initialize the definition factory, you can use the provided servlet. Declare
+ it in the web.xml file of your application:</p>
+ <pre>
+ &lt;servlet&gt;
+ &lt;servlet-name&gt;action&lt;/servlet-name&gt;
+ &lt;servlet-class&gt;org.apache.struts.tiles.TilesServlet&lt;/servlet-class&gt;
+
+
+ &lt;init-param&gt;
+ &lt;param-name&gt;definitions-config&lt;/param-name&gt;
+ &lt;param-value&gt;/WEB-INF/tiles-defs.xml&lt;/param-value&gt;
+ &lt;/init-param&gt;
+ &lt;init-param&gt;
+ &lt;param-name&gt;org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE&lt;/param-name&gt;
+ &lt;param-value&gt;true&lt;/param-value&gt;
+ &lt;/init-param&gt;
+ ...
+ </pre>
+ <p>The parameters are the same as for Struts1.1 or 1.0.</p>
+ </div>
+ </div>
+ <div class="subsection1">
+ <h3>Definition File Syntax</h3>
+
+ <p>The definition file syntax can be found in the
+ <a href="http://tiles.apache.org/dtds/tiles-config_2_0.dtd">tiles-config_2_0.dtd file</a>.
+ </p>
+
+ <p>Following is a simple example:</p>
+ <pre>
+ &lt;!DOCTYPE tiles-definitions PUBLIC
+ &amp;&amp;quot;-//Apache Software Foundation//DTD Tiles Configuration//EN&amp;&amp;quot;
+ &amp;&amp;quot;http://tiles.apache.org/dtds/tiles-config_2_0.dtd&amp;&amp;quot;&gt;
+
+ &lt;!-- Definitions for Tiles documentation   --&gt;
+ &lt;tiles-definitions&gt;
+
+ &lt;!-- ========================================================== --&gt;
+ &lt;!-- Master definition                                          --&gt;
+ &lt;!-- ========================================================== --&gt;
+ &lt;!-- Main page layout used as a root for other page definitions --&gt;
+
+ &lt;definition name=&amp;&amp;quot;site.mainLayout&amp;&amp;quot;
+   template=&amp;&amp;quot;/layouts/classicLayout.jsp&amp;&amp;quot;&gt;
+ &lt;put name=&amp;&amp;quot;title&amp;&amp;quot;  value=&amp;&amp;quot;Tiles Blank Site&amp;&amp;quot; /&gt;
+ &lt;put name=&amp;&amp;quot;header&amp;&amp;quot; value=&amp;&amp;quot;/tiles/common/header.jsp&amp;&amp;quot; /&gt;
+ &lt;put name=&amp;&amp;quot;menu&amp;&amp;quot;   value=&amp;&amp;quot;site.menu.bar&amp;&amp;quot; /&gt;
+ &lt;put name=&amp;&amp;quot;footer&amp;&amp;quot; value=&amp;&amp;quot;/tiles/common/footer.jsp&amp;&amp;quot; /&gt;
+ &lt;put name=&amp;&amp;quot;body&amp;&amp;quot;   value=&amp;&amp;quot;/tiles/body.jsp&amp;&amp;quot; /&gt;
+ &lt;/definition&gt;
+
+ &lt;!-- ========================================================== --&gt;
+ &lt;!-- Index page definition                                      --&gt;
+ &lt;!-- ========================================================== --&gt;
+ &lt;!-- This definition inherits from the main definition.
+ It overloads the page title and the body used.
+ Use the same mechanism to define new pages sharing common
+ properties (here header, menu, footer, layout)
+ --&gt;
+
+ &lt;definition name=&amp;&amp;quot;site.index.page&amp;&amp;quot;
+   extends=&amp;&amp;quot;site.mainLayout&amp;&amp;quot; &gt;
+ &lt;put name=&amp;&amp;quot;title&amp;&amp;quot;  value=&amp;&amp;quot;Tiles Blank Site Index&amp;&amp;quot; /&gt;
+ &lt;put name=&amp;&amp;quot;body&amp;&amp;quot;   value=&amp;&amp;quot;/tiles/body.jsp&amp;&amp;quot; /&gt;
+ &lt;/definition&gt;
+
+ &lt;/tiles-definition&gt;
+ </pre>
+ </div>
+ <div class="subsection1">
+ <h3>Debugging</h3>
+
+ <p>To debug a page made of Tiles, you can use following advices:</p>
+ <ul>
+ <li>Check each Tiles separatly. Try to access nested Tiles directly to test
+ if thes work properly.
+ </li>
+ <li>Enable Tiles logging. See the commons-logging package help.</li>
+ </ul>
+ </div>
+ </div>
+
+ */
+package org.apache.tiles;
+
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/preparer/PreparerException.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/preparer/PreparerException.java
new file mode 100644
index 0000000..e518843
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/preparer/PreparerException.java
@@ -0,0 +1,71 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.preparer;
+
+import org.apache.tiles.TilesException;
+
+
+/**
+ * <p>
+ * Thrown when an exception occurs while processing
+ * a prepare request.
+ * </p>
+ *
+ * @since Tiles 2.0
+ * @version $Rev$ $Date$
+ */
+public class PreparerException extends TilesException {
+
+    /**
+     * Constructor.
+     */
+    public PreparerException() {
+        super();
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e The cause exception.
+     */
+    public PreparerException(Throwable e) {
+        super(e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message to include.
+     */
+    public PreparerException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message to include.
+     * @param e The cause exception.
+     */
+    public PreparerException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/preparer/ViewPreparer.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/preparer/ViewPreparer.java
new file mode 100644
index 0000000..00f7743
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/preparer/ViewPreparer.java
@@ -0,0 +1,58 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.preparer;
+
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.request.Request;
+
+/**
+ * <p>
+ * Executed prior to rendering a view.
+ * </p>
+ *
+ * <p>
+ * A view preparer is typically used to provide last minute
+ * translations of the data within the attribute context.
+ * A preparer is not intended to replace the controller within an
+ * MVC architecture.
+ * </p>
+ *
+ * See
+ * <ul>
+ * <li>&lt;insert&gt;</li>
+ * <li>&lt;definition&gt;</li>
+ * </ul>>
+ *
+ * @version $Rev$ $Date$
+ */
+public interface ViewPreparer {
+
+    /**
+     * Method associated to a tile and called immediately before the tile
+     * is included.
+     *
+     * @param tilesContext     Current tiles application context.
+     * @param attributeContext Current tile context.
+     * @throws PreparerException If something goes wrong during execution.
+     */
+    void execute(Request tilesContext,
+        AttributeContext attributeContext);
+}
diff --git a/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/preparer/package-info.java b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/preparer/package-info.java
new file mode 100644
index 0000000..e4533e2
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/java/org/apache/tiles/preparer/package-info.java
@@ -0,0 +1,28 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * "View preparers" are objects that allows the "preparation" of a Tiles artifact
+ * (definition, template or attribute) before it is rendered.<br>
+ * It is useful, for example, when a view item should be built and stored in a
+ * particular context (e.g. a menu) and then rendered.
+ */
+package org.apache.tiles.preparer;
+
diff --git a/TILES_3_0_X/tiles-api/src/main/resources/LICENSE.txt b/TILES_3_0_X/tiles-api/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/tiles-api/src/main/resources/NOTICE.txt b/TILES_3_0_X/tiles-api/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..1f13ff8
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/main/resources/NOTICE.txt
@@ -0,0 +1,6 @@
+   Apache Tiles
+   Copyright 1999-2009 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/TILES_3_0_X/tiles-api/src/site/site.xml b/TILES_3_0_X/tiles-api/src/site/site.xml
new file mode 100644
index 0000000..34d95ef
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - API">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/AttributeTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/AttributeTest.java
new file mode 100644
index 0000000..68105f3
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/AttributeTest.java
@@ -0,0 +1,292 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles;
+
+import static org.apache.tiles.CompareUtil.*;
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.apache.tiles.request.Request;
+import org.junit.Test;
+
+/**
+ * Tests {@link Attribute}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AttributeTest {
+
+
+    /**
+     * Tests {@link Attribute#createTemplateAttribute(String)}.
+     */
+    @Test
+    public void testCreateTemplateAttribute1() {
+        Attribute attribute = Attribute.createTemplateAttribute("/my/template.jsp");
+        assertEquals("/my/template.jsp", attribute.getValue());
+        assertEquals("template", attribute.getRenderer());
+    }
+
+    /**
+     * Tests {@link Attribute#createTemplateAttributeWithExpression(String)}.
+     */
+    @Test
+    public void testCreateTemplateAttribute2() {
+        Attribute attribute = Attribute.createTemplateAttributeWithExpression("my.expression");
+        assertEquals("template", attribute.getRenderer());
+        assertEquals("my.expression", attribute.getExpressionObject().getExpression());
+        assertNull(attribute.getExpressionObject().getLanguage());
+    }
+
+    /**
+     * Tests {@link Attribute#Attribute()}.
+     */
+    @Test
+    public void testAttribute() {
+        Attribute attribute = new Attribute();
+        assertNull(attribute.getValue());
+    }
+
+    /**
+     * Tests {@link Attribute#Attribute(Object)}.
+     */
+    @Test
+    public void testAttributeObject() {
+        Attribute attribute = new Attribute("my.value");
+        assertEquals("my.value", attribute.getValue());
+        assertNull(attribute.getRenderer());
+    }
+
+    /**
+     * Tests {@link Attribute#Attribute(Object, String)}.
+     */
+    @Test
+    public void testAttributeObjectString() {
+        Attribute attribute = new Attribute("my.value", "role1,role2");
+        assertEquals("my.value", attribute.getValue());
+        assertNull(attribute.getRenderer());
+        Set<String> roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        assertEquals(roles, attribute.getRoles());
+    }
+
+    /**
+     * Tests {@link Attribute#Attribute(Object, Expression, String, String)}.
+     */
+    @Test
+    public void testAttributeComplete() {
+        Expression expression = new Expression("my.expression", "MYLANG");
+        Attribute attribute = new Attribute("my.value", expression, "role1,role2", "myrenderer");
+        assertEquals("my.value", attribute.getValue());
+        assertEquals("myrenderer", attribute.getRenderer());
+        Set<String> roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        assertEquals(roles, attribute.getRoles());
+        assertEquals("my.expression", attribute.getExpressionObject().getExpression());
+        assertEquals("MYLANG", attribute.getExpressionObject().getLanguage());
+    }
+
+    /**
+     * Tests {@link Attribute#Attribute(Attribute)}.
+     */
+    @Test
+    public void testAttributeCopy() {
+        Expression expression = new Expression("my.expression", "MYLANG");
+        Attribute attribute = new Attribute("my.value", expression, "role1,role2", "myrenderer");
+        attribute = new Attribute(attribute);
+        assertEquals("my.value", attribute.getValue());
+        assertEquals("myrenderer", attribute.getRenderer());
+        Set<String> roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        assertEquals(roles, attribute.getRoles());
+        assertEquals("my.expression", attribute.getExpressionObject().getExpression());
+        assertEquals("MYLANG", attribute.getExpressionObject().getLanguage());
+
+        attribute = new Attribute("my.value", null, "role1,role2", "myrenderer");
+        attribute = new Attribute(attribute);
+        assertEquals("my.value", attribute.getValue());
+        assertEquals("myrenderer", attribute.getRenderer());
+        roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        assertEquals(roles, attribute.getRoles());
+        assertNull(attribute.getExpressionObject());
+    }
+
+    /**
+     * Tests {@link Attribute#equals(Object)}.
+     */
+    @Test
+    public void testEquals() {
+        Expression expression = new Expression("my.expression", "MYLANG");
+        Attribute attribute = new Attribute("my.value", expression, "role1,role2", "myrenderer");
+        Attribute attribute2 = new Attribute(attribute);
+        assertTrue(attribute.equals(attribute2));
+        attribute2.setRenderer("anotherRenderer");
+        assertFalse(attribute.equals(attribute2));
+        attribute2 = new Attribute(attribute);
+        attribute2.setRole("otherrole");
+        assertFalse(attribute.equals(attribute2));
+        attribute2 = new Attribute(attribute);
+        attribute2.setExpressionObject(new Expression("another.expression", "MYLANG"));
+        assertFalse(attribute.equals(attribute2));
+        attribute2 = new Attribute(attribute);
+        attribute2.setValue("anothervalue");
+        assertFalse(attribute.equals(attribute2));
+    }
+
+    /**
+     * Tests {@link Attribute#getRole()} and {@link Attribute#setRole(String)}.
+     */
+    @Test
+    public void testGetRole() {
+        Attribute attribute = new Attribute("my.value");
+        assertNull(attribute.getRole());
+        Set<String> roles = new LinkedHashSet<String>();
+        attribute.setRoles(roles);
+        assertNull(attribute.getRole());
+        roles.add("role1");
+        roles.add("role2");
+        assertEquals("role1,role2", attribute.getRole());
+    }
+
+    /**
+     * Tests {@link Attribute#hashCode()}.
+     */
+    @Test
+    public void testHashCode() {
+        Expression expression = new Expression("my.expression", "MYLANG");
+        Attribute attribute = new Attribute("my.value", expression, "role1,role2", "myrenderer");
+        Set<String> roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        assertEquals(nullSafeHashCode("my.value")
+                + nullSafeHashCode(expression) + nullSafeHashCode(roles)
+                + nullSafeHashCode("myrenderer"), attribute.hashCode());
+    }
+
+    /**
+     * Tests {@link Attribute#toString()}.
+     */
+    @Test
+    public void testToString() {
+        Expression expression = new Expression("my.expression", "MYLANG");
+        Attribute attribute = new Attribute("my.value", expression, "role1,role2", "myrenderer");
+        Set<String> roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        assertEquals("my.value", attribute.toString());
+        attribute.setValue(null);
+        assertNull(attribute.toString());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.Attribute#inherit(org.apache.tiles.Attribute)}.
+     */
+    @Test
+    public void testInherit() {
+        Attribute attribute = new Attribute(null, (Expression) null, null, (String) null);
+        Attribute parentAttribute = new Attribute("value", Expression
+                .createExpression("expression", "language"), "role", "renderer");
+        attribute.inherit(parentAttribute);
+        assertEquals("value", attribute.getValue());
+        assertEquals("expression", attribute.getExpressionObject().getExpression());
+        assertEquals("language", attribute.getExpressionObject().getLanguage());
+        assertEquals("role", attribute.getRole());
+        assertEquals("renderer", attribute.getRenderer());
+        Expression expression = new Expression(null, "MYLANG");
+        attribute = new Attribute(null, expression, null, (String) null);
+        attribute.setRoles(new HashSet<String>());
+        attribute.inherit(parentAttribute);
+        assertEquals("value", attribute.getValue());
+        assertEquals("expression", attribute.getExpressionObject().getExpression());
+        assertEquals("language", attribute.getExpressionObject().getLanguage());
+        assertEquals("role", attribute.getRole());
+        assertEquals("renderer", attribute.getRenderer());
+    }
+
+    /**
+     * Tests {@link Attribute#clone()}.
+     */
+    @Test
+    public void testClone() {
+        Expression expression = new Expression("my.expression", "MYLANG");
+        Attribute attribute = new Attribute("my.value", expression, "role1,role2", "myrenderer");
+        attribute = attribute.clone();
+        assertEquals("my.value", attribute.getValue());
+        assertEquals("myrenderer", attribute.getRenderer());
+        Set<String> roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        assertEquals(roles, attribute.getRoles());
+        assertEquals("my.expression", attribute.getExpressionObject().getExpression());
+        assertEquals("MYLANG", attribute.getExpressionObject().getLanguage());
+    }
+
+    /**
+     * Tests {@link Attribute#createTemplateAttribute(String, String, String, String)}.
+     */
+    @Test
+    public void testCreateTemplateAttribute() {
+        Attribute attribute = Attribute.createTemplateAttribute("myTemplate",
+                "MYLANG:myExpression", "myType", "myRole");
+        assertEquals("myTemplate", attribute.getValue());
+        assertEquals("MYLANG", attribute.getExpressionObject().getLanguage());
+        assertEquals("myExpression", attribute.getExpressionObject().getExpression());
+        assertEquals("myType", attribute.getRenderer());
+        Set<String> roles = attribute.getRoles();
+        assertEquals(1, roles.size());
+        assertTrue(roles.contains("myRole"));
+    }
+
+    /**
+     * Tests {@link Attribute#isPermitted(Request)}.
+     */
+    @Test
+    public void testIsPermitted() {
+        Attribute attribute = new Attribute("myvalue");
+        Request requestContext = createMock(Request.class);
+        expect(requestContext.isUserInRole("first")).andReturn(Boolean.TRUE)
+                .anyTimes();
+        expect(requestContext.isUserInRole("second")).andReturn(Boolean.FALSE)
+                .anyTimes();
+        replay(requestContext);
+        assertTrue(attribute.isPermitted(requestContext));
+        Set<String> roles = new HashSet<String>();
+        roles.add("first");
+        attribute.setRoles(roles);
+        assertTrue("The role is not permitted", attribute.isPermitted(
+                requestContext));
+        roles.clear();
+        roles.add("second");
+        assertFalse("The role is not permitted", attribute.isPermitted(
+                requestContext));
+        verify(requestContext);
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/BasicAttributeContextTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/BasicAttributeContextTest.java
new file mode 100644
index 0000000..32cf836
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/BasicAttributeContextTest.java
@@ -0,0 +1,800 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.junit.Test;
+
+/**
+ * Tests <code>BasicAttributeContext</code>.
+ *
+ * @version $Rev$ $Date$
+ */
+public class BasicAttributeContextTest {
+
+    /**
+     * Tests {@link BasicAttributeContext#BasicAttributeContext()}.
+     */
+    @Test
+    public void testBasicAttributeContext() {
+        AttributeContext context = new BasicAttributeContext();
+        assertNull("There are some spurious attributes", context
+                .getLocalAttributeNames());
+        assertNull("There are some spurious attributes", context
+                .getCascadedAttributeNames());
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#BasicAttributeContext(Map)}.
+     */
+    @Test
+    public void testBasicAttributeContextMapOfStringAttribute() {
+        Map<String, Attribute> name2attrib = new HashMap<String, Attribute>();
+        Attribute attribute = new Attribute("Value 1");
+        name2attrib.put("name1", attribute);
+        attribute = new Attribute("Value 2");
+        name2attrib.put("name2", attribute);
+        AttributeContext context = new BasicAttributeContext(name2attrib);
+        attribute = context.getAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "Value 1",
+                attribute.getValue());
+        attribute = context.getAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "Value 2",
+                attribute.getValue());
+    }
+
+    /**
+     * Tests
+     * {@link BasicAttributeContext#BasicAttributeContext(AttributeContext)}.
+     */
+    @Test
+    public void testBasicAttributeContextAttributeContext() {
+        Set<String> localAttributes = new LinkedHashSet<String>();
+        Set<String> cascadedAttributes = new LinkedHashSet<String>();
+        localAttributes.add("local1");
+        localAttributes.add("local2");
+        cascadedAttributes.add("cascaded1");
+        cascadedAttributes.add("cascaded2");
+        AttributeContext toCopy = createMock(AttributeContext.class);
+        expect(toCopy.getLocalAttributeNames()).andReturn(localAttributes);
+        expect(toCopy.getLocalAttribute("local1")).andReturn(
+                new Attribute("value1")).anyTimes();
+        expect(toCopy.getLocalAttribute("local2")).andReturn(
+                new Attribute("value2")).anyTimes();
+        expect(toCopy.getCascadedAttributeNames())
+                .andReturn(cascadedAttributes);
+        expect(toCopy.getCascadedAttribute("cascaded1")).andReturn(
+                new Attribute("value3")).anyTimes();
+        expect(toCopy.getCascadedAttribute("cascaded2")).andReturn(
+                new Attribute("value4")).anyTimes();
+        Attribute templateAttribute = new Attribute("/template.jsp", Expression
+                .createExpression("expression", null), "role1,role2",
+                "template");
+        expect(toCopy.getTemplateAttribute()).andReturn(templateAttribute);
+        Set<String> roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        expect(toCopy.getPreparer()).andReturn("my.preparer.Preparer");
+        replay(toCopy);
+        BasicAttributeContext context = new BasicAttributeContext(toCopy);
+        assertEquals("The template has not been set correctly",
+                "/template.jsp", context.getTemplateAttribute().getValue());
+        assertEquals("The template expression has not been set correctly",
+                "expression", context.getTemplateAttribute()
+                        .getExpressionObject().getExpression());
+        assertEquals("The roles are not the same", roles, context
+                .getTemplateAttribute().getRoles());
+        assertEquals("The preparer has not been set correctly",
+                "my.preparer.Preparer", context.getPreparer());
+        Attribute attribute = context.getLocalAttribute("local1");
+        assertNotNull("Attribute local1 not found", attribute);
+        assertEquals("Attribute local1 has not been set correctly", "value1",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("local2");
+        assertNotNull("Attribute local2 not found", attribute);
+        assertEquals("Attribute local2 has not been set correctly", "value2",
+                attribute.getValue());
+        attribute = context.getCascadedAttribute("cascaded1");
+        assertNotNull("Attribute cascaded1 not found", attribute);
+        assertEquals("Attribute cascaded1 has not been set correctly",
+                "value3", attribute.getValue());
+        attribute = context.getCascadedAttribute("cascaded2");
+        assertNotNull("Attribute cascaded2 not found", attribute);
+        assertEquals("Attribute cascaded2 has not been set correctly",
+                "value4", attribute.getValue());
+    }
+
+    /**
+     * Tests
+     * {@link BasicAttributeContext#BasicAttributeContext(BasicAttributeContext)}
+     * .
+     */
+    @Test
+    public void testBasicAttributeContextBasicAttributeContext() {
+        BasicAttributeContext toCopy = new BasicAttributeContext();
+        toCopy.putAttribute("name1", new Attribute("value1"), false);
+        toCopy.putAttribute("name2", new Attribute("value2"), true);
+        Attribute templateAttribute = Attribute
+                .createTemplateAttribute("/template.jsp");
+        Set<String> roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        templateAttribute.setRoles(roles);
+        toCopy.setTemplateAttribute(templateAttribute);
+        toCopy.setPreparer("my.preparer.Preparer");
+        AttributeContext context = new BasicAttributeContext(toCopy);
+        assertEquals("The template has not been set correctly",
+                "/template.jsp", context.getTemplateAttribute().getValue());
+        assertEquals("The roles are not the same", roles, context
+                .getTemplateAttribute().getRoles());
+        assertEquals("The preparer has not been set correctly",
+                "my.preparer.Preparer", context.getPreparer());
+        Attribute attribute = context.getLocalAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "value1",
+                attribute.getValue());
+        attribute = context.getCascadedAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "value2",
+                attribute.getValue());
+    }
+
+    /**
+     * Tests
+     * {@link BasicAttributeContext#inheritCascadedAttributes(AttributeContext)}
+     * .
+     */
+    @Test
+    public void testInheritCascadedAttributes() {
+        AttributeContext toCopy = new BasicAttributeContext();
+        toCopy.putAttribute("name1", new Attribute("value1"), false);
+        toCopy.putAttribute("name2", new Attribute("value2"), true);
+        AttributeContext context = new BasicAttributeContext();
+        context.inheritCascadedAttributes(toCopy);
+        Attribute attribute = context.getLocalAttribute("name1");
+        assertNull("Attribute name1 found", attribute);
+        attribute = context.getCascadedAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "value2",
+                attribute.getValue());
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#inherit(BasicAttributeContext)}
+     * testing inheritance between {@link ListAttribute} instances.
+     */
+    @Test
+    public void testInheritListAttribute() {
+        AttributeContext toCopy = new BasicAttributeContext();
+        ListAttribute parentListAttribute = new ListAttribute();
+        Attribute first = new Attribute("first");
+        Attribute second = new Attribute("second");
+        parentListAttribute.add(first);
+        toCopy.putAttribute("list", parentListAttribute);
+        AttributeContext context = new BasicAttributeContext();
+        ListAttribute listAttribute = new ListAttribute();
+        listAttribute.setInherit(true);
+        listAttribute.add(second);
+        context.putAttribute("list", listAttribute);
+        context.inherit(toCopy);
+        ListAttribute result = (ListAttribute) context.getAttribute("list");
+        assertNotNull("The attribute must exist", result);
+        List<Attribute> value = result.getValue();
+        assertNotNull("The list must exist", value);
+        assertEquals("The size is not correct", 2, value.size());
+        assertEquals("The first element is not correct", first, value.get(0));
+        assertEquals("The second element is not correct", second, value
+                .get(1));
+
+        context = new BasicAttributeContext();
+        listAttribute = new ListAttribute();
+        listAttribute.add(second);
+        context.putAttribute("list", listAttribute);
+        context.inherit(toCopy);
+        result = (ListAttribute) context.getAttribute("list");
+        assertNotNull("The attribute must exist", result);
+        value = result.getValue();
+        assertNotNull("The list must exist", value);
+        assertEquals("The size is not correct", 1, value.size());
+        assertEquals("The second element is not correct", second, value
+                .get(0));
+    }
+
+    /**
+     * Tests
+     * {@link BasicAttributeContext#inheritCascadedAttributes(AttributeContext)}
+     * .
+     */
+    @Test
+    public void testInherit() {
+        AttributeContext toCopy = new BasicAttributeContext();
+        Attribute parentTemplateAttribute = new Attribute();
+        parentTemplateAttribute.setValue("/parent/template.jsp");
+        toCopy.setTemplateAttribute(parentTemplateAttribute);
+        toCopy.putAttribute("name1", new Attribute("value1"), true);
+        toCopy.putAttribute("name2", new Attribute("value2"), true);
+        toCopy.putAttribute("name3", new Attribute("value3"), false);
+        toCopy.putAttribute("name4", new Attribute("value4"), false);
+        AttributeContext context = new BasicAttributeContext();
+        Attribute templateAttribute = new Attribute();
+        templateAttribute.setRole("role1,role2");
+        context.setTemplateAttribute(templateAttribute);
+        context.putAttribute("name1", new Attribute("newValue1"), true);
+        context.putAttribute("name3", new Attribute("newValue3"), false);
+        context.inherit(toCopy);
+        Attribute attribute = context.getTemplateAttribute();
+        assertEquals("/parent/template.jsp", attribute.getValue());
+        assertTrue(attribute.getRoles().contains("role1"));
+        assertTrue(attribute.getRoles().contains("role2"));
+        attribute = context.getCascadedAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "newValue1",
+                attribute.getValue());
+        attribute = context.getCascadedAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "value2",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "newValue3",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name4");
+        assertNotNull("Attribute name4 not found", attribute);
+        assertEquals("Attribute name4 has not been set correctly", "value4",
+                attribute.getValue());
+
+        toCopy = new BasicAttributeContext();
+        toCopy.putAttribute("name1", new Attribute("value1"), true);
+        toCopy.putAttribute("name2", new Attribute("value2"), true);
+        toCopy.putAttribute("name3", new Attribute("value3"), false);
+        toCopy.putAttribute("name4", new Attribute("value4"), false);
+        context = new BasicAttributeContext();
+        context.inherit(toCopy);
+        attribute = context.getCascadedAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "value1",
+                attribute.getValue());
+        attribute = context.getCascadedAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "value2",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "value3",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name4");
+        assertNotNull("Attribute name4 not found", attribute);
+        assertEquals("Attribute name4 has not been set correctly", "value4",
+                attribute.getValue());
+    }
+
+    /**
+     * Tests
+     * {@link BasicAttributeContext#inherit(AttributeContext)}
+     * .
+     */
+    @Test
+    public void testInheritAttributeContext() {
+        AttributeContext toCopy = createMock(AttributeContext.class);
+        Attribute templateAttribute = Attribute.createTemplateAttribute("/my/template.jsp");
+        expect(toCopy.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(toCopy.getPreparer()).andReturn("my.preparer");
+        Set<String> cascadedNames = new HashSet<String>();
+        cascadedNames.add("name1");
+        cascadedNames.add("name2");
+        expect(toCopy.getCascadedAttributeNames()).andReturn(cascadedNames);
+        expect(toCopy.getCascadedAttribute("name1")).andReturn(new Attribute("value1"));
+        expect(toCopy.getCascadedAttribute("name2")).andReturn(new Attribute("value2"));
+        Set<String> names = new HashSet<String>();
+        names.add("name3");
+        names.add("name4");
+        expect(toCopy.getLocalAttributeNames()).andReturn(names);
+        expect(toCopy.getLocalAttribute("name3")).andReturn(new Attribute("value3"));
+        expect(toCopy.getLocalAttribute("name4")).andReturn(new Attribute("value4"));
+
+        replay(toCopy);
+        AttributeContext context = new BasicAttributeContext();
+        context.putAttribute("name1", new Attribute("newValue1"), true);
+        context.putAttribute("name3", new Attribute("newValue3"), false);
+        context.inherit(toCopy);
+        Attribute attribute = context.getCascadedAttribute("name1");
+        assertEquals("/my/template.jsp", context.getTemplateAttribute().getValue());
+        assertEquals("my.preparer", context.getPreparer());
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "newValue1",
+                attribute.getValue());
+        attribute = context.getCascadedAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "value2",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "newValue3",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name4");
+        assertNotNull("Attribute name4 not found", attribute);
+        assertEquals("Attribute name4 has not been set correctly", "value4",
+                attribute.getValue());
+        verify(toCopy);
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#inherit(AttributeContext)}
+     * testing inheritance between {@link ListAttribute} instances.
+     */
+    @Test
+    public void testInheritAttributeContextListAttribute() {
+        AttributeContext toCopy = createMock(AttributeContext.class);
+        Attribute templateAttribute = Attribute.createTemplateAttribute("/my/template.jsp");
+        expect(toCopy.getTemplateAttribute()).andReturn(templateAttribute).times(2);
+        expect(toCopy.getPreparer()).andReturn("my.preparer").times(2);
+        ListAttribute parentListAttribute = new ListAttribute();
+        Attribute first = new Attribute("first");
+        Attribute second = new Attribute("second");
+        Attribute third = new Attribute("third");
+        Attribute fourth = new Attribute("fourth");
+        parentListAttribute.add(first);
+        ListAttribute parentListAttribute2 = new ListAttribute();
+        parentListAttribute2.add(third);
+        Set<String> names = new HashSet<String>();
+        names.add("list");
+        Set<String> cascadedNames = new HashSet<String>();
+        cascadedNames.add("list2");
+        expect(toCopy.getCascadedAttributeNames()).andReturn(cascadedNames).times(2);
+        expect(toCopy.getCascadedAttribute("list2")).andReturn(parentListAttribute2).times(2);
+        expect(toCopy.getLocalAttributeNames()).andReturn(names).times(2);
+        expect(toCopy.getLocalAttribute("list")).andReturn(parentListAttribute).times(2);
+
+        replay(toCopy);
+        AttributeContext context = new BasicAttributeContext();
+        ListAttribute listAttribute = new ListAttribute();
+        listAttribute.setInherit(true);
+        listAttribute.add(second);
+        context.putAttribute("list", listAttribute, false);
+        ListAttribute listAttribute2 = new ListAttribute();
+        listAttribute2.setInherit(true);
+        listAttribute2.add(fourth);
+        context.putAttribute("list2", listAttribute2, true);
+        context.inherit(toCopy);
+        ListAttribute result = (ListAttribute) context.getAttribute("list");
+        assertNotNull("The attribute must exist", result);
+        List<Attribute> value = result.getValue();
+        assertNotNull("The list must exist", value);
+        assertEquals("The size is not correct", 2, value.size());
+        assertEquals("The first element is not correct", first, value.get(0));
+        assertEquals("The second element is not correct", second, value
+                .get(1));
+        result = (ListAttribute) context.getAttribute("list2");
+        assertNotNull("The attribute must exist", result);
+        value = result.getValue();
+        assertNotNull("The list must exist", value);
+        assertEquals("The size is not correct", 2, value.size());
+        assertEquals("The first element is not correct", third, value.get(0));
+        assertEquals("The second element is not correct", fourth, value
+                .get(1));
+
+        context = new BasicAttributeContext();
+        listAttribute = new ListAttribute();
+        listAttribute.add(second);
+        context.putAttribute("list", listAttribute);
+        context.inherit(toCopy);
+        result = (ListAttribute) context.getAttribute("list");
+        assertNotNull("The attribute must exist", result);
+        value = result.getValue();
+        assertNotNull("The list must exist", value);
+        assertEquals("The size is not correct", 1, value.size());
+        assertEquals("The second element is not correct", second, value
+                .get(0));
+        verify(toCopy);
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#addAll(Map)}.
+     */
+    @Test
+    public void testAddAll() {
+        AttributeContext context = new BasicAttributeContext();
+        Map<String, Attribute> name2attrib = new HashMap<String, Attribute>();
+        Attribute attribute = new Attribute("Value 1");
+        name2attrib.put("name1", attribute);
+        attribute = new Attribute("Value 2");
+        name2attrib.put("name2", attribute);
+        context.addAll(name2attrib);
+        attribute = context.getAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "Value 1",
+                attribute.getValue());
+        attribute = context.getAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "Value 2",
+                attribute.getValue());
+
+        context.addAll(null);
+        attribute = context.getAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "Value 1",
+                attribute.getValue());
+        attribute = context.getAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "Value 2",
+                attribute.getValue());
+
+        name2attrib = new HashMap<String, Attribute>();
+        name2attrib.put("name3", new Attribute("Value 3"));
+        context.addAll(name2attrib);
+        attribute = context.getAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "Value 1",
+                attribute.getValue());
+        attribute = context.getAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "Value 2",
+                attribute.getValue());
+        attribute = context.getAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "Value 3",
+                attribute.getValue());
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#addMissing(Map)}.
+     */
+    @Test
+    public void testAddMissing() {
+        Map<String, Attribute> name2attrib = new HashMap<String, Attribute>();
+        Attribute attribute = new Attribute("Value 1");
+        name2attrib.put("name1", attribute);
+        attribute = new Attribute("Value 2");
+        name2attrib.put("name2", attribute);
+        AttributeContext context = new BasicAttributeContext(name2attrib);
+        name2attrib.remove("name2");
+        name2attrib.put("name1", new Attribute("Value 1a"));
+        name2attrib.put("name3", new Attribute("Value 3"));
+        context.addMissing(name2attrib);
+        attribute = context.getAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "Value 1",
+                attribute.getValue());
+        attribute = context.getAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "Value 2",
+                attribute.getValue());
+        attribute = context.getAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "Value 3",
+                attribute.getValue());
+
+        context.addMissing(null);
+        attribute = context.getAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "Value 1",
+                attribute.getValue());
+        attribute = context.getAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "Value 2",
+                attribute.getValue());
+        attribute = context.getAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "Value 3",
+                attribute.getValue());
+
+        context = new BasicAttributeContext();
+        name2attrib = new HashMap<String, Attribute>();
+        name2attrib.put("name1", new Attribute("Value 1a"));
+        name2attrib.put("name3", new Attribute("Value 3"));
+        context.addMissing(name2attrib);
+        attribute = context.getAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "Value 1a",
+                attribute.getValue());
+        attribute = context.getAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "Value 3",
+                attribute.getValue());
+
+        context = new BasicAttributeContext();
+        context.putAttribute("name2", new Attribute("Value 2a"), true);
+        name2attrib = new HashMap<String, Attribute>();
+        name2attrib.put("name1", new Attribute("Value 1a"));
+        name2attrib.put("name3", new Attribute("Value 3"));
+        context.addMissing(name2attrib);
+        attribute = context.getAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "Value 1a",
+                attribute.getValue());
+        attribute = context.getAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "Value 2a",
+                attribute.getValue());
+        attribute = context.getAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "Value 3",
+                attribute.getValue());
+
+        context = new BasicAttributeContext();
+        context.putAttribute("name2", new Attribute("Value 2a"), true);
+        name2attrib = new HashMap<String, Attribute>();
+        name2attrib.put("name2", new Attribute("Value 2b"));
+        name2attrib.put("name3", new Attribute("Value 3"));
+        context.addMissing(name2attrib);
+        attribute = context.getAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "Value 2a",
+                attribute.getValue());
+        attribute = context.getAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "Value 3",
+                attribute.getValue());
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#getAttribute(String)}.
+     */
+    @Test
+    public void testGetAttribute() {
+        AttributeContext context = new BasicAttributeContext();
+        context.putAttribute("name1", new Attribute("value1"), false);
+        context.putAttribute("name2", new Attribute("value2"), true);
+        context.putAttribute("name3", new Attribute("value3a"), true);
+        context.putAttribute("name3", new Attribute("value3"), false);
+        Attribute attribute = context.getAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "value1",
+                attribute.getValue());
+        attribute = context.getAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "value2",
+                attribute.getValue());
+        attribute = context.getAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "value3",
+                attribute.getValue());
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#getLocalAttribute(String)}.
+     */
+    @Test
+    public void testGetLocalAttribute() {
+        AttributeContext context = new BasicAttributeContext();
+        context.putAttribute("name1", new Attribute("value1"), false);
+        context.putAttribute("name2", new Attribute("value2"), true);
+        context.putAttribute("name3", new Attribute("value3a"), true);
+        context.putAttribute("name3", new Attribute("value3"), false);
+        Attribute attribute = context.getLocalAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "value1",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name2");
+        assertNull("Attribute name2 found", attribute);
+        attribute = context.getLocalAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "value3",
+                attribute.getValue());
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#getCascadedAttribute(String)}.
+     */
+    @Test
+    public void testGetCascadedAttribute() {
+        AttributeContext context = new BasicAttributeContext();
+        context.putAttribute("name1", new Attribute("value1"), false);
+        context.putAttribute("name2", new Attribute("value2"), true);
+        context.putAttribute("name3", new Attribute("value3a"), true);
+        context.putAttribute("name3", new Attribute("value3"), false);
+        Attribute attribute = context.getCascadedAttribute("name1");
+        assertNull("Attribute name1 found", attribute);
+        attribute = context.getCascadedAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "value2",
+                attribute.getValue());
+        attribute = context.getCascadedAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "value3a",
+                attribute.getValue());
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#getLocalAttributeNames()}.
+     */
+    @Test
+    public void testGetLocalAttributeNames() {
+        AttributeContext context = new BasicAttributeContext();
+        context.putAttribute("name1", new Attribute("value1"), false);
+        context.putAttribute("name2", new Attribute("value2"), true);
+        context.putAttribute("name3", new Attribute("value3a"), true);
+        context.putAttribute("name3", new Attribute("value3"), false);
+        Set<String> names = context.getLocalAttributeNames();
+        assertTrue("Attribute name1 is not present", names.contains("name1"));
+        assertFalse("Attribute name2 is present", names.contains("name2"));
+        assertTrue("Attribute name3 is not present", names.contains("name3"));
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#getCascadedAttributeNames()}.
+     */
+    @Test
+    public void testGetCascadedAttributeNames() {
+        AttributeContext context = new BasicAttributeContext();
+        context.putAttribute("name1", new Attribute("value1"), false);
+        context.putAttribute("name2", new Attribute("value2"), true);
+        context.putAttribute("name3", new Attribute("value3a"), true);
+        context.putAttribute("name3", new Attribute("value3"), false);
+        Set<String> names = context.getCascadedAttributeNames();
+        assertFalse("Attribute name1 is present", names.contains("name1"));
+        assertTrue("Attribute name2 is not present", names.contains("name2"));
+        assertTrue("Attribute name3 is not present", names.contains("name3"));
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#putAttribute(String, Attribute)}.
+     */
+    @Test
+    public void testPutAttributeStringAttribute() {
+        AttributeContext context = new BasicAttributeContext();
+        context.putAttribute("name1", new Attribute("value1"));
+        Attribute attribute = context.getLocalAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "value1",
+                attribute.getValue());
+        attribute = context.getCascadedAttribute("name1");
+        assertNull("Attribute name1 found", attribute);
+    }
+
+    /**
+     * Tests
+     * {@link BasicAttributeContext#putAttribute(String, Attribute, boolean)}.
+     */
+    @Test
+    public void testPutAttributeStringAttributeBoolean() {
+        AttributeContext context = new BasicAttributeContext();
+        context.putAttribute("name1", new Attribute("value1"), false);
+        context.putAttribute("name2", new Attribute("value2"), true);
+        Attribute attribute = context.getLocalAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "value1",
+                attribute.getValue());
+        attribute = context.getCascadedAttribute("name1");
+        assertNull("Attribute name1 found", attribute);
+        attribute = context.getCascadedAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "value2",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name2");
+        assertNull("Attribute name2 found", attribute);
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#clear()}.
+     */
+    @Test
+    public void testClear() {
+        AttributeContext context = new BasicAttributeContext();
+        context.putAttribute("name1", new Attribute("value1"), false);
+        context.putAttribute("name2", new Attribute("value2"), true);
+        context.clear();
+        Set<String> names = context.getLocalAttributeNames();
+        assertTrue("There are local attributes", names == null
+                || names.isEmpty());
+        names = context.getCascadedAttributeNames();
+        assertTrue("There are cascaded attributes", names == null
+                || names.isEmpty());
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#equals(Object)}.
+     */
+    @Test
+    public void testEquals() {
+        BasicAttributeContext attributeContext = new BasicAttributeContext();
+        attributeContext.setPreparer("my.preparer");
+        attributeContext.setTemplateAttribute(Attribute.createTemplateAttribute("/my/template.jsp"));
+        attributeContext.putAttribute("attribute1", new Attribute("value1"), true);
+        attributeContext.putAttribute("attribute2", new Attribute("value2"), true);
+        attributeContext.putAttribute("attribute3", new Attribute("value3"), false);
+        BasicAttributeContext toCompare = new BasicAttributeContext(attributeContext);
+        assertTrue(toCompare.equals(attributeContext));
+        toCompare = new BasicAttributeContext(attributeContext);
+        toCompare.putAttribute("attribute4", new Attribute("value4"), true);
+        assertFalse(toCompare.equals(attributeContext));
+        toCompare = new BasicAttributeContext(attributeContext);
+        toCompare.putAttribute("attribute4", new Attribute("value4"), false);
+        assertFalse(toCompare.equals(attributeContext));
+        toCompare = new BasicAttributeContext(attributeContext);
+        toCompare.setPreparer("another.preparer");
+        assertFalse(toCompare.equals(attributeContext));
+        toCompare = new BasicAttributeContext(attributeContext);
+        toCompare.setTemplateAttribute(Attribute.createTemplateAttribute("/another/template.jsp"));
+        assertFalse(toCompare.equals(attributeContext));
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext#hashCode()}.
+     */
+    @Test
+    public void testHashCode() {
+        BasicAttributeContext attributeContext = new BasicAttributeContext();
+        attributeContext.setPreparer("my.preparer");
+        Attribute templateAttribute = Attribute.createTemplateAttribute("/my/template.jsp");
+        attributeContext.setTemplateAttribute(templateAttribute);
+        Attribute attribute1 = new Attribute("value1");
+        Attribute attribute2 = new Attribute("value2");
+        Attribute attribute3 = new Attribute("value3");
+        attributeContext.putAttribute("attribute1", attribute1, true);
+        attributeContext.putAttribute("attribute2", attribute2, true);
+        attributeContext.putAttribute("attribute3", attribute3, false);
+        Map<String, Attribute> cascadedAttributes = new HashMap<String, Attribute>();
+        cascadedAttributes.put("attribute1", attribute1);
+        cascadedAttributes.put("attribute2", attribute2);
+        Map<String, Attribute> attributes = new HashMap<String, Attribute>();
+        attributes.put("attribute3", attribute3);
+        assertEquals(templateAttribute.hashCode() + "my.preparer".hashCode()
+                + attributes.hashCode() + cascadedAttributes.hashCode(),
+                attributeContext.hashCode());
+    }
+
+    /**
+     * Tests {@link BasicAttributeContext} for the TILES-429 bug.
+     */
+    @Test
+    public void testTiles429() {
+        AttributeContext toCopy = new BasicAttributeContext();
+        toCopy.putAttribute("name1", new Attribute("value1"), false);
+        toCopy.putAttribute("name2", new Attribute("value2"), true);
+        List<Attribute> listOfObjects = new ArrayList<Attribute>();
+        Attribute attribute1 = new Attribute(1);
+        listOfObjects.add(attribute1);
+        ListAttribute listAttribute = new ListAttribute(listOfObjects);
+        listAttribute.setInherit(true);
+        toCopy.putAttribute("name3", listAttribute);
+        Attribute templateAttribute = Attribute
+                .createTemplateAttribute("/template.jsp");
+        Set<String> roles = new HashSet<String>();
+        roles.add("role1");
+        roles.add("role2");
+        templateAttribute.setRoles(roles);
+        toCopy.setTemplateAttribute(templateAttribute);
+        toCopy.setPreparer("my.preparer.Preparer");
+        AttributeContext context = new BasicAttributeContext(toCopy);
+        Attribute attribute = context.getAttribute("name1");
+        attribute.setValue("newValue1");
+        attribute = context.getAttribute("name1");
+        assertEquals("newValue1", attribute.getValue());
+        attribute = toCopy.getAttribute("name1");
+        assertEquals("value1", attribute.getValue());
+        attribute = context.getAttribute("name3");
+        assertTrue(attribute instanceof ListAttribute);
+        assertTrue(((ListAttribute) attribute).isInherit());
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/CompareUtilTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/CompareUtilTest.java
new file mode 100644
index 0000000..d87201d
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/CompareUtilTest.java
@@ -0,0 +1,60 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link CompareUtil}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CompareUtilTest {
+
+    /**
+     * A test value.
+     */
+    private static final Integer TEST_VALUE = 10;
+
+    /**
+     * Test method for {@link org.apache.tiles.CompareUtil#nullSafeEquals(java.lang.Object, java.lang.Object)}.
+     */
+    @Test
+    public void testNullSafeEquals() {
+        assertTrue(CompareUtil.nullSafeEquals(1, 1));
+        assertFalse(CompareUtil.nullSafeEquals(1, 2));
+        assertFalse(CompareUtil.nullSafeEquals(1, null));
+        assertFalse(CompareUtil.nullSafeEquals(null, 1));
+        assertTrue(CompareUtil.nullSafeEquals(null, null));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.CompareUtil#nullSafeHashCode(java.lang.Object)}.
+     */
+    @Test
+    public void testNullSafeHashCode() {
+        assertEquals(TEST_VALUE.hashCode(), CompareUtil.nullSafeHashCode(TEST_VALUE));
+        assertEquals(0, CompareUtil.nullSafeHashCode(null));
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/ExpressionTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/ExpressionTest.java
new file mode 100644
index 0000000..dc23f69
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/ExpressionTest.java
@@ -0,0 +1,134 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link Expression}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ExpressionTest {
+
+    /**
+     * Test method for {@link org.apache.tiles.Expression#hashCode()}.
+     */
+    @Test
+    public void testHashCode() {
+        Expression expression = new Expression("hello", "there");
+        assertEquals("hello".hashCode() + "there".hashCode(), expression.hashCode());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.Expression#Expression(java.lang.String, java.lang.String)}.
+     */
+    @Test
+    public void testExpressionStringString() {
+        Expression expression = new Expression("hello", "there");
+        assertEquals("hello", expression.getExpression());
+        assertEquals("there", expression.getLanguage());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.Expression#Expression(java.lang.String)}.
+     */
+    @Test
+    public void testExpressionString() {
+        Expression expression = new Expression("hello");
+        assertEquals("hello", expression.getExpression());
+        assertNull(expression.getLanguage());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.Expression#Expression(org.apache.tiles.Expression)}.
+     */
+    @Test
+    public void testExpressionExpression() {
+        Expression expression = new Expression("hello", "there");
+        Expression expression2 = new Expression(expression);
+        assertEquals("hello", expression2.getExpression());
+        assertEquals("there", expression2.getLanguage());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.Expression#createExpressionFromDescribedExpression(java.lang.String)}.
+     */
+    @Test
+    public void testCreateExpressionFromDescribedExpression() {
+        Expression expression = Expression.createExpressionFromDescribedExpression("hello");
+        assertEquals("hello", expression.getExpression());
+        assertNull(expression.getLanguage());
+        expression = Expression.createExpressionFromDescribedExpression("there:hello");
+        assertEquals("hello", expression.getExpression());
+        assertEquals("there", expression.getLanguage());
+        expression = Expression.createExpressionFromDescribedExpression("there_:hello");
+        assertEquals("there_:hello", expression.getExpression());
+        assertNull(expression.getLanguage());
+        assertNull(Expression.createExpressionFromDescribedExpression(null));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.Expression#createExpression(java.lang.String, java.lang.String)}.
+     */
+    @Test
+    public void testCreateExpression() {
+        Expression expression = Expression.createExpression("hello", "there");
+        assertEquals("hello", expression.getExpression());
+        assertEquals("there", expression.getLanguage());
+        expression = Expression.createExpression("hello", null);
+        assertEquals("hello", expression.getExpression());
+        assertNull(expression.getLanguage());
+        expression = Expression.createExpression(null, "there");
+        assertNull(expression);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.Expression#equals(java.lang.Object)}.
+     */
+    @Test
+    public void testEqualsObject() {
+        Expression expression = new Expression("hello", "there");
+        Expression expression2 = new Expression("hello", "there");
+        assertEquals(expression, expression2);
+        expression2 = new Expression("hello", "there2");
+        assertFalse(expression.equals(expression2));
+        expression2 = new Expression("hello");
+        assertFalse(expression.equals(expression2));
+        expression = new Expression("hello");
+        assertEquals(expression, expression2);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.Expression#toString()}.
+     */
+    @Test
+    public void testToString() {
+        Expression expression = new Expression("hello", "there");
+        assertEquals("there:hello", expression.toString());
+        expression = new Expression("hello");
+        assertEquals("DEFAULT:hello", expression.toString());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/ListAttributeTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/ListAttributeTest.java
new file mode 100644
index 0000000..314e639
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/ListAttributeTest.java
@@ -0,0 +1,187 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link ListAttribute}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ListAttributeTest {
+
+    /**
+     * The list size.
+     */
+    private static final int LIST_SIZE = 3;
+
+    /**
+     * Test method for {@link org.apache.tiles.ListAttribute#hashCode()}.
+     */
+    @Test
+    public void testHashCode() {
+        ListAttribute attribute = new ListAttribute();
+        List<Attribute> list = new ArrayList<Attribute>();
+        list.add(new Attribute("value1"));
+        list.add(new Attribute("value2"));
+        attribute.setValue(list);
+        attribute.setInherit(true);
+        assertEquals(list.hashCode() + Boolean.TRUE.hashCode(), attribute.hashCode());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.ListAttribute#equals(java.lang.Object)}.
+     */
+    @Test
+    public void testEqualsObject() {
+        ListAttribute attribute = new ListAttribute();
+        List<Attribute> list = new ArrayList<Attribute>();
+        list.add(new Attribute("value1"));
+        list.add(new Attribute("value2"));
+        attribute.setValue(list);
+        attribute.setInherit(true);
+        ListAttribute toCheck = new ListAttribute(attribute);
+        assertTrue(attribute.equals(toCheck));
+        toCheck = new ListAttribute(attribute);
+        toCheck.setInherit(false);
+        assertFalse(attribute.equals(toCheck));
+        toCheck = new ListAttribute(attribute);
+        toCheck.add(new Attribute("value3"));
+        assertFalse(attribute.equals(toCheck));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.ListAttribute#ListAttribute(java.util.List)}.
+     */
+    @Test
+    public void testListAttributeListOfAttribute() {
+        List<Attribute> attributes = new ArrayList<Attribute>();
+        attributes.add(new Attribute("value1"));
+        attributes.add(new Attribute("value2"));
+        ListAttribute attribute = new ListAttribute(attributes);
+        assertEquals(attributes, attribute.getValue());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.ListAttribute#ListAttribute(org.apache.tiles.ListAttribute)}.
+     */
+    @Test
+    public void testListAttributeListAttribute() {
+        ListAttribute attribute = new ListAttribute();
+        List<Attribute> list = new ArrayList<Attribute>();
+        list.add(new Attribute("value1"));
+        list.add(new Attribute("value2"));
+        list.add(null);
+        attribute.setValue(list);
+        attribute.setInherit(true);
+        ListAttribute toCheck = new ListAttribute(attribute);
+        assertEquals(attribute, toCheck);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.ListAttribute#setValue(java.util.List)}.
+     */
+    @Test
+    public void testSetValue() {
+        ListAttribute attribute = new ListAttribute();
+        List<Attribute> list = new ArrayList<Attribute>();
+        list.add(new Attribute("value1"));
+        list.add(new Attribute("value2"));
+        attribute.setValue(list);
+        assertEquals(list, attribute.getValue());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.ListAttribute#add(org.apache.tiles.Attribute)}.
+     */
+    @Test
+    public void testAdd() {
+        List<Attribute> list = new ArrayList<Attribute>();
+        Attribute attribute1 = new Attribute("value1");
+        list.add(attribute1);
+        Attribute attribute2 = new Attribute("value2");
+        list.add(attribute2);
+        ListAttribute attribute = new ListAttribute(list);
+        Attribute attribute3 = new Attribute("value3");
+        attribute.add(attribute3);
+        list = attribute.getValue();
+        assertEquals(LIST_SIZE, list.size());
+        assertEquals(attribute1, list.get(0));
+        assertEquals(attribute2, list.get(1));
+        assertEquals(attribute3, list.get(2));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.ListAttribute#setInherit(boolean)}.
+     */
+    @Test
+    public void testSetInherit() {
+        ListAttribute attribute = new ListAttribute();
+        attribute.setInherit(true);
+        assertTrue(attribute.isInherit());
+        attribute.setInherit(false);
+        assertFalse(attribute.isInherit());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.ListAttribute#inherit(org.apache.tiles.ListAttribute)}.
+     */
+    @Test
+    public void testInherit() {
+        List<Attribute> list = new ArrayList<Attribute>();
+        Attribute attribute1 = new Attribute("value1");
+        list.add(attribute1);
+        Attribute attribute2 = new Attribute("value2");
+        list.add(attribute2);
+        ListAttribute parent = new ListAttribute(list);
+        Attribute attribute3 = new Attribute("value3");
+        ListAttribute child = new ListAttribute();
+        child.add(attribute3);
+        child.inherit(parent);
+        list = child.getValue();
+        assertEquals(LIST_SIZE, list.size());
+        assertEquals(attribute1, list.get(0));
+        assertEquals(attribute2, list.get(1));
+        assertEquals(attribute3, list.get(2));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.ListAttribute#clone()}.
+     */
+    @Test
+    public void testClone() {
+        ListAttribute attribute = new ListAttribute();
+        List<Attribute> list = new ArrayList<Attribute>();
+        list.add(new Attribute("value1"));
+        list.add(new Attribute("value2"));
+        attribute.setValue(list);
+        attribute.setInherit(true);
+        ListAttribute toCheck = attribute.clone();
+        assertEquals(attribute, toCheck);
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/NoSuchContainerExceptionTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/NoSuchContainerExceptionTest.java
new file mode 100644
index 0000000..c700a1b
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/NoSuchContainerExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link NoSuchContainerException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class NoSuchContainerExceptionTest {
+
+    /**
+     * Test method for {@link org.apache.tiles.NoSuchContainerException#NoSuchContainerException()}.
+     */
+    @Test
+    public void testNoSuchContainerException() {
+        NoSuchContainerException exception = new NoSuchContainerException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.NoSuchContainerException#NoSuchContainerException(java.lang.String)}.
+     */
+    @Test
+    public void testNoSuchContainerExceptionString() {
+        NoSuchContainerException exception = new NoSuchContainerException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.NoSuchContainerException#NoSuchContainerException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testNoSuchContainerExceptionThrowable() {
+        Throwable cause = new Throwable();
+        NoSuchContainerException exception = new NoSuchContainerException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.NoSuchContainerException#NoSuchContainerException(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testNoSuchContainerExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        NoSuchContainerException exception = new NoSuchContainerException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/TestDefinition.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/TestDefinition.java
new file mode 100644
index 0000000..0f28554
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/TestDefinition.java
@@ -0,0 +1,252 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+
+/**
+ * Tests the Definition class.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestDefinition {
+
+    /**
+     * Tests {@link Definition#Definition(Definition)}.
+     */
+    @Test
+    public void testDefinitionCopy() {
+        Definition definition = new Definition();
+        definition.setName("myDefinition");
+        definition.setExtends("myExtends");
+        Attribute attribute1 = new Attribute("value1");
+        definition.putAttribute("name1", attribute1);
+        Attribute attribute2 = new Attribute("value2");
+        definition.putAttribute("name2", attribute2);
+        Definition toCheck = new Definition(definition);
+        assertEquals("myDefinition", toCheck.getName());
+        assertEquals("myExtends", toCheck.getExtends());
+        assertEquals(attribute1, toCheck.getAttribute("name1"));
+        assertEquals(attribute2, toCheck.getAttribute("name2"));
+    }
+
+    /**
+     * Tests {@link Definition#Definition(Definition)}.
+     */
+    @Test
+    public void testDefinitionComplete() {
+        Map<String, Attribute> attributeMap = new HashMap<String, Attribute>();
+        Attribute attribute1 = new Attribute("value1");
+        Attribute attribute2 = new Attribute("value2");
+        attributeMap.put("name1", attribute1);
+        attributeMap.put("name2", attribute2);
+        Attribute templateAttribute = Attribute.createTemplateAttribute("/my/template.jsp");
+        Definition definition = new Definition("myDefinition",
+                templateAttribute, attributeMap);
+        assertEquals("myDefinition", definition.getName());
+        assertEquals(templateAttribute, definition.getTemplateAttribute());
+        assertEquals(attribute1, definition.getAttribute("name1"));
+        assertEquals(attribute2, definition.getAttribute("name2"));
+    }
+
+    /**
+     * Verifies the put Attribute functionality.
+     *
+     * Attributes are added or replaced in the definition.
+     */
+    @Test
+    public void testPutAttribute() {
+        Definition def = new Definition();
+        def.setName("test1");
+        def.setTemplateAttribute(Attribute
+                .createTemplateAttribute("/page1.jsp"));
+        Attribute attr1 = new Attribute("test.definition.name",
+                (Expression) null, null, "definition");
+        def.putAttribute("attr1",  attr1);
+
+        attr1 = def.getAttribute("attr1");
+        assertNotNull("Null attribute.", attr1);
+        assertTrue("Wrong attribute type", "definition".equals(attr1
+                .getRenderer()));
+    }
+
+    /**
+     * Tests the {@link Definition#inherit(BasicAttributeContext)} method.
+     */
+    @Test
+    public void testInherit() {
+        Definition toCopy = new Definition();
+        toCopy.putAttribute("name1", new Attribute("value1"), true);
+        toCopy.putAttribute("name2", new Attribute("value2"), true);
+        toCopy.putAttribute("name3", new Attribute("value3"), false);
+        toCopy.putAttribute("name4", new Attribute("value4"), false);
+        Definition context = new Definition();
+        toCopy.putAttribute("name1", new Attribute("newValue1"), true);
+        toCopy.putAttribute("name3", new Attribute("newValue3"), false);
+        context.inherit(toCopy);
+        Attribute attribute = context.getCascadedAttribute("name1");
+        assertNotNull("Attribute name1 not found", attribute);
+        assertEquals("Attribute name1 has not been set correctly", "newValue1",
+                attribute.getValue());
+        attribute = context.getCascadedAttribute("name2");
+        assertNotNull("Attribute name2 not found", attribute);
+        assertEquals("Attribute name2 has not been set correctly", "value2",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name3");
+        assertNotNull("Attribute name3 not found", attribute);
+        assertEquals("Attribute name3 has not been set correctly", "newValue3",
+                attribute.getValue());
+        attribute = context.getLocalAttribute("name4");
+        assertNotNull("Attribute name4 not found", attribute);
+        assertEquals("Attribute name4 has not been set correctly", "value4",
+                attribute.getValue());
+
+        toCopy = new Definition();
+        toCopy.setPreparer("ExtendedPreparer");
+        Attribute templateAttribute = new Attribute("extendedTemplate.jsp",
+                Expression.createExpression("expression", "language"),
+                "extendedRole", "template");
+        toCopy.setTemplateAttribute(templateAttribute);
+        context = new Definition();
+        context.inherit(toCopy);
+        assertEquals("Preparer not inherited", "ExtendedPreparer", context
+                .getPreparer());
+        assertNotNull("Roles not inherited", context.getTemplateAttribute()
+                .getRoles());
+        assertEquals("Roles not inherited", context.getTemplateAttribute()
+                .getRoles().size(), 1);
+        assertTrue("Roles not inherited", context.getTemplateAttribute()
+                .getRoles().contains(
+                "extendedRole"));
+        assertEquals("Template not inherited", "extendedTemplate.jsp", context
+                .getTemplateAttribute().getValue());
+        assertEquals("Template expression not inherited", "expression", context
+                .getTemplateAttribute().getExpressionObject().getExpression());
+        assertEquals("Template expression language not inherited", "language",
+                context.getTemplateAttribute().getExpressionObject()
+                        .getLanguage());
+        context = new Definition();
+        context.setPreparer("LocalPreparer");
+        templateAttribute = new Attribute("localTemplate.jsp", Expression
+                .createExpression("localExpression", "localLanguage"),
+                "localRole", "template");
+        context.setTemplateAttribute(templateAttribute);
+        assertEquals("Preparer inherited", "LocalPreparer", context
+                .getPreparer());
+        assertNotNull("Roles not correct", context.getTemplateAttribute()
+                .getRoles());
+        assertEquals("Roles not correct", context.getTemplateAttribute()
+                .getRoles().size(), 1);
+        assertTrue("Roles inherited", context.getTemplateAttribute().getRoles()
+                .contains("localRole"));
+        assertEquals("Template inherited", "localTemplate.jsp", context
+                .getTemplateAttribute().getValue());
+        assertEquals("Template expression inherited", "localExpression",
+                context.getTemplateAttribute().getExpressionObject()
+                        .getExpression());
+        assertEquals("Template expression language not inherited",
+                "localLanguage", context.getTemplateAttribute()
+                        .getExpressionObject().getLanguage());
+    }
+
+    /**
+     * Tests {@link Definition#toString()}.
+     */
+    @Test
+    public void testToString() {
+        Definition definition = new Definition();
+        definition.setName("myDefinitionName");
+        assertEquals(
+                "{name=myDefinitionName, template=<null>, role=<null>, preparerInstance=null, attributes=null}",
+                definition.toString());
+        definition.setTemplateAttribute(Attribute.createTemplateAttribute("myTemplate"));
+        assertEquals(
+                "{name=myDefinitionName, template=myTemplate, role=null, preparerInstance=null, attributes=null}",
+                definition.toString());
+        definition.putAttribute("myAttributeName", new Attribute("myAttributeValue"));
+        assertEquals(
+                "{name=myDefinitionName, template=myTemplate, role=null, preparerInstance=null, "
+                        + "attributes={myAttributeName=myAttributeValue}}",
+                definition.toString());
+    }
+
+    /**
+     * Tests {@link Definition#equals(Object)}.
+     */
+    @Test
+    public void testEquals() {
+        Definition definition = new Definition();
+        definition.setName("myDefinition");
+        definition.setExtends("myExtends");
+        Attribute attribute1 = new Attribute("value1");
+        definition.putAttribute("name1", attribute1);
+        Attribute attribute2 = new Attribute("value2");
+        definition.putAttribute("name2", attribute2);
+        Definition toCheck = new Definition(definition);
+        assertTrue(definition.equals(toCheck));
+        toCheck = new Definition(definition);
+        toCheck.setName("anotherDefinition");
+        assertFalse(definition.equals(toCheck));
+        toCheck = new Definition(definition);
+        toCheck.setExtends("anotherExtends");
+        assertFalse(definition.equals(toCheck));
+        toCheck = new Definition(definition);
+        toCheck.putAttribute("name1", new Attribute("anotherAttribute"));
+        assertFalse(definition.equals(toCheck));
+    }
+
+    /**
+     * Tests {@link Definition#hashCode()}.
+     */
+    @Test
+    public void testHashCode() {
+        Definition definition = new Definition();
+        definition.setName("myDefinition");
+        definition.setExtends("myExtends");
+        Attribute attribute1 = new Attribute("value1");
+        definition.putAttribute("name1", attribute1);
+        Attribute attribute2 = new Attribute("value2");
+        definition.putAttribute("name2", attribute2);
+        BasicAttributeContext attributeContext = new BasicAttributeContext();
+        attributeContext.putAttribute("name1", attribute1);
+        attributeContext.putAttribute("name2", attribute2);
+        assertEquals("myDefinition".hashCode() + "myExtends".hashCode()
+                + attributeContext.hashCode(), definition.hashCode());
+    }
+
+    /**
+     * Tests {@link Definition#isExtending()}.
+     */
+    @Test
+    public void testIsExtending() {
+        Definition definition = new Definition();
+        definition.setName("myDefinition");
+        assertFalse(definition.isExtending());
+        definition.setExtends("myExtends");
+        assertTrue(definition.isExtending());
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/TilesContainerWrapperTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/TilesContainerWrapperTest.java
new file mode 100644
index 0000000..46f7ada
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/TilesContainerWrapperTest.java
@@ -0,0 +1,252 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesContainerWrapper}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesContainerWrapperTest {
+
+    /**
+     * The container.
+     */
+    private TilesContainer container;
+
+    /**
+     * The wrapper to test.
+     */
+    private TilesContainerWrapper wrapper;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        container = createMock(TilesContainer.class);
+        wrapper = new TilesContainerWrapper(container);
+    }
+
+    /**
+     * Tests {@link TilesContainerWrapper#TilesContainerWrapper(TilesContainer)}.
+     */
+    @Test(expected = NullPointerException.class)
+    public void testTilesContainerWrapperNPE() {
+        new TilesContainerWrapper(null);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.TilesContainerWrapper#getWrappedContainer()}.
+     */
+    @Test
+    public void testGetWrappedContainer() {
+        replay(container);
+        assertSame(container, wrapper.getWrappedContainer());
+        verify(container);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.TilesContainerWrapper#endContext(org.apache.tiles.request.Request)}.
+     */
+    @Test
+    public void testEndContext() {
+        Request request = createMock(Request.class);
+
+        container.endContext(request);
+
+        replay(container, request);
+        wrapper.endContext(request);
+        verify(container, request);
+    }
+
+    /**
+     * Test method for {@link TilesContainerWrapper#evaluate(Attribute, Request)}.
+     */
+    @Test
+    public void testEvaluate() {
+        Request request = createMock(Request.class);
+        Attribute attribute = createMock(Attribute.class);
+
+        expect(container.evaluate(attribute, request)).andReturn(new Integer(1));
+
+        replay(container, request, attribute);
+        assertEquals(new Integer(1), wrapper.evaluate(attribute, request));
+        verify(container, request, attribute);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.TilesContainerWrapper#getApplicationContext()}.
+     */
+    @Test
+    public void testGetApplicationContext() {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        expect(container.getApplicationContext()).andReturn(applicationContext);
+
+        replay(container, applicationContext);
+        assertSame(applicationContext, wrapper.getApplicationContext());
+        verify(container, applicationContext);
+    }
+
+    /**
+     * Test method for {@link TilesContainerWrapper#getAttributeContext(Request)}.
+     */
+    @Test
+    public void testGetAttributeContext() {
+        Request request = createMock(Request.class);
+        AttributeContext attribute = createMock(AttributeContext.class);
+
+        expect(container.getAttributeContext(request)).andReturn(attribute);
+
+        replay(container, request, attribute);
+        assertSame(attribute, wrapper.getAttributeContext(request));
+        verify(container, request, attribute);
+    }
+
+    /**
+     * Test method for {@link TilesContainerWrapper#getDefinition(String, Request)}.
+     */
+    @Test
+    public void testGetDefinition() {
+        Request request = createMock(Request.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(container.getDefinition("definition", request)).andReturn(definition);
+
+        replay(container, request, definition);
+        assertSame(definition, wrapper.getDefinition("definition", request));
+        verify(container, request, definition);
+    }
+
+    /**
+     * Test method for {@link TilesContainerWrapper#isValidDefinition(String, Request)}.
+     */
+    @Test
+    public void testIsValidDefinition() {
+        Request request = createMock(Request.class);
+
+        expect(container.isValidDefinition("definition", request)).andReturn(true);
+
+        replay(container, request);
+        assertTrue(wrapper.isValidDefinition("definition", request));
+        verify(container, request);
+    }
+
+    /**
+     * Test method for {@link TilesContainerWrapper#prepare(String, Request)}.
+     */
+    @Test
+    public void testPrepare() {
+        Request request = createMock(Request.class);
+
+        container.prepare("preparer", request);
+
+        replay(container, request);
+        wrapper.prepare("preparer", request);
+        verify(container, request);
+    }
+
+    /**
+     * Test method for {@link TilesContainerWrapper#render(String, Request)}.
+     */
+    @Test
+    public void testRenderStringRequest() {
+        Request request = createMock(Request.class);
+
+        container.render("definition", request);
+
+        replay(container, request);
+        wrapper.render("definition", request);
+        verify(container, request);
+    }
+
+    /**
+     * Test method for {@link TilesContainerWrapper#render(Definition, Request)}.
+     */
+    @Test
+    public void testRenderDefinitionRequest() {
+        Request request = createMock(Request.class);
+        Definition definition = createMock(Definition.class);
+
+        container.render(definition, request);
+
+        replay(container, request, definition);
+        wrapper.render(definition, request);
+        verify(container, request, definition);
+    }
+
+    /**
+     * Test method for {@link TilesContainerWrapper#render(Attribute, Request)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testRenderAttributeRequest() throws IOException {
+        Request request = createMock(Request.class);
+        Attribute attribute = createMock(Attribute.class);
+
+        container.render(attribute, request);
+
+        replay(container, request, attribute);
+        wrapper.render(attribute, request);
+        verify(container, request, attribute);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.TilesContainerWrapper#renderContext(org.apache.tiles.request.Request)}.
+     */
+    @Test
+    public void testRenderContext() {
+        Request request = createMock(Request.class);
+
+        container.renderContext(request);
+
+        replay(container, request);
+        wrapper.renderContext(request);
+        verify(container, request);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.TilesContainerWrapper#startContext(org.apache.tiles.request.Request)}.
+     */
+    @Test
+    public void testStartContext() {
+        Request request = createMock(Request.class);
+        AttributeContext attribute = createMock(AttributeContext.class);
+
+        expect(container.startContext(request)).andReturn(attribute);
+
+        replay(container, request, attribute);
+        assertSame(attribute, wrapper.startContext(request));
+        verify(container, request, attribute);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/TilesExceptionTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/TilesExceptionTest.java
new file mode 100644
index 0000000..95ffb22
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/TilesExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesExceptionTest {
+
+    /**
+     * Test method for {@link org.apache.tiles.TilesException#TilesException()}.
+     */
+    @Test
+    public void testTilesException() {
+        TilesException exception = new TilesException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.TilesException#TilesException(java.lang.String)}.
+     */
+    @Test
+    public void testTilesExceptionString() {
+        TilesException exception = new TilesException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.TilesException#TilesException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testTilesExceptionThrowable() {
+        Throwable cause = new Throwable();
+        TilesException exception = new TilesException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.TilesException#TilesException(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testTilesExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        TilesException exception = new TilesException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/access/TilesAccessTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/access/TilesAccessTest.java
new file mode 100644
index 0000000..6f07633
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/access/TilesAccessTest.java
@@ -0,0 +1,241 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.access;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+import org.apache.tiles.NoSuchContainerException;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+
+/**
+ * Tests {@link TilesAccess}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesAccessTest {
+
+    /**
+     * Tests {@link TilesAccess#setContainer(ApplicationContext, TilesContainer)}.
+     */
+    @Test
+    public void testSetContainer() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+        expect(context.getApplicationScope()).andReturn(attribs);
+        replay(context, container);
+        TilesAccess.setContainer(context, container);
+        assertEquals(attribs.size(), 1);
+        assertEquals(attribs.get(TilesAccess.CONTAINER_ATTRIBUTE), container);
+        verify(context, container);
+    }
+
+    /**
+     * Tests {@link TilesAccess#setContainer(ApplicationContext, TilesContainer, String)}.
+     */
+    @Test
+    public void testSetContainerWithKey() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+        replay(context, container);
+        TilesAccess.setContainer(context, container, "myKey");
+        assertEquals(1, attribs.size());
+        assertEquals(container, attribs.get("myKey"));
+
+        TilesAccess.setContainer(context, null, "myKey");
+        assertEquals(0, attribs.size());
+
+        TilesAccess.setContainer(context, container, null);
+        assertEquals(1, attribs.size());
+        assertEquals(container, attribs.get(TilesAccess.CONTAINER_ATTRIBUTE));
+        verify(context, container);
+    }
+
+    /**
+     * Tests {@link TilesAccess#getContainer(ApplicationContext)}.
+     */
+    @Test
+    public void testGetContainer() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+
+        replay(context, container);
+        attribs.put(TilesAccess.CONTAINER_ATTRIBUTE, container);
+        assertEquals(container, TilesAccess.getContainer(context));
+        verify(context, container);
+    }
+
+    /**
+     * Tests {@link TilesAccess#getContainer(TilesApplicationContext, String))}.
+     */
+    @Test
+    public void testGetContainerWithKey() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+
+        replay(context, container);
+        attribs.put(TilesAccess.CONTAINER_ATTRIBUTE, container);
+        attribs.put("myKey", container);
+        assertEquals(container, TilesAccess.getContainer(context, null));
+        assertEquals(container, TilesAccess.getContainer(context, "myKey"));
+        verify(context, container);
+    }
+
+    /**
+     * Tests
+     * {@link ServletUtil#setCurrentContainer(ServletRequest, String)}.
+     */
+    @Test
+    public void testSetCurrentContainer() {
+        Request request = createMock(Request.class);
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+        attribs.put("myKey", container);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(request.getApplicationContext()).andReturn(context);
+        replay(request, context, container);
+        TilesAccess.setCurrentContainer(request, "myKey");
+        assertEquals(container, requestScope.get(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME));
+        verify(request, context, container);
+    }
+
+    /**
+     * Tests
+     * {@link ServletUtil#setCurrentContainer(ServletRequest, String)}.
+     */
+    @Test(expected = NoSuchContainerException.class)
+    public void testSetCurrentContainerException() {
+        Request request = createMock(Request.class);
+        ApplicationContext context = createMock(ApplicationContext.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+
+        expect(request.getApplicationContext()).andReturn(context);
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+        replay(request, context);
+        try {
+            TilesAccess.setCurrentContainer(request, "myKey");
+        } finally {
+            verify(request, context);
+        }
+    }
+
+    /**
+     * Tests
+     * {@link ServletUtil#setCurrentContainer(ServletRequest, TilesContainer)}.
+     */
+    @Test
+    public void testSetCurrentContainerWithContainer() {
+        Request request = createMock(Request.class);
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+        attribs.put("myKey", container);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+        expect(request.getContext("request")).andReturn(requestScope);
+
+        replay(request, context, container);
+        TilesAccess.setCurrentContainer(request, container);
+        assertEquals(container, requestScope.get(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME));
+        verify(request, context, container);
+    }
+
+    /**
+     * Tests
+     * {@link ServletUtil#setCurrentContainer(ServletRequest, TilesContainer)}.
+     */
+    @Test(expected = NullPointerException.class)
+    public void testSetCurrentContainerWithContainerException() {
+        Request request = createMock(Request.class);
+        ApplicationContext context = createMock(ApplicationContext.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+
+        replay(request, context);
+        try {
+            TilesAccess.setCurrentContainer(request, (TilesContainer) null);
+        } finally {
+            verify(request, context);
+        }
+    }
+
+    /**
+     * Tests {@link ServletUtil#getCurrentContainer(ServletRequest)}.
+     */
+    @Test
+    public void testGetCurrentContainer() {
+        Request request = createMock(Request.class);
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+        attribs.put("myKey", container);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(context);
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+        expect(request.getContext("request")).andReturn(requestScope);
+
+        replay(request, context, container);
+        assertEquals(container, TilesAccess.getCurrentContainer(request));
+        verify(request, context, container);
+    }
+
+    /**
+     * Tests {@link ServletUtil#getCurrentContainer(ServletRequest)}.
+     */
+    @Test
+    public void testGetCurrentContainerDefault() {
+        Request request = createMock(Request.class);
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+        attribs.put(TilesAccess.CONTAINER_ATTRIBUTE, container);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+
+        expect(request.getApplicationContext()).andReturn(context);
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+        expect(request.getContext("request")).andReturn(requestScope);
+
+        replay(request, context, container);
+        assertEquals(container, TilesAccess.getCurrentContainer(request));
+        verify(request, context, container);
+    }
+}
diff --git a/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/preparer/PreparerExceptionTest.java b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/preparer/PreparerExceptionTest.java
new file mode 100644
index 0000000..110ee79
--- /dev/null
+++ b/TILES_3_0_X/tiles-api/src/test/java/org/apache/tiles/preparer/PreparerExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.preparer;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link PreparerException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class PreparerExceptionTest {
+
+    /**
+     * Test method for {@link PreparerException#PreparerException()}.
+     */
+    @Test
+    public void testPreparerException() {
+        PreparerException exception = new PreparerException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link PreparerException#PreparerException(java.lang.String)}.
+     */
+    @Test
+    public void testPreparerExceptionString() {
+        PreparerException exception = new PreparerException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link PreparerException#PreparerException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testPreparerExceptionThrowable() {
+        Throwable cause = new Throwable();
+        PreparerException exception = new PreparerException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link PreparerException#PreparerException(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testPreparerExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        PreparerException exception = new PreparerException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-compat/pom.xml b/TILES_3_0_X/tiles-compat/pom.xml
new file mode 100644
index 0000000..cecc785
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/pom.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>tiles-compat</artifactId>
+  <packaging>jar</packaging>
+  <name>Tiles - Compatibility</name>
+  <description>Tiles compatibility library, to help migration from Struts-Tiles.
+  </description>
+
+  <properties>
+      <tiles.osgi.symbolicName>org.apache.tiles.compat</tiles.osgi.symbolicName>
+  </properties>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <excludes>
+          <exclude>LICENSE.txt</exclude>
+          <exclude>NOTICE.txt</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>LICENSE.txt</include>
+          <include>NOTICE.txt</include>
+        </includes>
+        <targetPath>META-INF</targetPath>
+      </resource>
+    </resources>
+
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>net.sf.dtddoc</groupId>
+        <artifactId>dtddoc-maven-plugin</artifactId>
+        <version>1.1</version>
+        <configuration>
+          <docTitle>Tiles Definition File</docTitle>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-jsp</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shale</groupId>
+      <artifactId>shale-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+
+</project>
diff --git a/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/beans/MenuItem.java b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/beans/MenuItem.java
new file mode 100644
index 0000000..ca5e107
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/beans/MenuItem.java
@@ -0,0 +1,88 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.beans;
+
+import java.io.Serializable;
+
+/**
+ * Interface for MenuItems.
+ *
+ * @see SimpleMenuItem
+ * @version $Rev$ $Date$
+ */
+public interface MenuItem extends Serializable {
+
+    /**
+     * Sets the value (i.e. the visible part) of this menu item.
+     *
+     * @param value The value of this item.
+     */
+    void setValue(String value);
+
+    /**
+     * Returns the value (i.e. the visible part) of this menu item.
+     *
+     * @return The value of this item.
+     */
+    String getValue();
+
+    /**
+     * Sets the URL of this menu item.
+     *
+     * @param link The URL of this item.
+     */
+    void setLink(String link);
+
+    /**
+     * Returns the URL of this menu item.
+     *
+     * @return The URL of this item.
+     */
+    String getLink();
+
+    /**
+     * Sets the icon URL of this menu item.
+     *
+     * @param link The icon URL.
+     */
+    void setIcon(String link);
+
+    /**
+     * Returns the icon URL of this menu item.
+     *
+     * @return The icon URL.
+     */
+    String getIcon();
+
+    /**
+     * Sets the tooltip text.
+     *
+     * @param link The tooltip text.
+     */
+    void setTooltip(String link);
+
+    /**
+     * Returns the tooltip text.
+     *
+     * @return The tooltip text.
+     */
+    String getTooltip();
+}
diff --git a/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/beans/SimpleMenuItem.java b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/beans/SimpleMenuItem.java
new file mode 100644
index 0000000..757f3a1
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/beans/SimpleMenuItem.java
@@ -0,0 +1,157 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.beans;
+
+import java.io.Serializable;
+
+/**
+ * A MenuItem implementation.
+ * Used to read menu items in definitions.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SimpleMenuItem implements MenuItem, Serializable {
+
+    /**
+     * The value of the item, i.e. what is really visible to the user.
+     */
+    private String value = null;
+
+    /**
+     * The link where the menu item points to.
+     */
+    private String link = null;
+
+    /**
+     * The (optional) icon image URL.
+     */
+    private String icon = null;
+
+    /**
+     * The (optional) tooltip text.
+     */
+    private String tooltip = null;
+
+    /**
+     * Constructor.
+     */
+    public SimpleMenuItem() {
+        super();
+    }
+
+    /**
+     * Sets the value of the item, i.e. what is really visible to the user.
+     *
+     * @param value The value of the item.
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns the value of the item, i.e. what is really visible to the user.
+     *
+     * @return The value of the item.
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the link where the menu item points to.
+     *
+     * @param link The link.
+     */
+    public void setLink(String link) {
+        this.link = link;
+    }
+
+    /**
+     * Returns the link where the menu item points to.
+     *
+     * @return The link.
+     */
+    public String getLink() {
+        return link;
+    }
+
+    /**
+     * Sets the (optional) icon image URL.
+     *
+     * @param icon The icon URL.
+     */
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    /**
+     * Returns the (optional) icon image URL.
+     *
+     * @return The icon URL.
+     */
+    public String getIcon() {
+        return icon;
+    }
+
+    /**
+     * Sets the (optional) tooltip text.
+     *
+     * @param tooltip The tooltip text.
+     */
+    public void setTooltip(String tooltip) {
+        this.tooltip = tooltip;
+    }
+
+    /**
+     * Returns the (optional) tooltip text.
+     *
+     * @return The tooltip text.
+     */
+    public String getTooltip() {
+        return tooltip;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String toString() {
+        StringBuffer buff = new StringBuffer("SimpleMenuItem[");
+
+        if (getValue() != null) {
+            buff.append("value=").append(getValue()).append(", ");
+        }
+
+        if (getLink() != null) {
+            buff.append("link=").append(getLink()).append(", ");
+        }
+
+        if (getTooltip() != null) {
+            buff.append("tooltip=").append(getTooltip()).append(", ");
+        }
+
+        if (getIcon() != null) {
+            buff.append("icon=").append(getIcon()).append(", ");
+        }
+
+        buff.append("]");
+        return buff.toString();
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/beans/package-info.java b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/beans/package-info.java
new file mode 100644
index 0000000..7ce4956
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/beans/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes to work with Tiles menu items and beans.
+ */
+package org.apache.tiles.beans;
diff --git a/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/definition/digester/CompatibilityDigesterDefinitionsReader.java b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/definition/digester/CompatibilityDigesterDefinitionsReader.java
new file mode 100644
index 0000000..7a5f597
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/definition/digester/CompatibilityDigesterDefinitionsReader.java
@@ -0,0 +1,264 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.compat.definition.digester;
+
+import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.Rule;
+import org.apache.tiles.Attribute;
+import org.apache.tiles.beans.SimpleMenuItem;
+import org.apache.tiles.definition.digester.DigesterDefinitionsReader;
+import org.xml.sax.Attributes;
+
+/**
+ * Digester reader that can read Tiles 1.1, 1.2, 1.3, 1.4 and 2.0 files.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class CompatibilityDigesterDefinitionsReader extends
+        DigesterDefinitionsReader {
+
+    /**
+     * Intercepts a &lt;item&gt; tag.
+     */
+    private static final String ADD_WILDCARD = "*/item";
+
+    /**
+     * Intercepts a &lt;bean&gt; tag.
+     */
+    private static final String BEAN_TAG = "*/bean";
+
+    /**
+     * The set of public identifiers, and corresponding resource names for the
+     * versions of the configuration file DTDs we know about. There <strong>MUST</strong>
+     * be an even number of Strings in this list!
+     *
+     * @since 2.1.0
+     */
+    protected String[] registrations;
+
+    /** {@inheritDoc} */
+    @Override
+    protected void initSyntax(Digester digester) {
+        super.initSyntax(digester);
+        initDigesterForComponentsDefinitionsSyntax(digester);
+        initDigesterForInstancesSyntax(digester);
+        initDigesterForTilesDefinitionsSyntax(digester);
+        initDigesterForBeans(digester);
+    }
+
+    /**
+     * Init digester for components syntax. This is an old set of rules, left
+     * for backward compatibility.
+     *
+     * @param digester Digester instance to use.
+     */
+    private void initDigesterForComponentsDefinitionsSyntax(Digester digester) {
+        // Common constants
+        String definitionTag = "component-definitions/definition";
+
+        String putTag = definitionTag + "/put";
+
+        String listTag = definitionTag + "/putList";
+
+        String addListElementTag = listTag + "/add";
+
+        // syntax rules
+        digester.addObjectCreate(definitionTag, DEFINITION_HANDLER_CLASS);
+        digester.addRule(definitionTag, new FillDefinitionRule());
+        digester.addSetNext(definitionTag, "addDefinition",
+                DEFINITION_HANDLER_CLASS);
+        // put / putAttribute rules
+        digester.addObjectCreate(putTag, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addRule(putTag, new FillAttributeRule());
+        digester.addRule(putTag, new PutAttributeRule());
+        // list rules
+        digester.addObjectCreate(listTag, LIST_HANDLER_CLASS);
+        digester.addSetProperties(listTag);
+        digester.addRule(listTag, new PutAttributeRule());
+        // list elements rules
+        // We use Attribute class to avoid rewriting a new class.
+        // Name part can't be used in listElement attribute.
+        digester.addObjectCreate(addListElementTag, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addRule(addListElementTag, new FillAttributeRule());
+        digester.addSetNext(addListElementTag, "add",
+                PUT_ATTRIBUTE_HANDLER_CLASS);
+    }
+
+    /**
+     * Init digester for Tiles syntax. Same as components, but with first
+     * element = tiles-definitions
+     *
+     * @param digester Digester instance to use.
+     */
+    private void initDigesterForTilesDefinitionsSyntax(Digester digester) {
+        // Common constants
+        String definitionTag = "tiles-definitions/definition";
+
+        String putTag = definitionTag + "/put";
+
+        // String LIST_TAG = DEFINITION_TAG + "/putList";
+        // List tag value
+        String listTag = "putList";
+        String definitionListTag = definitionTag + "/" + listTag;
+        // Tag value for adding an element in a list
+        String addListElementTag = "*/" + listTag + "/add";
+
+        // put / putAttribute rules
+        // Rules for a same pattern are called in order, but rule.end() are
+        // called
+        // in reverse order.
+        // SetNext and CallMethod use rule.end() method. So, placing SetNext in
+        // first position ensure it will be called last (sic).
+        digester.addObjectCreate(putTag, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addRule(putTag, new FillAttributeRule());
+        digester.addRule(putTag, new PutAttributeRule());
+        // Definition level list rules
+        // This is rules for lists nested in a definition
+        digester.addObjectCreate(definitionListTag, LIST_HANDLER_CLASS);
+        digester.addSetProperties(definitionListTag);
+        digester.addRule(definitionListTag, new PutAttributeRule());
+        // list elements rules
+        // We use Attribute class to avoid rewriting a new class.
+        // Name part can't be used in listElement attribute.
+        digester.addObjectCreate(addListElementTag, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addRule(addListElementTag, new FillAttributeRule());
+        digester.addSetNext(addListElementTag, "add",
+                PUT_ATTRIBUTE_HANDLER_CLASS);
+
+        // nested list elements rules
+        // Create a list handler, and add it to parent list
+        String nestedList = "*/" + listTag + "/" + listTag;
+        digester.addObjectCreate(nestedList, LIST_HANDLER_CLASS);
+        digester.addSetProperties(nestedList);
+        digester.addSetNext(nestedList, "add", PUT_ATTRIBUTE_HANDLER_CLASS);
+    }
+
+    /**
+     * Init digester in order to parse instances definition file syntax.
+     * Instances is an old name for "definition". This method is left for
+     * backwards compatibility.
+     *
+     * @param digester Digester instance to use.
+     */
+    private void initDigesterForInstancesSyntax(Digester digester) {
+        // Build a digester to process our configuration resource
+        String instanceTag = "component-instances/instance";
+
+        String putTag = instanceTag + "/put";
+        String putAttributeTag = instanceTag + "/putAttribute";
+
+        String listTag = instanceTag + "/putList";
+
+        String addListElementTag = listTag + "/add";
+
+        // component instance rules
+        digester.addObjectCreate(instanceTag, DEFINITION_HANDLER_CLASS);
+        digester.addRule(instanceTag, new FillDefinitionRule());
+        digester
+                .addSetNext(instanceTag, "addDefinition", DEFINITION_HANDLER_CLASS);
+        // put / putAttribute rules
+        digester.addObjectCreate(putAttributeTag, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addRule(putTag, new FillAttributeRule());
+        digester.addRule(putTag, new PutAttributeRule());
+        // put / putAttribute rules
+        digester.addObjectCreate(putTag, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addSetProperties(putTag);
+        digester.addRule(putTag, new PutAttributeRule());
+        // list rules
+        digester.addObjectCreate(listTag, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addSetProperties(listTag);
+        digester.addRule(listTag, new PutAttributeRule());
+        // list elements rules
+        // We use Attribute class to avoid rewriting a new class.
+        // Name part can't be used in listElement attribute.
+        digester.addObjectCreate(addListElementTag, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addRule(addListElementTag, new FillAttributeRule());
+        digester.addSetNext(addListElementTag, "add", PUT_ATTRIBUTE_HANDLER_CLASS);
+    }
+
+    /**
+     * Init digester for Tiles syntax with first element = tiles-definitions.
+     *
+     * @param digester Digester instance to use.
+     */
+    private void initDigesterForBeans(Digester digester) {
+
+        // item elements rules
+        // We use Attribute class to avoid rewriting a new class.
+        // Name part can't be used in listElement attribute.
+        //String ADD_WILDCARD = LIST_TAG + "/addItem";
+        // non String ADD_WILDCARD = LIST_TAG + "/addx*";
+        String menuItemDefaultClass = SimpleMenuItem.class.getName();
+        digester.addObjectCreate(ADD_WILDCARD, menuItemDefaultClass, "classtype");
+        digester.addSetProperties(ADD_WILDCARD);
+        digester.addRule(ADD_WILDCARD, new SetValueToAttributeRule());
+        digester.addSetNext(ADD_WILDCARD, "add", PUT_ATTRIBUTE_HANDLER_CLASS);
+
+        // bean elements rules
+        String beanDefaultClass = SimpleMenuItem.class.getName();
+        digester.addObjectCreate(BEAN_TAG, beanDefaultClass, "classtype");
+        digester.addSetProperties(BEAN_TAG);
+        digester.addRule(BEAN_TAG, new SetValueToAttributeRule());
+        digester.addSetNext(BEAN_TAG, "add", PUT_ATTRIBUTE_HANDLER_CLASS);
+
+        // Set properties to surrounding element
+        digester.addSetProperty(BEAN_TAG + "/set-property", "property", "value");
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected String[] getRegistrations() {
+        if (registrations == null) {
+            registrations = new String[] {
+                "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN",
+                "/org/apache/tiles/resources/tiles-config_3_0.dtd",
+                "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN",
+                "/org/apache/tiles/compat/resources/tiles-config_2_0.dtd",
+                "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN",
+                "/org/apache/tiles/compat/resources/tiles-config_2_1.dtd",
+                "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN",
+                "/org/apache/tiles/compat/resources/tiles-config_1_1.dtd",
+                "-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN",
+                "/org/apache/tiles/compat/resources/tiles-config_1_3.dtd",
+                "-//Apache Software Foundation//DTD Tiles Configuration 1.4//EN",
+                "/org/apache/tiles/compat/resources/tiles-config_1_4.dtd"};
+        }
+        return registrations;
+    }
+
+    /**
+     * Digester rule to manage assignment of an object as an attribute value.
+     *
+     * @since 3.0.0
+     */
+    public static class SetValueToAttributeRule extends Rule {
+
+        /** {@inheritDoc} */
+        @Override
+        public void begin(String namespace, String name, Attributes attributes) {
+            Object obj = digester.pop();
+            Attribute attribute = new Attribute(obj);
+            digester.push(attribute);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/definition/digester/package-info.java b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/definition/digester/package-info.java
new file mode 100644
index 0000000..a3826db
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/definition/digester/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Contains code to read old-format Tiles definition files.
+ */
+package org.apache.tiles.compat.definition.digester;
diff --git a/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/preparer/CompatibilityPreparerFactory.java b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/preparer/CompatibilityPreparerFactory.java
new file mode 100644
index 0000000..300aafa
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/preparer/CompatibilityPreparerFactory.java
@@ -0,0 +1,49 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.compat.preparer;
+
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.preparer.factory.BasicPreparerFactory;
+
+/**
+ * Factory used to instantiate preparers in a Struts 1 / Tiles 2 environment.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class CompatibilityPreparerFactory extends BasicPreparerFactory {
+
+    /** {@inheritDoc} */
+    @Override
+    protected ViewPreparer createPreparer(String name) {
+        ViewPreparer retValue;
+
+        if (name.startsWith("/")) {
+            retValue = new UrlPreparer(name);
+        } else {
+            retValue = super.createPreparer(name);
+        }
+
+        return retValue;
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/preparer/UrlPreparer.java b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/preparer/UrlPreparer.java
new file mode 100644
index 0000000..0082d2e
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/preparer/UrlPreparer.java
@@ -0,0 +1,72 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.compat.preparer;
+
+import java.io.IOException;
+
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.preparer.PreparerException;
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.DispatchRequest;
+
+/**
+ * Uses a URL that acts as a preparer. When
+ * {@link org.apache.tiles.preparer.factory.factory.ViewPreparer#execute(Request, AttributeContext)}
+ * is called, the URL is got, but its response is discarded.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class UrlPreparer implements ViewPreparer {
+
+    /**
+     * The URL to be used as a preparer.
+     */
+    private String url;
+
+    /**
+     * Constructor.
+     *
+     * @param url The URL to be used as a preparer.
+     */
+    public UrlPreparer(String url) {
+        this.url = url;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void execute(Request tilesContext,
+            AttributeContext attributeContext) {
+
+        if (tilesContext instanceof DispatchRequest) {
+            try {
+                ((DispatchRequest) tilesContext).include(url);
+            } catch (IOException e) {
+                throw new PreparerException("The inclusion of the URL " + url
+                        + " threw an I/O exception", e);
+            }
+        } else {
+            throw new PreparerException("This preparer is restricted to web environments");
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/preparer/package-info.java b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/preparer/package-info.java
new file mode 100644
index 0000000..e84df12
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/java/org/apache/tiles/compat/preparer/package-info.java
@@ -0,0 +1,28 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * <p>"View preparers" are objects that allows the "preparation" of a Tiles artifact
+ * (definition, template or attribute) before it is rendered.</p>
+ * <p>This package contains "compatibility" preparers, i.e. ViewPreparers that are
+ * compatibile with Tiles 1 "controllers".</p>
+ */
+package org.apache.tiles.compat.preparer;
+
diff --git a/TILES_3_0_X/tiles-compat/src/main/resources/LICENSE.txt b/TILES_3_0_X/tiles-compat/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/tiles-compat/src/main/resources/NOTICE.txt b/TILES_3_0_X/tiles-compat/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..1f13ff8
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/resources/NOTICE.txt
@@ -0,0 +1,6 @@
+   Apache Tiles
+   Copyright 1999-2009 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_1_1.dtd b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_1_1.dtd
new file mode 100644
index 0000000..0a4db13
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_1_1.dtd
@@ -0,0 +1,299 @@
+<!--
+    $Id$
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<!--
+     DTD for the Tile Definition File, Version 1.1
+
+     To support validation of your configuration file, include the following
+     DOCTYPE element at the beginning (after the "xml" declaration):
+
+     <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+       "http://struts.apache.org/dtds/tiles-config_1_1.dtd">
+
+     $Id$
+-->
+
+
+<!-- ========== Defined Types ============================================= -->
+
+
+<!-- A "Boolean" is the string representation of a boolean (true or false)
+     variable.
+-->
+<!ENTITY % Boolean "(true|false)">
+
+
+<!-- A "ContentType" is the content type of an attribute passed to a tile
+     component.
+-->
+<!ENTITY % ContentType "(string|page|template|definition)">
+
+<!-- A "ClassName" is the fully qualified name of a Java class that is
+     instantiated to provide the functionality of the enclosing element.
+-->
+<!ENTITY % ClassName "CDATA">
+
+<!-- A "RequestPath" is an module-relative URI path, beginning with a
+     slash, that identifies a mapped resource (such as a JSP page or a servlet)
+     within this web application.
+-->
+<!ENTITY % RequestPath "CDATA">
+
+<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
+     is a logical name used to reference the definition.
+-->
+<!ENTITY % DefinitionName "CDATA">
+
+<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
+     and also serves as the name of the corresponding scripting variable
+     and the name of the JSP attribute under which the bean is accessed.
+     Therefore, it must conform to the rules for a Java identifier.
+-->
+<!ENTITY % BeanName "CDATA">
+
+<!-- A "PropName" is the name of a JavaBeans property, and must begin with
+     a lower case letter and contain only characters that are legal in a
+     Java identifier.
+-->
+<!ENTITY % PropName "CDATA">
+
+<!-- A "Location" is a relative path, delimited by "/" characters, that
+     defines the location of a resource relative to the location of the
+     configuration file itself.
+-->
+<!ENTITY % Location "#PCDATA">
+
+
+
+<!-- ========== Top Level Elements ======================================== -->
+
+
+  <!-- deprecated: use tiles-definitions instead.-->
+<!ELEMENT component-definitions (definition+)>
+
+<!-- The "tiles-definitions" element is the root of the configuration file
+     hierarchy, and contains nested elements for all of the other
+     configuration settings.
+-->
+<!ELEMENT tiles-definitions (definition+)>
+
+<!-- The "definition" element describes a definition that can be inserted in a jsp
+     page. This definition is identified by its logical name. A definition allows
+     to define all the attributes that can be set in <insert> tag from a jsp page.
+
+     controllerClass The fully qualified Java class name of the controller
+                     subclass to call immediately before the tiles is inserted.
+                     Only one of controllerClass or controllerUrl should be
+                     specified.
+
+     controllerUrl   The context-relative path to the resource used as controller
+                     called immediately before the tiles is inserted.
+                     Only one of controllerClass or controllerUrl should be
+                     specified.
+
+     extends         Name of a definition that is used as ancestor of this definition.
+                     All attributes from the ancestor are available to the new
+                     definition. Any attribute inherited from the ancestor can
+                     be overloaded by providing a new value.
+
+     name            The unique identifier for this definition.
+
+     page            Same as path.
+
+     path            The context-relative path to the resource used as tiles to
+                     insert. This tiles will be inserted and a tiles context
+                     containing appropriate attributes will be available.
+
+     role            Security role name that is allowed access to this definition
+                     object. The definition is inserted only if the role name is
+                     allowed.
+
+     template        Same as path. For compatibility with the template tag library.
+-->
+<!ELEMENT definition (icon?, display-name?, description?, put*, putList*)>
+<!ATTLIST definition       id               ID               #IMPLIED>
+<!ATTLIST definition       controllerClass  %ClassName;      #IMPLIED>
+<!ATTLIST definition       controllerUrl    %RequestPath;    #IMPLIED>
+<!ATTLIST definition       extends          %DefinitionName; #IMPLIED>
+<!ATTLIST definition       name             %DefinitionName; #REQUIRED>
+<!ATTLIST definition       page             %RequestPath;    #IMPLIED>
+<!ATTLIST definition       path             %RequestPath;    #IMPLIED>
+<!ATTLIST definition       role             CDATA            #IMPLIED>
+<!ATTLIST definition       template         %RequestPath;    #IMPLIED>
+
+
+<!-- The "put" element describes an attribute of a definition. It allows to
+     specify the tiles attribute name and its value. The tiles value can be
+     specified as an xml attribute, or in the body of the <put> tag.
+
+     content         Same as value. For compatibility with the template tag library.
+
+     direct          Same as type="string". For compatibility with the template
+                     tag library.
+
+     name            The unique identifier for this put.
+
+     type            The type of the value. Can be: string, page, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+
+     value           The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ELEMENT put (#PCDATA)>
+<!ATTLIST put              id               ID              #IMPLIED>
+<!ATTLIST put              content          CDATA           #IMPLIED>
+<!ATTLIST put              direct           %Boolean;       #IMPLIED>
+<!ATTLIST put              name             CDATA           #REQUIRED>
+<!ATTLIST put              type             %ContentType;   #IMPLIED>
+<!ATTLIST put              value            CDATA           #IMPLIED>
+
+
+<!-- The "putList" element describes a list attribute of a definition. It allows to
+     specify an attribute that is a java List containing any kind of values. In
+     the config file, the list elements are specified by nested <add>, <item> or
+     <putList>.
+
+     name            The unique identifier for this put list.
+-->
+<!ELEMENT putList ( (add* | item* | bean* | putList*)+) >
+<!ATTLIST putList          id               ID              #IMPLIED>
+<!ATTLIST putList          name             CDATA           #REQUIRED>
+
+<!-- ========== Subordinate Elements ====================================== -->
+
+<!-- The "add" element describes an element of a list. It is similar to the
+     <put> element.
+
+     content         Same as value. For compatibility with the template tag library.
+
+     direct          Same as type="string". For compatibility with the template
+                     tag library.
+
+     type            The type of the value. Can be: string, page, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+
+     value           The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ELEMENT add (#PCDATA)>
+<!ATTLIST add              id               ID              #IMPLIED>
+<!ATTLIST add              content          CDATA           #IMPLIED>
+<!ATTLIST add              direct           %Boolean;       #IMPLIED>
+<!ATTLIST add              type             %ContentType;   #IMPLIED>
+<!ATTLIST add              value            CDATA           #IMPLIED>
+
+
+<!-- The "bean" element describes an element of a list. It create a bean of the
+     specified java classtype. This bean is initialized with appropriate nested
+     <set-property>.
+
+     classtype       The fully qualified classname for this bean.
+-->
+<!ELEMENT bean (set-property*)>
+<!ATTLIST bean             id               ID              #IMPLIED>
+<!ATTLIST bean             classtype        %ClassName;     #REQUIRED>
+
+<!-- The "set-property" element specifies the method name and initial value of
+     a bean property. When the object representing
+     the surrounding element is instantiated, the accessor for the indicated
+     property is called and passed the indicated value.
+
+     property        Name of the JavaBeans property whose setter method
+                     will be called.
+
+     value           String representation of the value to which this
+                     property will be set, after suitable type conversion
+-->
+<!ELEMENT set-property   EMPTY>
+<!ATTLIST set-property   id             ID              #IMPLIED>
+<!ATTLIST set-property   property       %PropName;      #REQUIRED>
+<!ATTLIST set-property   value          CDATA           #REQUIRED>
+
+
+<!-- The "item" element describes an element of a list. It create a bean added as
+     element to the list. Each bean can contain different properties: value, link,
+     icon, tooltip. These properties are to be interpreted by the jsp page using
+     them.
+     By default the bean is of type
+     "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
+     create a list of beans used as menu items.
+
+     classtype       The fully qualified classtype for this bean.
+                     If specified, the classtype must be a subclass of the interface
+                     "org.apache.struts.tiles.beans.MenuItem".
+
+     icon            The bean 'icon' property.
+
+     link            The bean 'link' property.
+
+     tooltip         The bean 'tooltip' property.
+
+     value           The bean 'value' property.
+-->
+<!ELEMENT item (#PCDATA)>
+<!ATTLIST item             id               ID              #IMPLIED>
+<!ATTLIST item             classtype        %ClassName;     #IMPLIED>
+<!ATTLIST item             icon             CDATA           #IMPLIED>
+<!ATTLIST item             link             CDATA           #REQUIRED>
+<!ATTLIST item             tooltip          CDATA           #IMPLIED>
+<!ATTLIST item             value            CDATA           #REQUIRED>
+
+
+<!-- ========== Info Elements ====================================== -->
+
+<!-- The "description" element contains descriptive (paragraph length) text
+     about the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT description    (#PCDATA)>
+<!ATTLIST description    id             ID              #IMPLIED>
+
+
+<!-- The "display-name" element contains a short (one line) description of
+     the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name   id             ID              #IMPLIED>
+
+
+<!-- The "icon" element contains a small-icon and large-icon element which
+     specify the location, relative to the Struts configuration file, for small
+     and large images used to represent the surrounding element in GUI tools.
+-->
+<!ELEMENT icon           (small-icon?, large-icon?)>
+<!ATTLIST icon           id             ID              #IMPLIED>
+
+
+<!-- The "large-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a large (32x32 pixel)
+     icon image.
+-->
+<!ELEMENT large-icon     (%Location;)>
+<!ATTLIST large-icon     id             ID              #IMPLIED>
+
+
+<!-- The "small-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a small (16x16 pixel)
+     icon image.
+-->
+<!ELEMENT small-icon     (%Location;)>
+<!ATTLIST small-icon     id             ID              #IMPLIED>
diff --git a/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_1_3.dtd b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_1_3.dtd
new file mode 100644
index 0000000..a532cb0
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_1_3.dtd
@@ -0,0 +1,299 @@
+<!--
+    $Id$
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<!--
+     DTD for the Tile Definition File, Version 1.3
+
+     To support validation of your configuration file, include the following
+     DOCTYPE element at the beginning (after the "xml" declaration):
+
+     <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"
+       "http://struts.apache.org/dtds/tiles-config_1_3.dtd">
+
+     $Id$
+-->
+
+
+<!-- ========== Defined Types ============================================= -->
+
+
+<!-- A "Boolean" is the string representation of a boolean (true or false)
+     variable.
+-->
+<!ENTITY % Boolean "(true|false)">
+
+
+<!-- A "ContentType" is the content type of an attribute passed to a tile
+     component.
+-->
+<!ENTITY % ContentType "(string|page|template|definition)">
+
+<!-- A "ClassName" is the fully qualified name of a Java class that is
+     instantiated to provide the functionality of the enclosing element.
+-->
+<!ENTITY % ClassName "CDATA">
+
+<!-- A "RequestPath" is an module-relative URI path, beginning with a
+     slash, that identifies a mapped resource (such as a JSP page or a servlet)
+     within this web application.
+-->
+<!ENTITY % RequestPath "CDATA">
+
+<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
+     is a logical name used to reference the definition.
+-->
+<!ENTITY % DefinitionName "CDATA">
+
+<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
+     and also serves as the name of the corresponding scripting variable
+     and the name of the JSP attribute under which the bean is accessed.
+     Therefore, it must conform to the rules for a Java identifier.
+-->
+<!ENTITY % BeanName "CDATA">
+
+<!-- A "PropName" is the name of a JavaBeans property, and must begin with
+     a lower case letter and contain only characters that are legal in a
+     Java identifier.
+-->
+<!ENTITY % PropName "CDATA">
+
+<!-- A "Location" is a relative path, delimited by "/" characters, that
+     defines the location of a resource relative to the location of the
+     configuration file itself.
+-->
+<!ENTITY % Location "#PCDATA">
+
+
+
+<!-- ========== Top Level Elements ======================================== -->
+
+
+  <!-- deprecated: use tiles-definitions instead.-->
+<!ELEMENT component-definitions (definition+)>
+
+<!-- The "tiles-definitions" element is the root of the configuration file
+     hierarchy, and contains nested elements for all of the other
+     configuration settings.
+-->
+<!ELEMENT tiles-definitions (definition+)>
+
+<!-- The "definition" element describes a definition that can be inserted in a jsp
+     page. This definition is identified by its logical name. A definition allows
+     to define all the attributes that can be set in <insert> tag from a jsp page.
+
+     controllerClass The fully qualified Java class name of the controller
+                     subclass to call immediately before the tiles is inserted.
+                     Only one of controllerClass or controllerUrl should be
+                     specified.
+
+     controllerUrl   The context-relative path to the resource used as controller
+                     called immediately before the tiles is inserted.
+                     Only one of controllerClass or controllerUrl should be
+                     specified.
+
+     extends         Name of a definition that is used as ancestor of this definition.
+                     All attributes from the ancestor are available to the new
+                     definition. Any attribute inherited from the ancestor can
+                     be overloaded by providing a new value.
+
+     name            The unique identifier for this definition.
+
+     page            Same as path.
+
+     path            The context-relative path to the resource used as tiles to
+                     insert. This tiles will be inserted and a tiles context
+                     containing appropriate attributes will be available.
+
+     role            Security role name that is allowed access to this definition
+                     object. The definition is inserted only if the role name is
+                     allowed.
+
+     template        Same as path. For compatibility with the template tag library.
+-->
+<!ELEMENT definition (icon?, display-name?, description?, put*, putList*)>
+<!ATTLIST definition       id               ID               #IMPLIED>
+<!ATTLIST definition       controllerClass  %ClassName;      #IMPLIED>
+<!ATTLIST definition       controllerUrl    %RequestPath;    #IMPLIED>
+<!ATTLIST definition       extends          %DefinitionName; #IMPLIED>
+<!ATTLIST definition       name             %DefinitionName; #REQUIRED>
+<!ATTLIST definition       page             %RequestPath;    #IMPLIED>
+<!ATTLIST definition       path             %RequestPath;    #IMPLIED>
+<!ATTLIST definition       role             CDATA            #IMPLIED>
+<!ATTLIST definition       template         %RequestPath;    #IMPLIED>
+
+
+<!-- The "put" element describes an attribute of a definition. It allows to
+     specify the tiles attribute name and its value. The tiles value can be
+     specified as an xml attribute, or in the body of the <put> tag.
+
+     content         Same as value. For compatibility with the template tag library.
+
+     direct          Same as type="string". For compatibility with the template
+                     tag library.
+
+     name            The unique identifier for this put.
+
+     type            The type of the value. Can be: string, page, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+
+     value           The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ELEMENT put (#PCDATA)>
+<!ATTLIST put              id               ID              #IMPLIED>
+<!ATTLIST put              content          CDATA           #IMPLIED>
+<!ATTLIST put              direct           %Boolean;       #IMPLIED>
+<!ATTLIST put              name             CDATA           #REQUIRED>
+<!ATTLIST put              type             %ContentType;   #IMPLIED>
+<!ATTLIST put              value            CDATA           #IMPLIED>
+
+
+<!-- The "putList" element describes a list attribute of a definition. It allows to
+     specify an attribute that is a java List containing any kind of values. In
+     the config file, the list elements are specified by nested <add>, <item> or
+     <putList>.
+
+     name            The unique identifier for this put list.
+-->
+<!ELEMENT putList ( (add* | item* | bean* | putList*)+) >
+<!ATTLIST putList          id               ID              #IMPLIED>
+<!ATTLIST putList          name             CDATA           #REQUIRED>
+
+<!-- ========== Subordinate Elements ====================================== -->
+
+<!-- The "add" element describes an element of a list. It is similar to the
+     <put> element.
+
+     content         Same as value. For compatibility with the template tag library.
+
+     direct          Same as type="string". For compatibility with the template
+                     tag library.
+
+     type            The type of the value. Can be: string, page, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+
+     value           The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ELEMENT add (#PCDATA)>
+<!ATTLIST add              id               ID              #IMPLIED>
+<!ATTLIST add              content          CDATA           #IMPLIED>
+<!ATTLIST add              direct           %Boolean;       #IMPLIED>
+<!ATTLIST add              type             %ContentType;   #IMPLIED>
+<!ATTLIST add              value            CDATA           #IMPLIED>
+
+
+<!-- The "bean" element describes an element of a list. It create a bean of the
+     specified java classtype. This bean is initialized with appropriate nested
+     <set-property>.
+
+     classtype       The fully qualified classname for this bean.
+-->
+<!ELEMENT bean (set-property*)>
+<!ATTLIST bean             id               ID              #IMPLIED>
+<!ATTLIST bean             classtype        %ClassName;     #REQUIRED>
+
+<!-- The "set-property" element specifies the method name and initial value of
+     a bean property. When the object representing
+     the surrounding element is instantiated, the accessor for the indicated
+     property is called and passed the indicated value.
+
+     property        Name of the JavaBeans property whose setter method
+                     will be called.
+
+     value           String representation of the value to which this
+                     property will be set, after suitable type conversion
+-->
+<!ELEMENT set-property   EMPTY>
+<!ATTLIST set-property   id             ID              #IMPLIED>
+<!ATTLIST set-property   property       %PropName;      #REQUIRED>
+<!ATTLIST set-property   value          CDATA           #REQUIRED>
+
+
+<!-- The "item" element describes an element of a list. It create a bean added as
+     element to the list. Each bean can contain different properties: value, link,
+     icon, tooltip. These properties are to be interpreted by the jsp page using
+     them.
+     By default the bean is of type
+     "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
+     create a list of beans used as menu items.
+
+     classtype       The fully qualified classtype for this bean.
+                     If specified, the classtype must be a subclass of the interface
+                     "org.apache.struts.tiles.beans.MenuItem".
+
+     icon            The bean 'icon' property.
+
+     link            The bean 'link' property.
+
+     tooltip         The bean 'tooltip' property.
+
+     value           The bean 'value' property.
+-->
+<!ELEMENT item (#PCDATA)>
+<!ATTLIST item             id               ID              #IMPLIED>
+<!ATTLIST item             classtype        %ClassName;     #IMPLIED>
+<!ATTLIST item             icon             CDATA           #IMPLIED>
+<!ATTLIST item             link             CDATA           #REQUIRED>
+<!ATTLIST item             tooltip          CDATA           #IMPLIED>
+<!ATTLIST item             value            CDATA           #REQUIRED>
+
+
+<!-- ========== Info Elements ====================================== -->
+
+<!-- The "description" element contains descriptive (paragraph length) text
+     about the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT description    (#PCDATA)>
+<!ATTLIST description    id             ID              #IMPLIED>
+
+
+<!-- The "display-name" element contains a short (one line) description of
+     the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name   id             ID              #IMPLIED>
+
+
+<!-- The "icon" element contains a small-icon and large-icon element which
+     specify the location, relative to the Struts configuration file, for small
+     and large images used to represent the surrounding element in GUI tools.
+-->
+<!ELEMENT icon           (small-icon?, large-icon?)>
+<!ATTLIST icon           id             ID              #IMPLIED>
+
+
+<!-- The "large-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a large (32x32 pixel)
+     icon image.
+-->
+<!ELEMENT large-icon     (%Location;)>
+<!ATTLIST large-icon     id             ID              #IMPLIED>
+
+
+<!-- The "small-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a small (16x16 pixel)
+     icon image.
+-->
+<!ELEMENT small-icon     (%Location;)>
+<!ATTLIST small-icon     id             ID              #IMPLIED>
diff --git a/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_1_4.dtd b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_1_4.dtd
new file mode 100644
index 0000000..85abdfb
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_1_4.dtd
@@ -0,0 +1,299 @@
+<!--
+    $Id$
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<!--
+     DTD for the Tile Definition File, Version 1.4
+
+     To support validation of your configuration file, include the following
+     DOCTYPE element at the beginning (after the "xml" declaration):
+
+     <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 1.4//EN"
+       "http://struts.apache.org/dtds/tiles-config_1_4.dtd">
+
+     $Id$
+-->
+
+
+<!-- ========== Defined Types ============================================= -->
+
+
+<!-- A "Boolean" is the string representation of a boolean (true or false)
+     variable.
+-->
+<!ENTITY % Boolean "(true|false)">
+
+
+<!-- A "ContentType" is the content type of an attribute passed to a tile
+     component.
+-->
+<!ENTITY % ContentType "(string|page|template|definition)">
+
+<!-- A "ClassName" is the fully qualified name of a Java class that is
+     instantiated to provide the functionality of the enclosing element.
+-->
+<!ENTITY % ClassName "CDATA">
+
+<!-- A "RequestPath" is an module-relative URI path, beginning with a
+     slash, that identifies a mapped resource (such as a JSP page or a servlet)
+     within this web application.
+-->
+<!ENTITY % RequestPath "CDATA">
+
+<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
+     is a logical name used to reference the definition.
+-->
+<!ENTITY % DefinitionName "CDATA">
+
+<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
+     and also serves as the name of the corresponding scripting variable
+     and the name of the JSP attribute under which the bean is accessed.
+     Therefore, it must conform to the rules for a Java identifier.
+-->
+<!ENTITY % BeanName "CDATA">
+
+<!-- A "PropName" is the name of a JavaBeans property, and must begin with
+     a lower case letter and contain only characters that are legal in a
+     Java identifier.
+-->
+<!ENTITY % PropName "CDATA">
+
+<!-- A "Location" is a relative path, delimited by "/" characters, that
+     defines the location of a resource relative to the location of the
+     configuration file itself.
+-->
+<!ENTITY % Location "#PCDATA">
+
+
+
+<!-- ========== Top Level Elements ======================================== -->
+
+
+  <!-- deprecated: use tiles-definitions instead.-->
+<!ELEMENT component-definitions (definition+)>
+
+<!-- The "tiles-definitions" element is the root of the configuration file
+     hierarchy, and contains nested elements for all of the other
+     configuration settings.
+-->
+<!ELEMENT tiles-definitions (definition+)>
+
+<!-- The "definition" element describes a definition that can be inserted in a jsp
+     page. This definition is identified by its logical name. A definition allows
+     to define all the attributes that can be set in <insert> tag from a jsp page.
+
+     controllerClass The fully qualified Java class name of the controller
+                     subclass to call immediately before the tiles is inserted.
+                     Only one of controllerClass or controllerUrl should be
+                     specified.
+
+     controllerUrl   The context-relative path to the resource used as controller
+                     called immediately before the tiles is inserted.
+                     Only one of controllerClass or controllerUrl should be
+                     specified.
+
+     extends         Name of a definition that is used as ancestor of this definition.
+                     All attributes from the ancestor are available to the new
+                     definition. Any attribute inherited from the ancestor can
+                     be overloaded by providing a new value.
+
+     name            The unique identifier for this definition.
+
+     page            Same as path.
+
+     path            The context-relative path to the resource used as tiles to
+                     insert. This tiles will be inserted and a tiles context
+                     containing appropriate attributes will be available.
+
+     role            Security role name that is allowed access to this definition
+                     object. The definition is inserted only if the role name is
+                     allowed.
+
+     template        Same as path. For compatibility with the template tag library.
+-->
+<!ELEMENT definition (icon?, display-name?, description?, put*, putList*)>
+<!ATTLIST definition       id               ID               #IMPLIED>
+<!ATTLIST definition       controllerClass  %ClassName;      #IMPLIED>
+<!ATTLIST definition       controllerUrl    %RequestPath;    #IMPLIED>
+<!ATTLIST definition       extends          %DefinitionName; #IMPLIED>
+<!ATTLIST definition       name             %DefinitionName; #REQUIRED>
+<!ATTLIST definition       page             %RequestPath;    #IMPLIED>
+<!ATTLIST definition       path             %RequestPath;    #IMPLIED>
+<!ATTLIST definition       role             CDATA            #IMPLIED>
+<!ATTLIST definition       template         %RequestPath;    #IMPLIED>
+
+
+<!-- The "put" element describes an attribute of a definition. It allows to
+     specify the tiles attribute name and its value. The tiles value can be
+     specified as an xml attribute, or in the body of the <put> tag.
+
+     content         Same as value. For compatibility with the template tag library.
+
+     direct          Same as type="string". For compatibility with the template
+                     tag library.
+
+     name            The unique identifier for this put.
+
+     type            The type of the value. Can be: string, page, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+
+     value           The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ELEMENT put (#PCDATA)>
+<!ATTLIST put              id               ID              #IMPLIED>
+<!ATTLIST put              content          CDATA           #IMPLIED>
+<!ATTLIST put              direct           %Boolean;       #IMPLIED>
+<!ATTLIST put              name             CDATA           #REQUIRED>
+<!ATTLIST put              type             %ContentType;   #IMPLIED>
+<!ATTLIST put              value            CDATA           #IMPLIED>
+
+
+<!-- The "putList" element describes a list attribute of a definition. It allows to
+     specify an attribute that is a java List containing any kind of values. In
+     the config file, the list elements are specified by nested <add>, <item> or
+     <putList>.
+
+     name            The unique identifier for this put list.
+-->
+<!ELEMENT putList ( (add* | item* | bean* | putList*)+) >
+<!ATTLIST putList          id               ID              #IMPLIED>
+<!ATTLIST putList          name             CDATA           #REQUIRED>
+
+<!-- ========== Subordinate Elements ====================================== -->
+
+<!-- The "add" element describes an element of a list. It is similar to the
+     <put> element.
+
+     content         Same as value. For compatibility with the template tag library.
+
+     direct          Same as type="string". For compatibility with the template
+                     tag library.
+
+     type            The type of the value. Can be: string, page, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+
+     value           The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ELEMENT add (#PCDATA)>
+<!ATTLIST add              id               ID              #IMPLIED>
+<!ATTLIST add              content          CDATA           #IMPLIED>
+<!ATTLIST add              direct           %Boolean;       #IMPLIED>
+<!ATTLIST add              type             %ContentType;   #IMPLIED>
+<!ATTLIST add              value            CDATA           #IMPLIED>
+
+
+<!-- The "bean" element describes an element of a list. It create a bean of the
+     specified java classtype. This bean is initialized with appropriate nested
+     <set-property>.
+
+     classtype       The fully qualified classname for this bean.
+-->
+<!ELEMENT bean (set-property*)>
+<!ATTLIST bean             id               ID              #IMPLIED>
+<!ATTLIST bean             classtype        %ClassName;     #REQUIRED>
+
+<!-- The "set-property" element specifies the method name and initial value of
+     a bean property. When the object representing
+     the surrounding element is instantiated, the accessor for the indicated
+     property is called and passed the indicated value.
+
+     property        Name of the JavaBeans property whose setter method
+                     will be called.
+
+     value           String representation of the value to which this
+                     property will be set, after suitable type conversion
+-->
+<!ELEMENT set-property   EMPTY>
+<!ATTLIST set-property   id             ID              #IMPLIED>
+<!ATTLIST set-property   property       %PropName;      #REQUIRED>
+<!ATTLIST set-property   value          CDATA           #REQUIRED>
+
+
+<!-- The "item" element describes an element of a list. It create a bean added as
+     element to the list. Each bean can contain different properties: value, link,
+     icon, tooltip. These properties are to be interpreted by the jsp page using
+     them.
+     By default the bean is of type
+     "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
+     create a list of beans used as menu items.
+
+     classtype       The fully qualified classtype for this bean.
+                     If specified, the classtype must be a subclass of the interface
+                     "org.apache.struts.tiles.beans.MenuItem".
+
+     icon            The bean 'icon' property.
+
+     link            The bean 'link' property.
+
+     tooltip         The bean 'tooltip' property.
+
+     value           The bean 'value' property.
+-->
+<!ELEMENT item (#PCDATA)>
+<!ATTLIST item             id               ID              #IMPLIED>
+<!ATTLIST item             classtype        %ClassName;     #IMPLIED>
+<!ATTLIST item             icon             CDATA           #IMPLIED>
+<!ATTLIST item             link             CDATA           #REQUIRED>
+<!ATTLIST item             tooltip          CDATA           #IMPLIED>
+<!ATTLIST item             value            CDATA           #REQUIRED>
+
+
+<!-- ========== Info Elements ====================================== -->
+
+<!-- The "description" element contains descriptive (paragraph length) text
+     about the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT description    (#PCDATA)>
+<!ATTLIST description    id             ID              #IMPLIED>
+
+
+<!-- The "display-name" element contains a short (one line) description of
+     the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name   id             ID              #IMPLIED>
+
+
+<!-- The "icon" element contains a small-icon and large-icon element which
+     specify the location, relative to the Struts configuration file, for small
+     and large images used to represent the surrounding element in GUI tools.
+-->
+<!ELEMENT icon           (small-icon?, large-icon?)>
+<!ATTLIST icon           id             ID              #IMPLIED>
+
+
+<!-- The "large-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a large (32x32 pixel)
+     icon image.
+-->
+<!ELEMENT large-icon     (%Location;)>
+<!ATTLIST large-icon     id             ID              #IMPLIED>
+
+
+<!-- The "small-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a small (16x16 pixel)
+     icon image.
+-->
+<!ELEMENT small-icon     (%Location;)>
+<!ATTLIST small-icon     id             ID              #IMPLIED>
diff --git a/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_2_0.dtd b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_2_0.dtd
new file mode 100644
index 0000000..21140af
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_2_0.dtd
@@ -0,0 +1,322 @@
+<!--
+%
+   $Id$
+
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+
+%
+
+@hidden $Id$
+@title DTD for the Tiles Definition File, Version 2.0
+@doctype tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"
+@root tiles-definitions
+-->
+
+
+<!-- ========== Defined Types ============================================= -->
+
+
+<!-- A "Boolean" is the string representation of a boolean (true or false)
+     variable.
+-->
+<!ENTITY % Boolean "(true|false)">
+
+
+<!-- A "ContentType" is the content type of an attribute passed to a template.
+-->
+<!ENTITY % ContentType "(string|template|definition|object)">
+
+<!-- A "ClassName" is the fully qualified name of a Java class that is
+     instantiated to provide the functionality of the enclosing element.
+-->
+<!ENTITY % ClassName "CDATA">
+
+<!-- A "RequestPath" is an module-relative URI path, beginning with a
+     slash, that identifies a mapped resource (such as a JSP page or a servlet)
+     within this web application.
+-->
+<!ENTITY % RequestPath "CDATA">
+
+<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
+     is a logical name used to reference the definition.
+-->
+<!ENTITY % DefinitionName "CDATA">
+
+<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
+     and also serves as the name of the corresponding scripting variable
+     and the name of the JSP attribute under which the bean is accessed.
+     Therefore, it must conform to the rules for a Java identifier.
+-->
+<!ENTITY % BeanName "CDATA">
+
+<!-- A "PropName" is the name of a JavaBeans property, and must begin with
+     a lower case letter and contain only characters that are legal in a
+     Java identifier.
+-->
+<!ENTITY % PropName "CDATA">
+
+<!-- A "Location" is a relative path, delimited by "/" characters, that
+     defines the location of a resource relative to the location of the
+     configuration file itself.
+-->
+<!ENTITY % Location "#PCDATA">
+
+
+
+<!-- ========== Top Level Elements ======================================== -->
+
+
+<!-- The "tiles-definitions" element is the root of the configuration file
+     hierarchy, and contains nested elements for all of the other
+     configuration settings.
+-->
+<!ELEMENT tiles-definitions (definition+)>
+
+<!-- The "definition" element describes a definition that can be inserted in a jsp
+     page. This definition is identified by its logical name. A definition allows
+     to define all the attributes that can be set in <insert> tag from a jsp page.
+-->
+<!ELEMENT definition (icon?, display-name?, description?, put-attribute*, put-list-attribute*)>
+<!ATTLIST definition       id               ID               #IMPLIED>
+<!--
+@attr preparer       The fully qualified Java class name of the preparer
+                     subclass to call immediately before the tiles is inserted.
+                     Only one of preparerClass or preparerUrl should be
+                     specified.
+-->
+<!ATTLIST definition       preparer         %ClassName;      #IMPLIED>
+<!--
+@attr extends        Name of a definition that is used as ancestor of this definition.
+                     All attributes from the ancestor are available to the new
+                     definition. Any attribute inherited from the ancestor can
+                     be overloaded by providing a new value.
+-->
+<!ATTLIST definition       extends          %DefinitionName; #IMPLIED>
+<!--
+@attr name           The unique identifier for this definition.
+-->
+<!ATTLIST definition       name             %DefinitionName; #REQUIRED>
+<!--
+@attr role           Security role name that is allowed access to this definition
+                     object. The definition is inserted only if the role name is
+                     allowed.
+-->
+<!ATTLIST definition       role             CDATA            #IMPLIED>
+<!--
+@attr template       The context-relative path to the resource used as tiles to
+                     insert. This tiles will be inserted and a tiles context
+                     containing appropriate attributes will be available.
+-->
+<!ATTLIST definition       template         %RequestPath;    #IMPLIED>
+
+
+<!-- The "put-attribute" element describes an attribute of a definition. It allows to
+     specify the tiles attribute name and its value. The tiles value can be
+     specified as an xml attribute, or in the body of the <put-attribute> tag.
+-->
+<!ELEMENT put-attribute (#PCDATA)>
+<!ATTLIST put-attribute     id               ID              #IMPLIED>
+<!--
+@attr name           The unique identifier for this put-attribute.
+-->
+<!ATTLIST put-attribute     name             CDATA           #REQUIRED>
+<!--
+@attr type           The type of the value. Can be: string, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+-->
+<!ATTLIST put-attribute     type             %ContentType;   #IMPLIED>
+<!--
+@attr value          The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ATTLIST put-attribute     value            CDATA           #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute is inserted only if the role name is
+                     allowed.
+-->
+<!ATTLIST put-attribute     role             CDATA            #IMPLIED>
+
+
+<!-- The "put-list-attribute" element describes a list attribute of a definition. It allows to
+     specify an attribute that is a java List containing any kind of values. In
+     the config file, the list elements are specified by nested <add-attribute>, <item> or
+     <add-list-attribute>.
+-->
+<!ELEMENT put-list-attribute ( (add-attribute* | item* | bean* | add-list-attribute*)+) >
+<!ATTLIST put-list-attribute id               ID              #IMPLIED>
+<!--
+@attr name           The unique identifier for this put attribute list.
+-->
+<!ATTLIST put-list-attribute name             CDATA           #REQUIRED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute is inserted only if the role name is
+                     allowed.
+-->
+<!ATTLIST put-list-attribute role             CDATA            #IMPLIED>
+
+<!-- ========== Subordinate Elements ====================================== -->
+
+
+<!-- The "add-attribute" element describes an element of a list. It is similar to the
+     <put> element.
+-->
+<!ELEMENT add-attribute (#PCDATA)>
+<!ATTLIST add-attribute              id               ID              #IMPLIED>
+<!--
+@attr type           The type of the value. Can be: string, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+-->
+<!ATTLIST add-attribute              type             %ContentType;   #IMPLIED>
+<!--
+@attr value          The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ATTLIST add-attribute              value            CDATA           #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute will be added to the parent list
+                     anyway. It is delegated to the user of this attribute to
+                     use it or not depending on the role of the user.
+-->
+<!ATTLIST add-attribute              role             CDATA            #IMPLIED>
+
+<!-- The "add-list-attribute" element describes a list attribute subordinate to another
+     list attribute. It allows to specify an attribute value that is a java List
+     containing any kind of values. In the config file, the list elements are specified
+     by nested <add-attribute>, <item> or
+     <add-list-attribute>.
+-->
+<!ELEMENT add-list-attribute ( (add-attribute* | item* | bean* | add-list-attribute*)+) >
+<!ATTLIST add-list-attribute id               ID              #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute will be added to the parent list
+                     anyway. It is delegated to the user of this attribute to
+                     use it or not depending on the role of the user.
+-->
+<!ATTLIST add-list-attribute role             CDATA            #IMPLIED>
+
+
+<!-- The "bean" element describes an element of a list. It create a bean of the
+     specified java classtype. This bean is initialized with appropriate nested
+     <set-property>.
+-->
+<!ELEMENT bean (set-property*)>
+<!ATTLIST bean             id               ID              #IMPLIED>
+<!--
+@attr classtype      The fully qualified classname for this bean.
+-->
+<!ATTLIST bean             classtype        %ClassName;     #REQUIRED>
+
+<!-- The "set-property" element specifies the method name and initial value of
+     a bean property. When the object representing
+     the surrounding element is instantiated, the accessor for the indicated
+     property is called and passed the indicated value.
+-->
+<!ELEMENT set-property   EMPTY>
+<!ATTLIST set-property   id             ID              #IMPLIED>
+<!--
+@attr property       Name of the JavaBeans property whose setter method
+                     will be called.
+-->
+<!ATTLIST set-property   property       %PropName;      #REQUIRED>
+<!--
+@attr value          String representation of the value to which this
+                     property will be set, after suitable type conversion
+-->
+<!ATTLIST set-property   value          CDATA           #REQUIRED>
+
+
+<!-- The "item" element describes an element of a list. It create a bean added as
+     element to the list. Each bean can contain different properties: value, link,
+     icon, tooltip. These properties are to be interpreted by the jsp page using
+     them.
+     By default the bean is of type
+     "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
+     create a list of beans used as menu items.
+-->
+<!ELEMENT item (#PCDATA)>
+<!ATTLIST item             id               ID              #IMPLIED>
+<!--
+@attr classtype      The fully qualified classtype for this bean.
+                     If specified, the classtype must be a subclass of the interface
+                     "org.apache.struts.tiles.beans.MenuItem".
+-->
+<!ATTLIST item             classtype        %ClassName;     #IMPLIED>
+<!--
+@attr icon           The bean 'icon' property.
+-->
+<!ATTLIST item             icon             CDATA           #IMPLIED>
+<!--
+@attr link           The bean 'link' property.
+-->
+<!ATTLIST item             link             CDATA           #REQUIRED>
+<!--
+@attr tooltip        The bean 'tooltip' property.
+-->
+<!ATTLIST item             tooltip          CDATA           #IMPLIED>
+<!--
+@attr value          The bean 'value' property.
+-->
+<!ATTLIST item             value            CDATA           #REQUIRED>
+
+
+<!-- ========== Info Elements ====================================== -->
+
+<!-- The "description" element contains descriptive (paragraph length) text
+     about the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT description    (#PCDATA)>
+<!ATTLIST description    id             ID              #IMPLIED>
+
+
+<!-- The "display-name" element contains a short (one line) description of
+     the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name   id             ID              #IMPLIED>
+
+
+<!-- The "icon" element contains a small-icon and large-icon element which
+     specify the location, relative to the Struts configuration file, for small
+     and large images used to represent the surrounding element in GUI tools.
+-->
+<!ELEMENT icon           (small-icon?, large-icon?)>
+<!ATTLIST icon           id             ID              #IMPLIED>
+
+
+<!-- The "large-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a large (32x32 pixel)
+     icon image.
+-->
+<!ELEMENT large-icon     (%Location;)>
+<!ATTLIST large-icon     id             ID              #IMPLIED>
+
+
+<!-- The "small-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a small (16x16 pixel)
+     icon image.
+-->
+<!ELEMENT small-icon     (%Location;)>
+<!ATTLIST small-icon     id             ID              #IMPLIED>
diff --git a/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_2_1.dtd b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_2_1.dtd
new file mode 100644
index 0000000..689b6e7
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/main/resources/org/apache/tiles/compat/resources/tiles-config_2_1.dtd
@@ -0,0 +1,364 @@
+<!--
+%
+   $Id$
+
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+
+%
+
+@hidden $Id$
+@title DTD for the Tiles Definition File, Version 2.1
+@doctype tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd"
+@root tiles-definitions
+-->
+
+
+<!-- ========== Defined Types ============================================= -->
+
+
+<!-- A "Boolean" is the string representation of a boolean (true or false)
+     variable.
+-->
+<!ENTITY % Boolean "(true|false)">
+
+
+<!-- A "ContentType" is the content type of an attribute passed to a template.
+-->
+<!ENTITY % ContentType "CDATA">
+
+<!-- A "ClassName" is the fully qualified name of a Java class that is
+     instantiated to provide the functionality of the enclosing element.
+-->
+<!ENTITY % ClassName "CDATA">
+
+<!-- A "RequestPath" is an module-relative URI path, beginning with a
+     slash, that identifies a mapped resource (such as a JSP page or a servlet)
+     within this web application.
+-->
+<!ENTITY % RequestPath "CDATA">
+
+<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
+     is a logical name used to reference the definition.
+-->
+<!ENTITY % DefinitionName "CDATA">
+
+<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
+     and also serves as the name of the corresponding scripting variable
+     and the name of the JSP attribute under which the bean is accessed.
+     Therefore, it must conform to the rules for a Java identifier.
+-->
+<!ENTITY % BeanName "CDATA">
+
+<!-- A "PropName" is the name of a JavaBeans property, and must begin with
+     a lower case letter and contain only characters that are legal in a
+     Java identifier.
+-->
+<!ENTITY % PropName "CDATA">
+
+<!-- A "Location" is a relative path, delimited by "/" characters, that
+     defines the location of a resource relative to the location of the
+     configuration file itself.
+-->
+<!ENTITY % Location "#PCDATA">
+
+
+
+<!-- ========== Top Level Elements ======================================== -->
+
+
+<!-- The "tiles-definitions" element is the root of the configuration file
+     hierarchy, and contains nested elements for all of the other
+     configuration settings.
+-->
+<!ELEMENT tiles-definitions (definition+)>
+
+<!-- The "definition" element describes a definition that can be inserted in a jsp
+     page. This definition is identified by its logical name. A definition allows
+     to define all the attributes that can be set in <insert> tag from a jsp page.
+-->
+<!ELEMENT definition (icon?, display-name?, description?, put-attribute*, put-list-attribute*)>
+<!ATTLIST definition       id               ID               #IMPLIED>
+<!--
+@attr preparer       The fully qualified Java class name of the preparer
+                     subclass to call immediately before the tiles is inserted.
+                     Only one of preparerClass or preparerUrl should be
+                     specified.
+-->
+<!ATTLIST definition       preparer         %ClassName;      #IMPLIED>
+<!--
+@attr extends        Name of a definition that is used as ancestor of this definition.
+                     All attributes from the ancestor are available to the new
+                     definition. Any attribute inherited from the ancestor can
+                     be overloaded by providing a new value.
+-->
+<!ATTLIST definition       extends          %DefinitionName; #IMPLIED>
+<!--
+@attr name           The unique identifier for this definition. Required when
+                     it is a root definition, while it is implied in nested
+                     definitions.
+-->
+<!ATTLIST definition       name             %DefinitionName; #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this definition
+                     object. The definition is inserted only if the role name is
+                     allowed.
+-->
+<!ATTLIST definition       role             CDATA            #IMPLIED>
+<!--
+@attr template       The context-relative path to the resource used as tiles to
+                     insert. This tiles will be inserted and a tiles context
+                     containing appropriate attributes will be available.
+-->
+<!ATTLIST definition       template         %RequestPath;    #IMPLIED>
+<!--
+@attr templateExpression The expression that will evaluate to a template for this definition.
+               This attribute will be ignored if template is specified.
+
+-->
+<!ATTLIST definition       templateExpression       CDATA    #IMPLIED>
+<!--
+@attr templateType   The type of the template attribute. Can be: string,
+           template or definition.
+                     By default, the type is "template". If a type is
+                     associated, the desidered renderer will be invoked.
+-->
+<!ATTLIST definition       templateType             %ContentType;   #IMPLIED>
+
+<!-- The "put-attribute" element describes an attribute of a definition. It allows to
+     specify the tiles attribute name and its value. The tiles value can be
+     specified as an xml attribute, or in the body of the <put-attribute> tag.
+-->
+<!ELEMENT put-attribute ( (definition*) )>
+<!ATTLIST put-attribute     id               ID              #IMPLIED>
+<!--
+@attr name           The unique identifier for this put-attribute.
+-->
+<!ATTLIST put-attribute     name             CDATA           #REQUIRED>
+<!--
+@attr type           The type of the value. Can be: string, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+-->
+<!ATTLIST put-attribute     type             %ContentType;   #IMPLIED>
+<!--
+@attr value          The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ATTLIST put-attribute     value            CDATA           #IMPLIED>
+<!--
+@attr expression     The expression associated to this tiles attribute. This
+           attribute will be ignored if value is specified.
+
+-->
+<!ATTLIST put-attribute     expression       CDATA           #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute is inserted only if the role name is
+                     allowed.
+-->
+<!ATTLIST put-attribute     role             CDATA            #IMPLIED>
+<!--
+@attr cascade        If true, the attribute will be cascaded to all inner
+                     definitions. By default, cascade is false.
+-->
+<!ATTLIST put-attribute     cascade          %Boolean;    #IMPLIED>
+
+
+<!-- The "put-list-attribute" element describes a list attribute of a definition. It allows to
+     specify an attribute that is a java List containing any kind of values. In
+     the config file, the list elements are specified by nested <add-attribute>, <item> or
+     <add-list-attribute>.
+-->
+<!ELEMENT put-list-attribute ( (add-attribute* | item* | bean* | add-list-attribute*)+) >
+<!ATTLIST put-list-attribute id               ID              #IMPLIED>
+<!--
+@attr name           The unique identifier for this put attribute list.
+-->
+<!ATTLIST put-list-attribute name             CDATA           #REQUIRED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute is inserted only if the role name is
+                     allowed.
+-->
+<!ATTLIST put-list-attribute role             CDATA            #IMPLIED>
+<!--
+@attr inherit        If true, the attribute will put the elements of the attribute
+                     with the same name of the parent definition before the ones
+                     specified here. By default, it is 'false'.
+-->
+<!ATTLIST put-list-attribute inherit          %Boolean;        #IMPLIED>
+<!--
+@attr cascade        If true, the attribute will be cascaded to all inner
+                     definitions. By default, cascade is false.
+-->
+<!ATTLIST put-list-attribute cascade          %Boolean;        #IMPLIED>
+
+<!-- ========== Subordinate Elements ====================================== -->
+
+
+<!-- The "add-attribute" element describes an element of a list. It is similar to the
+     <put> element.
+-->
+<!ELEMENT add-attribute ( (definition*) )>
+<!ATTLIST add-attribute              id               ID              #IMPLIED>
+<!--
+@attr type           The type of the value. Can be: string, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+-->
+<!ATTLIST add-attribute              type             %ContentType;   #IMPLIED>
+<!--
+@attr value          The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ATTLIST add-attribute              value            CDATA           #IMPLIED>
+<!--
+@attr expression     The expression associated to this tiles attribute. This
+           attribute will be ignored if value is specified.
+
+-->
+<!ATTLIST add-attribute              expression       CDATA           #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute will be added to the parent list
+                     anyway. It is delegated to the user of this attribute to
+                     use it or not depending on the role of the user.
+-->
+<!ATTLIST add-attribute              role             CDATA            #IMPLIED>
+
+<!-- The "add-list-attribute" element describes a list attribute subordinate to another
+     list attribute. It allows to specify an attribute value that is a java List
+     containing any kind of values. In the config file, the list elements are specified
+     by nested <add-attribute>, <item> or
+     <add-list-attribute>.
+-->
+<!ELEMENT add-list-attribute ( (add-attribute* | item* | bean* | add-list-attribute*)+) >
+<!ATTLIST add-list-attribute id               ID              #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute will be added to the parent list
+                     anyway. It is delegated to the user of this attribute to
+                     use it or not depending on the role of the user.
+-->
+<!ATTLIST add-list-attribute role             CDATA            #IMPLIED>
+
+
+<!-- The "bean" element describes an element of a list. It create a bean of the
+     specified java classtype. This bean is initialized with appropriate nested
+     <set-property>.
+-->
+<!ELEMENT bean (set-property*)>
+<!ATTLIST bean             id               ID              #IMPLIED>
+<!--
+@attr classtype      The fully qualified classname for this bean.
+-->
+<!ATTLIST bean             classtype        %ClassName;     #REQUIRED>
+
+<!-- The "set-property" element specifies the method name and initial value of
+     a bean property. When the object representing
+     the surrounding element is instantiated, the accessor for the indicated
+     property is called and passed the indicated value.
+-->
+<!ELEMENT set-property   EMPTY>
+<!ATTLIST set-property   id             ID              #IMPLIED>
+<!--
+@attr property       Name of the JavaBeans property whose setter method
+                     will be called.
+-->
+<!ATTLIST set-property   property       %PropName;      #REQUIRED>
+<!--
+@attr value          String representation of the value to which this
+                     property will be set, after suitable type conversion
+-->
+<!ATTLIST set-property   value          CDATA           #REQUIRED>
+
+
+<!-- The "item" element describes an element of a list. It create a bean added as
+     element to the list. Each bean can contain different properties: value, link,
+     icon, tooltip. These properties are to be interpreted by the jsp page using
+     them.
+     By default the bean is of type
+     "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
+     create a list of beans used as menu items.
+-->
+<!ELEMENT item (#PCDATA)>
+<!ATTLIST item             id               ID              #IMPLIED>
+<!--
+@attr classtype      The fully qualified classtype for this bean.
+                     If specified, the classtype must be a subclass of the interface
+                     "org.apache.struts.tiles.beans.MenuItem".
+-->
+<!ATTLIST item             classtype        %ClassName;     #IMPLIED>
+<!--
+@attr icon           The bean 'icon' property.
+-->
+<!ATTLIST item             icon             CDATA           #IMPLIED>
+<!--
+@attr link           The bean 'link' property.
+-->
+<!ATTLIST item             link             CDATA           #REQUIRED>
+<!--
+@attr tooltip        The bean 'tooltip' property.
+-->
+<!ATTLIST item             tooltip          CDATA           #IMPLIED>
+<!--
+@attr value          The bean 'value' property.
+-->
+<!ATTLIST item             value            CDATA           #REQUIRED>
+
+
+<!-- ========== Info Elements ====================================== -->
+
+<!-- The "description" element contains descriptive (paragraph length) text
+     about the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT description    (#PCDATA)>
+<!ATTLIST description    id             ID              #IMPLIED>
+
+
+<!-- The "display-name" element contains a short (one line) description of
+     the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name   id             ID              #IMPLIED>
+
+
+<!-- The "icon" element contains a small-icon and large-icon element which
+     specify the location, relative to the Struts configuration file, for small
+     and large images used to represent the surrounding element in GUI tools.
+-->
+<!ELEMENT icon           (small-icon?, large-icon?)>
+<!ATTLIST icon           id             ID              #IMPLIED>
+
+
+<!-- The "large-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a large (32x32 pixel)
+     icon image.
+-->
+<!ELEMENT large-icon     (%Location;)>
+<!ATTLIST large-icon     id             ID              #IMPLIED>
+
+
+<!-- The "small-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a small (16x16 pixel)
+     icon image.
+-->
+<!ELEMENT small-icon     (%Location;)>
+<!ATTLIST small-icon     id             ID              #IMPLIED>
diff --git a/TILES_3_0_X/tiles-compat/src/site/site.xml b/TILES_3_0_X/tiles-compat/src/site/site.xml
new file mode 100644
index 0000000..e2c7a3d
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Compatibility Library">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/beans/SimpleMenuItemTest.java b/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/beans/SimpleMenuItemTest.java
new file mode 100644
index 0000000..fd4b6c5
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/beans/SimpleMenuItemTest.java
@@ -0,0 +1,98 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.beans;
+
+import static org.junit.Assert.*;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link SimpleMenuItem}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SimpleMenuItemTest {
+
+    /**
+     * The item to test.
+     */
+    private SimpleMenuItem item;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        item = new SimpleMenuItem();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.beans.SimpleMenuItem#setValue(java.lang.String)}.
+     */
+    @Test
+    public void testSetValue() {
+        item.setValue("value");
+        assertEquals("value", item.getValue());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.beans.SimpleMenuItem#setLink(java.lang.String)}.
+     */
+    @Test
+    public void testSetLink() {
+        item.setLink("value");
+        assertEquals("value", item.getLink());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.beans.SimpleMenuItem#setIcon(java.lang.String)}.
+     */
+    @Test
+    public void testSetIcon() {
+        item.setIcon("value");
+        assertEquals("value", item.getIcon());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.beans.SimpleMenuItem#setTooltip(java.lang.String)}.
+     */
+    @Test
+    public void testSetTooltip() {
+        item.setTooltip("value");
+        assertEquals("value", item.getTooltip());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.beans.SimpleMenuItem#toString()}.
+     */
+    @Test
+    public void testToString() {
+        item.setIcon("icon");
+        item.setLink("link");
+        item.setTooltip("tooltip");
+        item.setValue("value");
+        assertEquals(
+                "SimpleMenuItem[value=value, link=link, tooltip=tooltip, icon=icon, ]",
+                item.toString());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/compat/definition/digester/TestCompatibilityDigesterDefinitionsReader.java b/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/compat/definition/digester/TestCompatibilityDigesterDefinitionsReader.java
new file mode 100644
index 0000000..958a894
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/compat/definition/digester/TestCompatibilityDigesterDefinitionsReader.java
@@ -0,0 +1,176 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.compat.definition.digester;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.DefinitionsFactoryException;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Tests the <code>org.apache.tiles.definition.digester.DigesterDefinitionsReader</code> class.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestCompatibilityDigesterDefinitionsReader extends TestCase {
+
+    /**
+     * The logging object.
+     */
+    private final Logger log = LoggerFactory
+            .getLogger(TestCompatibilityDigesterDefinitionsReader.class);
+
+    /**
+     * The definitions reader.
+     */
+    private DefinitionsReader reader;
+
+    /**
+     * Creates a new instance of TestDigesterDefinitionsReader.
+     *
+     * @param name The name of the test.
+     */
+    public TestCompatibilityDigesterDefinitionsReader(String name) {
+        super(name);
+    }
+
+    /**
+     * @return a test suite (<code>TestSuite</code>) that includes all methods
+     *         starting with "test"
+     */
+    public static Test suite() {
+        return new TestSuite(TestCompatibilityDigesterDefinitionsReader.class);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        reader = new CompatibilityDigesterDefinitionsReader();
+    }
+
+    /**
+     * Tests the read method to read Tiles 1.1 files.
+     *
+     * @throws DefinitionsFactoryException If the definitions factory fails.
+     * @throws IOException If an I/O exception happens.
+     */
+    public void testReadOldFormat() throws IOException {
+        URL configFile = this.getClass().getClassLoader().getResource(
+                "org/apache/tiles/config/tiles-defs-1.1.xml");
+        assertNotNull("Config file not found", configFile);
+
+        InputStream source = configFile.openStream();
+        Map<String, Definition> definitions = reader.read(source);
+
+        assertNotNull("Definitions not returned.", definitions);
+        assertNotNull("Couldn't find doc.mainLayout tile.",
+                definitions.get("doc.mainLayout"));
+        assertNotNull("Couldn't Find title attribute.", definitions.get(
+                "doc.mainLayout").getAttribute("title").getValue());
+        assertEquals("Incorrect Find title attribute.",
+                "Tiles Library Documentation", definitions.get(
+                        "doc.mainLayout").getAttribute("title").getValue());
+    }
+
+    /**
+     * Tests the read method to read Tiles 2.0 files.
+     *
+     * @throws IOException If an I/O exception happens.
+     */
+    public void testReadNewFormat() throws IOException {
+        URL configFile = this.getClass().getClassLoader().getResource(
+                "org/apache/tiles/config/tiles-defs-2.0.xml");
+        assertNotNull("Config file not found", configFile);
+
+        InputStream source = configFile.openStream();
+        Map<String, Definition> definitions = reader.read(source);
+
+        assertNotNull("Definitions not returned.", definitions);
+        assertNotNull("Couldn't find doc.mainLayout tile.",
+                definitions.get("doc.mainLayout"));
+        assertNotNull("Couldn't Find title attribute.", definitions.get(
+                "doc.mainLayout").getAttribute("title").getValue());
+        assertEquals("Incorrect Find title attribute.",
+                "Tiles Library Documentation", definitions.get(
+                        "doc.mainLayout").getAttribute("title").getValue());
+    }
+
+    /**
+     * Tests the read method under normal conditions for the new features in 2.1
+     * version of the DTD.
+     */
+    public void testRead21Version() {
+        try {
+            URL configFile = this.getClass().getClassLoader().getResource(
+                    "org/apache/tiles/config/tiles-defs-2.1.xml");
+            assertNotNull("Config file not found", configFile);
+
+            InputStream source = configFile.openStream();
+            Map<String, Definition> definitions = reader.read(source);
+
+            assertNotNull("Definitions not returned.", definitions);
+            Definition def = definitions.get("doc.cascaded.test");
+
+            assertNotNull("Couldn't find doc.role.test tile.", def);
+            Attribute attribute = def.getLocalAttribute("title");
+            assertNotNull("Couldn't Find title local attribute.", attribute);
+            attribute = def.getCascadedAttribute("title2");
+            assertNotNull("Couldn't Find title2 cascaded attribute.", attribute);
+            attribute = def.getLocalAttribute("items1");
+            assertNotNull("Couldn't Find items1 local attribute.", attribute);
+            attribute = def.getCascadedAttribute("items2");
+            assertNotNull("Couldn't Find items2 cascaded attribute.", attribute);
+        } catch (Exception e) {
+            fail("Exception reading configuration." + e);
+        }
+    }
+
+    /**
+     * Tests read with bad input source.
+     */
+    public void testBadSource() {
+        try {
+            // Read definitions.
+            reader.read(new String("Bad Input"));
+            fail("Should've thrown an exception.");
+        } catch (DefinitionsFactoryException e) {
+            // correct.
+            if (log.isDebugEnabled()) {
+                log.debug("Exception caught, it is OK", e);
+            }
+        } catch (Exception e) {
+            fail("Exception reading configuration." + e);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/compat/preparer/CompatibilityPreparerFactoryTest.java b/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/compat/preparer/CompatibilityPreparerFactoryTest.java
new file mode 100644
index 0000000..03265d1
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/compat/preparer/CompatibilityPreparerFactoryTest.java
@@ -0,0 +1,72 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.compat.preparer;
+
+import junit.framework.TestCase;
+
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.request.Request;
+
+/**
+ * Tests {@link CompatibilityPreparerFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CompatibilityPreparerFactoryTest extends TestCase {
+
+    /**
+     * The factory to test.
+     */
+    private CompatibilityPreparerFactory factory;
+
+    /** {@inheritDoc} */
+    @Override
+    protected void setUp() {
+        factory = new CompatibilityPreparerFactory();
+    }
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.compat.preparer.CompatibilityPreparerFactory#createPreparer(java.lang.String)}
+     * .
+     */
+    public void testCreatePreparer() {
+        ViewPreparer preparer = factory.createPreparer("/my/url.do");
+        assertTrue("The preparer is not an UrlPreparer",
+                preparer instanceof UrlPreparer);
+        preparer = factory.createPreparer(MockViewPreparer.class.getName());
+        assertTrue("The preparer is not an class ViewPreparer",
+                preparer instanceof MockViewPreparer);
+    }
+
+    /**
+     * Mock view preparer to test preparer instantiation.
+     */
+    public static final class MockViewPreparer implements ViewPreparer {
+        /** {@inheritDoc} */
+        public void execute(Request tilesContext,
+                AttributeContext attributeContext) {
+            // Nothing here.
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/compat/preparer/UrlPreparerTest.java b/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/compat/preparer/UrlPreparerTest.java
new file mode 100644
index 0000000..2c8e8bb
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/test/java/org/apache/tiles/compat/preparer/UrlPreparerTest.java
@@ -0,0 +1,92 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.compat.preparer;
+
+import static org.easymock.EasyMock.*;
+
+import java.io.IOException;
+
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.preparer.PreparerException;
+import org.apache.tiles.request.DispatchRequest;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link UrlPreparer}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class UrlPreparerTest {
+
+    /**
+     * The preparer to test.
+     */
+    private UrlPreparer preparer;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        preparer = new UrlPreparer("/my/url.do");
+    }
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.compat.preparer.UrlPreparer#execute(
+     * org.apache.tiles.request.Request, org.apache.tiles.AttributeContext)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecute() throws IOException {
+        DispatchRequest requestContext = createMock(DispatchRequest.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        requestContext.include("/my/url.do");
+        replay(requestContext, attributeContext);
+        preparer.execute(requestContext, attributeContext);
+        verify(requestContext, attributeContext);
+    }
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.compat.preparer.UrlPreparer#execute(
+     * org.apache.tiles.request.Request, org.apache.tiles.AttributeContext)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test(expected = PreparerException.class)
+    public void testExecuteException() throws IOException {
+        DispatchRequest requestContext = createMock(DispatchRequest.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        requestContext.include("/my/url.do");
+        expectLastCall().andThrow(new IOException());
+
+        replay(requestContext, attributeContext);
+        try {
+            preparer.execute(requestContext, attributeContext);
+        } finally {
+            verify(requestContext, attributeContext);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-compat/src/test/resources/org/apache/tiles/config/tiles-defs-1.1.xml b/TILES_3_0_X/tiles-compat/src/test/resources/org/apache/tiles/config/tiles-defs-1.1.xml
new file mode 100644
index 0000000..96a0499
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/test/resources/org/apache/tiles/config/tiles-defs-1.1.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+       "http://struts.apache.org/dtds/tiles-config_1_1.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="doc.mainLayout" template="/layout/classicLayout.jsp">
+    <put name="title"  value="Tiles Library Documentation" />
+    <put name="header" value="/common/header.jsp" />
+    <put name="menu"   value="doc.menu.main" />
+    <put name="footer" value="/common/footer.jsp" />
+    <put name="body"   value="doc.portal.body" />
+      <put name="bean"   value="This is an object" type="string" />
+  </definition>
+
+  <!-- =======================================================  -->
+  <!-- Main page body definitions  									-->
+  <!-- =======================================================  -->
+
+  <definition name="doc.portal.body" template="/layout/columnsLayout.jsp">
+    <put name="numCols" value="2" />
+    <putList name="list0" >
+      <add value="/doc/portal/welcome.jsp" />
+      <add value="/doc/portal/features.jsp" />
+      <!--<add value="/doc/portal/todo.jsp" /> -->
+      <add value="/doc/portal/documentation.jsp" />
+    </putList>
+    <putList name="list1" >
+      <add value="/doc/portal/news.jsp" />
+      <add value="/doc/portal/download.jsp" />
+      <add value="/doc/portal/tilesCompsTemplates.jsp" />
+      <add value="/doc/portal/strutsIntegration.jsp" />
+      <add value="/doc/portal/comments.jsp" />
+      <add value="/doc/portal/revisions.jsp" />
+    </putList>
+  </definition>
+
+  <!-- =======================================================  -->
+  <!-- Menus definitions  									-->
+  <!-- =======================================================  -->
+
+  <!-- Menu bar definition -->
+<definition name="doc.menu.main" template="/layout/vboxLayout.jsp" >
+  <putList name="componentsList" >
+    <add value="doc.menu.links" />
+    <add value="doc.menu.taglib.references" />
+    <add value="doc.menu.printer.friendly" />
+    <add value="doc.menu.old.documents" />
+  </putList>
+</definition>
+
+  <!-- Documentation menu definition v1.1-->
+<definition name="doc.menu.links" template="/layouts/menu.jsp" >
+  <put name="title" value="Documentation" />
+    <putList name="items" >
+      <item value="Home"           link="/index.jsp"  />
+      <item value="Live Examples (new)" link="/examples/index.jsp"  />
+      <!--
+    <item> <value>Commented Examples</value>
+        <link>/examples/index.jsp</link>
+      <classtype>org.apache.tiles.beans.SimpleMenuItem</classtype>
+    </item>
+    -->
+      <item value="Quick overview" link="/doc/quickOverview.jsp"  />
+      <!--
+      <item value="Tutorial"       link="/doc/tutorial.jsp"  />
+      -->
+      <item value="Tutorial Live Examples" link="/tutorial/index.jsp" />
+      <item value="Download"       link="/doc/download.jsp" />
+      <item value="Installation"   link="/doc/installation.jsp" />
+      <item value="User Guide"	   link="/doc/userGuide.jsp" />
+      <item value="Javadoc"        link="/api/index.html" />
+      <item value="Struts Home"    link="http://www.apache.org"   icon="/images/struts-power.gif"
+      classtype="org.apache.tiles.beans.SimpleMenuItem" />
+    </putList>
+</definition>
+
+  <!-- Printer friendly menu definition -->
+<definition name="doc.menu.printer.friendly" template="/layouts/menu.jsp" >
+  <put name="title" value="Printer Versions" />
+  <putList name="items" >
+    <item value="Quick Overview"     link="/test/testAll.jsp" />
+    <item value="Tutorial"           link="/doc/tutorialBody.html" />
+    <item value="User Guide"         link="/doc/userGuideBody.html" />
+    <item value="Overview (old)"  	 link="/doc/overviewBody.html" />
+  </putList>
+</definition>
+
+  <!-- Taglib menu definition -->
+<definition name="doc.menu.taglib.references" template="/layouts/menu.jsp" >
+  <put name="title" value="Tag Library Reference" />
+    <putList name="items" >
+      <item value="Tiles Tags"     link="/doc/tilesTags.jsp" />
+      <!-- <item value="Extension Tags (old)"   link="/doc/extensionsTags.jsp" /> -->
+    </putList>
+</definition>
+
+  <!-- Oldies menu definition -->
+<definition name="doc.menu.old.documents" template="/layouts/menu.jsp" >
+  <put name="title" value="Old Documents" />
+  <putList name="items" >
+    <item value="Overview (old)"     link="/doc/overview.jsp" />
+  </putList>
+</definition>
+
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-compat/src/test/resources/org/apache/tiles/config/tiles-defs-2.0.xml b/TILES_3_0_X/tiles-compat/src/test/resources/org/apache/tiles/config/tiles-defs-2.0.xml
new file mode 100644
index 0000000..b03def5
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/test/resources/org/apache/tiles/config/tiles-defs-2.0.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="doc.mainLayout" template="/layout/classicLayout.jsp">
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+      <put-attribute name="bean"   value="This is an object" type="object" />
+  </definition>
+
+  <!-- =======================================================  -->
+  <!-- Main page body definitions  									-->
+  <!-- =======================================================  -->
+
+  <definition name="doc.portal.body" template="/layout/columnsLayout.jsp">
+    <put-attribute name="numCols" value="2" />
+    <put-list-attribute name="list0" >
+      <add-attribute value="/doc/portal/welcome.jsp" />
+      <add-attribute value="/doc/portal/features.jsp" />
+      <!--<add-attribute value="/doc/portal/todo.jsp" /> -->
+      <add-attribute value="/doc/portal/documentation.jsp" />
+    </put-list-attribute>
+    <put-list-attribute name="list1" >
+      <add-attribute value="/doc/portal/news.jsp" />
+      <add-attribute value="/doc/portal/download.jsp" />
+      <add-attribute value="/doc/portal/tilesCompsTemplates.jsp" />
+      <add-attribute value="/doc/portal/strutsIntegration.jsp" />
+      <add-attribute value="/doc/portal/comments.jsp" />
+      <add-attribute value="/doc/portal/revisions.jsp" />
+    </put-list-attribute>
+  </definition>
+
+  <!-- =======================================================  -->
+  <!-- Menus definitions  									-->
+  <!-- =======================================================  -->
+
+  <!-- Menu bar definition -->
+<definition name="doc.menu.main" template="/layout/vboxLayout.jsp" >
+  <put-list-attribute name="componentsList" >
+    <add-attribute value="doc.menu.links" />
+    <add-attribute value="doc.menu.taglib.references" />
+    <add-attribute value="doc.menu.printer.friendly" />
+    <add-attribute value="doc.menu.old.documents" />
+  </put-list-attribute>
+</definition>
+
+  <!-- Documentation menu definition v1.1-->
+<definition name="doc.menu.links" template="/layouts/menu.jsp" >
+  <put-attribute name="title" value="Documentation" />
+    <put-list-attribute name="items" >
+      <item value="Home"           link="/index.jsp"  />
+      <item value="Live Examples (new)" link="/examples/index.jsp"  />
+      <!--
+    <item> <value>Commented Examples</value>
+        <link>/examples/index.jsp</link>
+      <classtype>org.apache.tiles.beans.SimpleMenuItem</classtype>
+    </item>
+    -->
+      <item value="Quick overview" link="/doc/quickOverview.jsp"  />
+      <!--
+      <item value="Tutorial"       link="/doc/tutorial.jsp"  />
+      -->
+      <item value="Tutorial Live Examples" link="/tutorial/index.jsp" />
+      <item value="Download"       link="/doc/download.jsp" />
+      <item value="Installation"   link="/doc/installation.jsp" />
+      <item value="User Guide"	   link="/doc/userGuide.jsp" />
+      <item value="Javadoc"        link="/api/index.html" />
+      <item value="Struts Home"    link="http://www.apache.org"   icon="/images/struts-power.gif"
+      classtype="org.apache.tiles.beans.SimpleMenuItem" />
+    </put-list-attribute>
+</definition>
+
+  <!-- Printer friendly menu definition -->
+<definition name="doc.menu.printer.friendly" template="/layouts/menu.jsp" >
+  <put-attribute name="title" value="Printer Versions" />
+  <put-list-attribute name="items" >
+    <item value="Quick Overview"     link="/test/testAll.jsp" />
+    <item value="Tutorial"           link="/doc/tutorialBody.html" />
+    <item value="User Guide"         link="/doc/userGuideBody.html" />
+    <item value="Overview (old)"  	 link="/doc/overviewBody.html" />
+  </put-list-attribute>
+</definition>
+
+  <!-- Taglib menu definition -->
+<definition name="doc.menu.taglib.references" template="/layouts/menu.jsp" >
+  <put-attribute name="title" value="Tag Library Reference" />
+    <put-list-attribute name="items" >
+      <item value="Tiles Tags"     link="/doc/tilesTags.jsp" />
+      <!-- <item value="Extension Tags (old)"   link="/doc/extensionsTags.jsp" /> -->
+    </put-list-attribute>
+</definition>
+
+  <!-- Oldies menu definition -->
+<definition name="doc.menu.old.documents" template="/layouts/menu.jsp" >
+  <put-attribute name="title" value="Old Documents" />
+  <put-list-attribute name="items" >
+    <item value="Overview (old)"     link="/doc/overview.jsp" />
+  </put-list-attribute>
+</definition>
+
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-compat/src/test/resources/org/apache/tiles/config/tiles-defs-2.1.xml b/TILES_3_0_X/tiles-compat/src/test/resources/org/apache/tiles/config/tiles-defs-2.1.xml
new file mode 100644
index 0000000..95668f8
--- /dev/null
+++ b/TILES_3_0_X/tiles-compat/src/test/resources/org/apache/tiles/config/tiles-defs-2.1.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="doc.cascaded.test" template="/layout/classicLayout.jsp">
+    <put-attribute name="title" value="Test title" cascade="false" />
+    <put-attribute name="title2" value="Test title two" cascade="true" />
+    <put-list-attribute name="items1" cascade="false">
+        <add-attribute value="value1" type="string" />
+    </put-list-attribute>
+    <put-list-attribute name="items2" cascade="true">
+        <add-attribute value="value2" type="string" />
+    </put-list-attribute>
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/pom.xml b/TILES_3_0_X/tiles-core/pom.xml
new file mode 100644
index 0000000..c27f34c
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/pom.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>tiles-core</artifactId>
+  <packaging>jar</packaging>
+  <name>Tiles - Core Library</name>
+  <description>Tiles Core Library, including basic implementation of the APIs.
+  </description>
+
+  <properties>
+      <tiles.osgi.symbolicName>org.apache.tiles.core</tiles.osgi.symbolicName>
+  </properties>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <excludes>
+          <exclude>LICENSE.txt</exclude>
+          <exclude>NOTICE.txt</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>LICENSE.txt</include>
+          <include>NOTICE.txt</include>
+        </includes>
+        <targetPath>META-INF</targetPath>
+      </resource>
+    </resources>
+
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>net.sf.dtddoc</groupId>
+        <artifactId>dtddoc-maven-plugin</artifactId>
+        <version>1.1</version>
+        <configuration>
+          <docTitle>Tiles Definition File</docTitle>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-digester</groupId>
+      <artifactId>commons-digester</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymockclassextension</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shale</groupId>
+      <artifactId>shale-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/awareness/TilesContainerAware.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/awareness/TilesContainerAware.java
new file mode 100644
index 0000000..5c958b5
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/awareness/TilesContainerAware.java
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.awareness;
+
+import org.apache.tiles.TilesContainer;
+
+/**
+ * It represents an object that can have a reference to the
+ * {@link TilesContainer}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public interface TilesContainerAware {
+
+    /**
+     * Sets the Tiles container.
+     *
+     * @param container The Tiles container.
+     * @since 2.1.0
+     */
+    void setContainer(TilesContainer container);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/awareness/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/awareness/package-info.java
new file mode 100644
index 0000000..faec1df
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/awareness/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Interfaces that let the Tiles engine to inject dependencies to its objects.
+ */
+package org.apache.tiles.awareness;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/context/TilesRequestContextHolder.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/context/TilesRequestContextHolder.java
new file mode 100644
index 0000000..e9497e3
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/context/TilesRequestContextHolder.java
@@ -0,0 +1,58 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.context;
+
+import org.apache.tiles.request.Request;
+
+/**
+ * Holds in a {@link ThreadLocal} object a {@link Request}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class TilesRequestContextHolder {
+
+    /**
+     * The Tiles request context holder.
+     */
+    private ThreadLocal<Request> requestHolder = new ThreadLocal<Request>();
+
+    /**
+     * Sets the Tiles request context to use.
+     *
+     * @param request The Tiles request.
+     * @since 2.2.0
+     */
+    public void setTilesRequestContext(Request request) {
+        requestHolder.set(request);
+    }
+
+    /**
+     * Returns the Tiles request context to use.
+     *
+     * @return The Tiles request.
+     * @since 2.2.0
+     */
+    public Request getTilesRequestContext() {
+        return requestHolder.get();
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/context/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/context/package-info.java
new file mode 100644
index 0000000..b25fa4f
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/context/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes and interfaces that allow to access the various contexts in an
+ * application in a uniformed way.
+ */
+package org.apache.tiles.context;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/DefinitionsFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/DefinitionsFactory.java
new file mode 100644
index 0000000..2f52ada
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/DefinitionsFactory.java
@@ -0,0 +1,79 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.request.Request;
+
+/**
+ * Interface for creating a {@link Definition}s and managing their contents.
+ * <p/>
+ * <p>
+ * DefinitionsFactory implementations are responsible for maintaining the data
+ * sources of Tiles configuration data and using the data to create Definitions
+ * sets. Implementations also know how to append locale-specific configuration
+ * data to an existing Definitions set.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ */
+public interface DefinitionsFactory {
+
+    /**
+     * Property name that specifies the implementation of the DefinitionsReader.
+     */
+    String READER_IMPL_PROPERTY =
+        "org.apache.tiles.definition.DefinitionsReader";
+
+    /**
+     * Property name that specifies the implementation of
+     * {@link org.apache.tiles.locale.LocaleResolver}.
+     */
+    String LOCALE_RESOLVER_IMPL_PROPERTY =
+        "org.apache.tiles.locale.LocaleResolver";
+
+    /**
+     * Constant representing the configuration parameter
+     * used to define the tiles definition resources.
+     *
+     * @since 2.1.0
+     */
+    String DEFINITIONS_CONFIG = "org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG";
+
+    /**
+     * Constant representing the configuration parameter used to define the
+     * definition DAO to use.
+     */
+    String DEFINITION_DAO_INIT_PARAM =
+        "org.apache.tiles.definition.DefinitionsFactory.DefinitionDAO";
+
+    /**
+     * Returns a Definition object that matches the given name and
+     * Tiles context.
+     *
+     * @param name         The name of the Definition to return.
+     * @param tilesContext The Tiles context to use to resolve the definition.
+     * @return the Definition matching the given name or null if none
+     *         is found.
+     */
+    Definition getDefinition(String name, Request tilesContext);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/DefinitionsFactoryException.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/DefinitionsFactoryException.java
new file mode 100644
index 0000000..bba845d
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/DefinitionsFactoryException.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.tiles.definition;
+
+import org.apache.tiles.TilesException;
+
+/**
+ * Exception thrown when an error occurs while the impl tries to
+ * create a new instance mapper.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefinitionsFactoryException extends TilesException {
+    /**
+     * Constructor.
+     */
+    public DefinitionsFactoryException() {
+        super();
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The error or warning message.
+     */
+    public DefinitionsFactoryException(String message) {
+        super(message);
+    }
+
+
+    /**
+     * Create a new <code>DefinitionsFactoryException</code> wrapping an existing exception.
+     * <p/>
+     * <p>The existing exception will be embedded in the new
+     * one and its message will become the default message for
+     * the DefinitionsFactoryException.</p>
+     *
+     * @param e The exception to be wrapped.
+     */
+    public DefinitionsFactoryException(Throwable e) {
+        super(e);
+    }
+
+
+    /**
+     * Create a new <code>DefinitionsFactoryException</code> from an existing exception.
+     * <p/>
+     * <p>The existing exception will be embedded in the new
+     * one, but the new exception will have its own message.</p>
+     *
+     * @param message The detail message.
+     * @param e       The exception to be wrapped.
+     */
+    public DefinitionsFactoryException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/DefinitionsReader.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/DefinitionsReader.java
new file mode 100644
index 0000000..3a3e599
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/DefinitionsReader.java
@@ -0,0 +1,56 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import java.util.Map;
+
+import org.apache.tiles.Definition;
+
+/**
+ * Interface for reading <code>{@link Definition}</code> from a source.
+ * <p/>
+ * <p>This interface provides a standard way to read
+ * <code>{@link Definition}</code> objects from a source.  Implementations
+ * should define what the source is, whether it be a persistent store such as a
+ * configuration file or database, or something like a web service.  The
+ * DefinitionsReader is responsible for reading from a single location.  It does
+ * not perform any internationalization duties or inheritance of Definitions.
+ * It only reads from the source and returns a Map of objects read.</p>
+ *
+ * @version $Rev$ $Date$
+ */
+public interface DefinitionsReader {
+
+    /**
+     * Reads <code>{@link Definition}</code> objects from a source.
+     * <p/>
+     * Implementations should publish what type of source object is expected.
+     *
+     * @param source The source from which definitions will be read.
+     * @return a Map of <code>Definition</code> objects read from
+     *         the source.
+     * @throws DefinitionsFactoryException if the source is invalid or
+     *                                     an error occurs when reading definitions.
+     */
+    Map<String, Definition> read(Object source);
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/FactoryNotFoundException.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/FactoryNotFoundException.java
new file mode 100644
index 0000000..d5df00b
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/FactoryNotFoundException.java
@@ -0,0 +1,65 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.tiles.definition;
+
+/**
+ * Exception thrown when definitions impl is not found.
+ *
+ * @version $Rev$ $Date$
+ */
+public class FactoryNotFoundException extends DefinitionsFactoryException {
+    /**
+     * Constructor.
+     */
+    public FactoryNotFoundException() {
+        super();
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param msg Message.
+     */
+    public FactoryNotFoundException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message Message.
+     * @param e Cause.
+     */
+    public FactoryNotFoundException(String message, Throwable e) {
+        super(message, e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e Cause.
+     */
+    public FactoryNotFoundException(Throwable e) {
+        super(e);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/LocaleDefinitionsFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/LocaleDefinitionsFactory.java
new file mode 100644
index 0000000..49b69dc
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/LocaleDefinitionsFactory.java
@@ -0,0 +1,75 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import java.util.Locale;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.request.Request;
+
+/**
+ * {@link DefinitionsFactory DefinitionsFactory} implementation that manages
+ * Definitions configuration data from URLs, but resolving definition
+ * inheritance when a definition is returned.. <p/>
+ * <p>
+ * The Definition objects are read from the
+ * {@link org.apache.tiles.definition.digester.DigesterDefinitionsReader DigesterDefinitionsReader}
+ * class unless another implementation is specified.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class LocaleDefinitionsFactory extends
+        UnresolvingLocaleDefinitionsFactory {
+
+    /** {@inheritDoc} */
+    @Override
+    public Definition getDefinition(String name,
+            Request tilesContext) {
+        Definition retValue;
+        Locale locale = null;
+
+        if (tilesContext != null) {
+            locale = localeResolver.resolveLocale(tilesContext);
+        }
+
+        retValue = definitionDao.getDefinition(name, locale);
+        if (retValue != null) {
+            retValue = new Definition(retValue);
+            String parentDefinitionName = retValue.getExtends();
+            while (parentDefinitionName != null) {
+                Definition parent = definitionDao.getDefinition(
+                        parentDefinitionName, locale);
+                if (parent == null) {
+                    throw new NoSuchDefinitionException("Cannot find definition '"
+                            + parentDefinitionName + "' ancestor of '"
+                            + retValue.getName() + "'");
+                }
+                retValue.inherit(parent);
+                parentDefinitionName = parent.getExtends();
+            }
+        }
+
+        return retValue;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/NoSuchDefinitionException.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/NoSuchDefinitionException.java
new file mode 100644
index 0000000..a3e2f37
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/NoSuchDefinitionException.java
@@ -0,0 +1,65 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.tiles.definition;
+
+/**
+ * Exception thrown when a definition is not found.
+ *
+ * @version $Rev$ $Date$
+ */
+public class NoSuchDefinitionException extends DefinitionsFactoryException {
+    /**
+     * Constructor.
+     */
+    public NoSuchDefinitionException() {
+        super();
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param msg Message.
+     */
+    public NoSuchDefinitionException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message Message.
+     * @param e Cause.
+     */
+    public NoSuchDefinitionException(String message, Throwable e) {
+        super(message, e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e Cause.
+     */
+    public NoSuchDefinitionException(Throwable e) {
+        super(e);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/RefreshMonitor.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/RefreshMonitor.java
new file mode 100644
index 0000000..d682ff6
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/RefreshMonitor.java
@@ -0,0 +1,39 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.definition;
+
+/**
+ * Implementing this interface means that the object monitors the sources it
+ * uses to check when they change.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public interface RefreshMonitor {
+
+    /**
+     * Indicates whether the sources are out of date and need to be reloaded.
+     *
+     * @return <code>true</code> if the sources need to be refreshed.
+ * @since 2.1.0
+     */
+    boolean refreshRequired();
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/UnresolvingLocaleDefinitionsFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/UnresolvingLocaleDefinitionsFactory.java
new file mode 100644
index 0000000..b2a691b
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/UnresolvingLocaleDefinitionsFactory.java
@@ -0,0 +1,91 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import java.util.Locale;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.dao.DefinitionDAO;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.request.Request;
+
+/**
+ * {@link DefinitionsFactory DefinitionsFactory} implementation that manages
+ * Definitions configuration data from URLs, without resolving definition
+ * inheritance when a definition is returned.<p/>
+ * <p>
+ * The Definition objects are read from the
+ * {@link org.apache.tiles.definition.digester.DigesterDefinitionsReader DigesterDefinitionsReader}
+ * class unless another implementation is specified.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public class UnresolvingLocaleDefinitionsFactory implements DefinitionsFactory {
+
+    /**
+     * The definition DAO that extracts the definitions from the sources.
+     *
+     * @since 2.2.1
+     */
+    protected DefinitionDAO<Locale> definitionDao;
+
+    /**
+     * The locale resolver object.
+     *
+     * @since 2.2.1
+     */
+    protected LocaleResolver localeResolver;
+
+    /**
+     * Sets the locale resolver to use.
+     *
+     * @param localeResolver The locale resolver.
+     * @since 2.2.1
+     */
+    public void setLocaleResolver(LocaleResolver localeResolver) {
+        this.localeResolver = localeResolver;
+    }
+
+    /**
+     * Sets the definition DAO to use. It must be locale-based.
+     *
+     * @param definitionDao The definition DAO.
+     * @since 2.2.1
+     */
+    public void setDefinitionDAO(DefinitionDAO<Locale> definitionDao) {
+        this.definitionDao = definitionDao;
+    }
+
+    /** {@inheritDoc} */
+    public Definition getDefinition(String name,
+            Request tilesContext) {
+        Locale locale = null;
+
+        if (tilesContext != null) {
+            locale = localeResolver.resolveLocale(tilesContext);
+        }
+
+        return definitionDao.getDefinition(name, locale);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/BaseLocaleUrlDefinitionDAO.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/BaseLocaleUrlDefinitionDAO.java
new file mode 100644
index 0000000..6849f9b
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/BaseLocaleUrlDefinitionDAO.java
@@ -0,0 +1,172 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.dao;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.DefinitionsFactoryException;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.apache.tiles.definition.RefreshMonitor;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Base abstract class for a DAO that is based on URLs and locale as a
+ * customization key.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public abstract class BaseLocaleUrlDefinitionDAO implements
+        DefinitionDAO<Locale>, RefreshMonitor {
+
+    /**
+     * The logging object.
+     */
+    private final Logger log = LoggerFactory
+            .getLogger(BaseLocaleUrlDefinitionDAO.class);
+
+    /**
+     * Contains the URL objects identifying where configuration data is found.
+     *
+     * @since 2.1.0
+     */
+    protected List<ApplicationResource> sources;
+
+    /**
+     * Contains the dates that the URL sources were last modified.
+     *
+     * @since 2.1.0
+     */
+    protected Map<String, Long> lastModifiedDates;
+
+    /**
+     * Reader used to get definitions from the sources.
+     *
+     * @since 2.1.0
+     */
+    protected DefinitionsReader reader;
+
+    /**
+     * ApplicationContext to locate the source files.
+     * 
+     * @since 3.0.0
+     */
+    protected ApplicationContext applicationContext;
+    
+    /**
+     * Constructor.
+     */
+    public BaseLocaleUrlDefinitionDAO(ApplicationContext applicationContext) {
+        this.applicationContext = applicationContext;
+        lastModifiedDates = new HashMap<String, Long>();
+    }
+
+    public void setSources(List<ApplicationResource> sources) {
+        // filter out any sources that are already localized
+        ArrayList<ApplicationResource> defaultSources = new ArrayList<ApplicationResource>();
+        for(ApplicationResource source: sources) {
+            if(Locale.ROOT.equals(source.getLocale())) {
+                defaultSources.add(source);
+            }
+        }
+        this.sources = defaultSources;
+    }
+
+    public void setReader(DefinitionsReader reader) {
+        this.reader = reader;
+    }
+
+    /** {@inheritDoc} */
+    public boolean refreshRequired() {
+        boolean status = false;
+
+        Set<String> paths = lastModifiedDates.keySet();
+
+        try {
+            for (String path : paths) {
+                Long lastModifiedDate = lastModifiedDates.get(path);
+                ApplicationResource resource = applicationContext.getResource(path);
+                long newModDate = resource.getLastModified();
+                if (newModDate != lastModifiedDate) {
+                    status = true;
+                    break;
+                }
+            }
+        } catch (IOException e) {
+            log.warn("Exception while monitoring update times.", e);
+            return true;
+        }
+        return status;
+    }
+
+    /**
+     * Loads definitions from an URL without loading from "parent" URLs.
+     *
+     * @param resource The URL to read.
+     * @return The definition map that has been read.
+     */
+    protected Map<String, Definition> loadDefinitionsFromResource(ApplicationResource resource) {
+        Map<String, Definition> defsMap = null;
+
+        InputStream stream = null;
+        try {
+            lastModifiedDates.put(resource.getLocalePath(), resource
+                    .getLastModified());
+
+            // Definition must be collected, starting from the base
+            // source up to the last localized file.
+            stream = resource.getInputStream();
+            defsMap = reader.read(stream);
+        } catch (FileNotFoundException e) {
+            // File not found. continue.
+            if (log.isDebugEnabled()) {
+                log.debug("File " + resource.toString() + " not found, continue");
+            }
+        } catch (IOException e) {
+            throw new DefinitionsFactoryException(
+                    "I/O error processing configuration.", e);
+        } finally {
+            try {
+                if (stream != null) {
+                    stream.close();
+                }
+            } catch (IOException e) {
+                throw new DefinitionsFactoryException(
+                        "I/O error closing " + resource.toString(), e);
+            }
+        }
+
+        return defsMap;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/CachingLocaleUrlDefinitionDAO.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/CachingLocaleUrlDefinitionDAO.java
new file mode 100644
index 0000000..542d8d7
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/CachingLocaleUrlDefinitionDAO.java
@@ -0,0 +1,267 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.dao;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.pattern.PatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.PatternDefinitionResolverAware;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.locale.LocaleUtil;
+
+/**
+ * <p>
+ * A definitions DAO (loading URLs and using Locale as a customization key) that
+ * caches definitions that have been loaded in a raw way (i.e. with inheritance
+ * that is not resolved).
+ * </p>
+ * <p>
+ * It can check if the URLs change, but by default this feature is turned off.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class CachingLocaleUrlDefinitionDAO extends BaseLocaleUrlDefinitionDAO
+        implements PatternDefinitionResolverAware<Locale> {
+
+    /**
+     * Initialization parameter to set whether we want to refresh URLs when they
+     * change.
+     *
+     * @since 2.1.0
+     */
+    public static final String CHECK_REFRESH_INIT_PARAMETER =
+        "org.apache.tiles.definition.dao.LocaleUrlDefinitionDAO.CHECK_REFRESH";
+
+    /**
+     * The locale-specific set of definitions objects.
+     *
+     * @since 2.1.0
+     */
+    protected Map<Locale, Map<String, Definition>> locale2definitionMap;
+
+    /**
+     * Flag that, when <code>true</code>, enables automatic checking of URLs
+     * changing.
+     *
+     * @since 2.1.0
+     */
+    protected boolean checkRefresh = false;
+
+    /**
+     * Resolves definitions using patterns.
+     *
+     * @since 2.2.0
+     */
+    protected PatternDefinitionResolver<Locale> definitionResolver;
+
+    /**
+     * Constructor.
+     *
+     * @since 2.1.0
+     */
+    public CachingLocaleUrlDefinitionDAO(ApplicationContext applicationContext) {
+        super(applicationContext);
+        locale2definitionMap = new HashMap<Locale, Map<String, Definition>>();
+    }
+
+    /** {@inheritDoc} */
+    public void setPatternDefinitionResolver(
+            PatternDefinitionResolver<Locale> definitionResolver) {
+        this.definitionResolver = definitionResolver;
+    }
+
+    /** {@inheritDoc} */
+    public Definition getDefinition(String name, Locale customizationKey) {
+        Definition retValue = null;
+        if (customizationKey == null) {
+            customizationKey = Locale.ROOT;
+        }
+        Map<String, Definition> definitions = getDefinitions(customizationKey);
+        if (definitions != null) {
+            retValue = definitions.get(name);
+
+            if (retValue == null) {
+                retValue = getDefinitionFromResolver(name, customizationKey);
+
+                if (retValue != null) {
+                    synchronized (definitions) {
+                        definitions.put(name, retValue);
+                    }
+                }
+            }
+        }
+
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    public Map<String, Definition> getDefinitions(Locale customizationKey) {
+        if (customizationKey == null) {
+            customizationKey = Locale.ROOT;
+        }
+        Map<String, Definition> retValue = locale2definitionMap
+                .get(customizationKey);
+        if (retValue == null || (checkRefresh && refreshRequired())) {
+            retValue = checkAndloadDefinitions(customizationKey);
+        }
+        return retValue;
+    }
+
+    /**
+     * Sets the flag to check source refresh. If not called, the default is
+     * <code>false</code>.
+     *
+     * @param checkRefresh When <code>true</code>, enables automatic checking
+     * of sources changing.
+     * @since 2.1.0
+     */
+    public void setCheckRefresh(boolean checkRefresh) {
+        this.checkRefresh = checkRefresh;
+    }
+
+    /**
+     * Returns a definition from the definition resolver.
+     *
+     * @param name The name of the definition.
+     * @param customizationKey The customization key to use.
+     * @return The resolved definition.
+     */
+    protected Definition getDefinitionFromResolver(String name,
+            Locale customizationKey) {
+        return definitionResolver.resolveDefinition(name,
+                customizationKey);
+    }
+
+    /**
+     * Checks if sources have changed. If yes, it clears the cache. Then continues
+     * loading definitions.
+     *
+     * @param customizationKey The locale to use when loading sources.
+     * @return The loaded definitions.
+     * @since 2.1.0
+     */
+    protected synchronized Map<String, Definition> checkAndloadDefinitions(
+            Locale customizationKey) {
+        if (checkRefresh && refreshRequired()) {
+            locale2definitionMap.clear();
+        }
+        loadDefinitions(customizationKey);
+        return locale2definitionMap.get(customizationKey);
+    }
+
+    /**
+     * Tries to load definitions if necessary.
+     *
+     * @param customizationKey The locale to use when loading sources.
+     * @return The loaded definitions.
+     * @since 2.1.0
+     */
+    protected Map<String, Definition> loadDefinitions(Locale customizationKey) {
+        Map<String, Definition> localeDefsMap = locale2definitionMap
+                .get(customizationKey);
+        if (localeDefsMap != null) {
+            return localeDefsMap;
+        }
+
+        return loadDefinitionsFromResources(customizationKey);
+    }
+
+    /**
+     * Loads definitions from the sources.
+     *
+     * @param customizationKey The locale to use when loading Resources.
+     * @return The loaded definitions.
+     * @since 2.1.0
+     */
+    protected Map<String, Definition> loadDefinitionsFromResources(Locale customizationKey) {
+        Map<String, Definition> localeDefsMap = loadRawDefinitionsFromResources(customizationKey);
+        Map<String, Definition> defsMap = definitionResolver
+                .storeDefinitionPatterns(copyDefinitionMap(localeDefsMap),
+                        customizationKey);
+        locale2definitionMap.put(customizationKey, defsMap);
+        return localeDefsMap;
+    }
+
+    /**
+     * Loads the raw definitions from the sources associated with a locale.
+     *
+     * @param customizationKey The locale to use when loading Resources.
+     * @return The loaded definitions.
+     * @since 2.1.3
+     */
+    protected Map<String, Definition> loadRawDefinitionsFromResources(
+            Locale customizationKey) {
+        Map<String, Definition> localeDefsMap;
+
+        Locale parentLocale = LocaleUtil.getParentLocale(customizationKey);
+        localeDefsMap = new LinkedHashMap<String, Definition>();
+        if (parentLocale != null) {
+            Map<String, Definition> parentDefs = loadRawDefinitionsFromResources(parentLocale);
+            if (parentDefs != null) {
+                localeDefsMap.putAll(parentDefs);
+            }
+        }
+        // For each source, the resource must be loaded.
+        for (ApplicationResource resource : sources) {
+            ApplicationResource newResource = applicationContext.getResource(resource, customizationKey);
+            if (newResource != null) {
+                Map<String, Definition> defsMap = loadDefinitionsFromResource(newResource);
+                if (defsMap != null) {
+                    localeDefsMap.putAll(defsMap);
+                }
+            }
+        }
+        return localeDefsMap;
+    }
+
+    /**
+     * Loads parent definitions, i.e. definitions mapped to a parent locale.
+     *
+     * @param parentLocale The locale to use when loading URLs.
+     * @return The loaded parent definitions.
+     * @since 2.1.0
+     */
+    protected Map<String, Definition> loadParentDefinitions(Locale parentLocale) {
+        return loadDefinitions(parentLocale);
+    }
+
+    /**
+     * Copies the definition map to be passed to a higher level of customization
+     * key.
+     *
+     * @param localeDefsMap The map of definition to be copied.
+     * @return The copy of the definition map. This particular implementation
+     * return the <code>localeDefsMap</code> itself.
+     * @since 2.1.4
+     */
+    protected Map<String, Definition> copyDefinitionMap(
+            Map<String, Definition> localeDefsMap) {
+        return localeDefsMap;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/DefinitionDAO.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/DefinitionDAO.java
new file mode 100644
index 0000000..a5461e4
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/DefinitionDAO.java
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.definition.dao;
+
+import java.util.Map;
+
+import org.apache.tiles.Definition;
+
+/**
+ * It represents an object that provides definitions, depending on a
+ * customization key.
+ *
+ * @param <K> The customization key class.
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public interface DefinitionDAO<K> {
+
+    /**
+     * Returns a definition, given its name and the customization key.
+     *
+     * @param name The name of the definition.
+     * @param customizationKey The customization key.
+     * @return The requested definition, if found, otherwise <code>null</code>.
+     * The inheritance of the definition must not be resolved.
+     * @since 2.1.0
+     */
+    Definition getDefinition(String name, K customizationKey);
+
+    /**
+     * Returns all the definitions used of a customization key.
+     *
+     * @param customizationKey The customization key.
+     * @return All the definitions that are connected to the customization key.
+     * The inheritance of the definitions must not be resolved.
+     * @since 2.1.0
+     */
+    Map<String, Definition> getDefinitions(K customizationKey);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/LocaleUrlDefinitionDAO.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/LocaleUrlDefinitionDAO.java
new file mode 100644
index 0000000..4f50437
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/LocaleUrlDefinitionDAO.java
@@ -0,0 +1,105 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.definition.dao;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.locale.LocaleUtil;
+
+/**
+ * A definition DAO that uses {@link Locale} as a customization key and loads
+ * definitions from URLs. It does not cache definitions in any way.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class LocaleUrlDefinitionDAO extends BaseLocaleUrlDefinitionDAO {
+
+    public LocaleUrlDefinitionDAO(ApplicationContext applicationContext) {
+        super(applicationContext);
+    }
+
+    /**
+     * <p>
+     * Returns a definition, given its name and the customization key.
+     * </p>
+     * <strong>WARNING!</strong> This method is slow! It loads all the
+     * definitions and then selects the needed one.
+     *
+     * @param name The name of the definition.
+     * @param customizationKey The customization key.
+     * @return The requested definition, if found, otherwise <code>null</code>.
+     * The inheritance of the definition must not be resolved.
+     * @since 2.1.0
+     */
+    public Definition getDefinition(String name, Locale customizationKey) {
+        Map<String, Definition> defsMap = getDefinitions(customizationKey);
+        return defsMap.get(name);
+    }
+
+    /** {@inheritDoc} */
+    public Map<String, Definition> getDefinitions(Locale customizationKey) {
+        ArrayList<Locale> postfixes = computeLocales(customizationKey);
+        Map<String, Definition> localeDefsMap = new HashMap<String, Definition>();
+        // process the postfixes from the root to the most specific
+        for (Locale postfix : postfixes) {
+            // For each postfix, all the sources must be loaded.
+            for (ApplicationResource resource : sources) {
+                ApplicationResource newResource = applicationContext.getResource(resource, postfix);
+                if (newResource != null) {
+                    Map<String, Definition> defsMap = loadDefinitionsFromResource(newResource);
+                    if (defsMap != null) {
+                        localeDefsMap.putAll(defsMap);
+                    }
+                }
+            }
+        }
+        return localeDefsMap;
+    }
+
+    /**
+     * Returns a list of locales from root to the customizationKey.
+     * @param customizationKey the target Locale.
+     * @return the list of its ancestors.
+     */
+    private ArrayList<Locale> computeLocales(Locale customizationKey) {
+        Locale postfix;
+        if(customizationKey == null) {
+            postfix = Locale.ROOT;
+        } else {
+            postfix = customizationKey;
+        }
+        ArrayList<Locale> postfixes = new ArrayList<Locale>();
+        while (postfix != null) {
+            postfixes.add(postfix);
+            postfix = LocaleUtil.getParentLocale(postfix);
+        }
+        Collections.reverse(postfixes);
+        return postfixes;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/ResolvingLocaleUrlDefinitionDAO.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/ResolvingLocaleUrlDefinitionDAO.java
new file mode 100644
index 0000000..7c7b352
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/ResolvingLocaleUrlDefinitionDAO.java
@@ -0,0 +1,178 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.dao;
+
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.NoSuchDefinitionException;
+import org.apache.tiles.request.ApplicationContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * A definitions DAO (loading URLs and using Locale as a customization key) that
+ * caches definitions that have been loaded and resolves inheritances.
+ * </p>
+ * <p>
+ * It can check if the URLs change, but by default this feature is turned off.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class ResolvingLocaleUrlDefinitionDAO extends
+        CachingLocaleUrlDefinitionDAO {
+
+    /**
+     * The logging object.
+     */
+    private final Logger log = LoggerFactory.getLogger(ResolvingLocaleUrlDefinitionDAO.class);
+
+    public ResolvingLocaleUrlDefinitionDAO(ApplicationContext applicationContext) {
+        super(applicationContext);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected Map<String, Definition> loadParentDefinitions(Locale parentLocale) {
+        return loadRawDefinitionsFromResources(parentLocale);
+    }
+
+    @Override
+    protected Map<String, Definition> loadDefinitions(Locale customizationKey) {
+        Map<String, Definition> localeDefsMap = super.loadDefinitions(customizationKey);
+        Map<String, Definition> defsMap = definitionResolver
+                .storeDefinitionPatterns(copyDefinitionMap(localeDefsMap),
+                        customizationKey);
+        resolveInheritances(defsMap, customizationKey);
+        locale2definitionMap.put(customizationKey, defsMap);
+        return defsMap;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected Definition getDefinitionFromResolver(String name,
+            Locale customizationKey) {
+        Definition retValue = super.getDefinitionFromResolver(name, customizationKey);
+        if (retValue != null && retValue.getExtends() != null) {
+            Definition parent = getDefinition(retValue.getExtends(), customizationKey);
+            retValue.inherit(parent);
+        }
+
+        return retValue;
+    }
+
+    /**
+     * Resolve locale-specific extended instances.
+     *
+     * @param map The definition map containing the definitions to resolve.
+     * @param locale The locale to use.
+     * @throws NoSuchDefinitionException If a parent definition is not found.
+     * @since 2.1.0
+     */
+    protected void resolveInheritances(Map<String, Definition> map, Locale locale) {
+        if (map != null) {
+            Set<String> alreadyResolvedDefinitions = new HashSet<String>();
+            for (Definition definition : map.values()) {
+                resolveInheritance(definition, map, locale,
+                        alreadyResolvedDefinitions);
+            }  // end loop
+        }
+    }
+
+    /**
+     * Resolve locale-specific inheritance. First, resolve parent's inheritance,
+     * then set template to the parent's template. Also copy attributes setted
+     * in parent, and not set in child If instance doesn't extend anything, do
+     * nothing.
+     *
+     * @param definition The definition to resolve
+     * @param definitions The definitions to take when obtaining a parent
+     * definition.
+     * @param locale The locale to use.
+     * @param alreadyResolvedDefinitions The set of the definitions that have
+     * been already resolved.
+     * @throws NoSuchDefinitionException If an inheritance can not be solved.
+     * @since 2.1.0
+     */
+    protected void resolveInheritance(Definition definition,
+            Map<String, Definition> definitions, Locale locale,
+            Set<String> alreadyResolvedDefinitions) {
+        // Already done, or not needed ?
+        if (!definition.isExtending()
+                || alreadyResolvedDefinitions.contains(definition.getName())) {
+            return;
+        }
+
+        log.debug("Resolve definition for child name='{}' extends='{}.",
+                definition.getName(), definition.getExtends());
+
+        // Set as visited to avoid endless recursivity.
+        alreadyResolvedDefinitions.add(definition.getName());
+
+        // Resolve parent before itself.
+        Definition parent = definitions.get(definition.getExtends());
+        if (parent == null) { // error
+            String msg = "Error while resolving definition inheritance: child '"
+                + definition.getName()
+                + "' can't find its ancestor '"
+                + definition.getExtends()
+                + "'. Please check your description file.";
+            // to do : find better exception
+            throw new NoSuchDefinitionException(msg);
+        }
+
+        resolveInheritance(parent, definitions, locale,
+                alreadyResolvedDefinitions);
+
+        definition.inherit(parent);
+    }
+
+    /**
+     * Copies the definition map to be passed to a higher level of customization
+     * key.
+     *
+     * @param localeDefsMap The map of definition to be copied.
+     * @return The copy of the definition map. This particular implementation
+     * deep-copies the <code>localeDefsMap</code> into a {@link LinkedHashMap}.
+     * @since 2.1.4
+     */
+    @Override
+    protected Map<String, Definition> copyDefinitionMap(
+            Map<String, Definition> localeDefsMap) {
+        Map<String, Definition> retValue = new LinkedHashMap<String, Definition>(
+                localeDefsMap.size());
+
+        for (Map.Entry<String, Definition> entry : localeDefsMap.entrySet()) {
+            Definition definition = new Definition(entry.getValue());
+            retValue.put(entry.getKey(), definition);
+        }
+
+        return retValue;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/package-info.java
new file mode 100644
index 0000000..61ec23e
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/dao/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes to simply load definitions depending on a customization key.
+ * The package contains also basic implementations.
+ */
+package org.apache.tiles.definition.dao;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/digester/DigesterDefinitionsReader.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/digester/DigesterDefinitionsReader.java
new file mode 100644
index 0000000..b7c4560
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/digester/DigesterDefinitionsReader.java
@@ -0,0 +1,470 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.digester;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.Rule;
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.Expression;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.definition.DefinitionsFactoryException;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.xml.sax.Attributes;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Reads {@link Definition} objects from
+ * an XML InputStream using Digester. <p/>
+ * <p>
+ * This <code>DefinitionsReader</code> implementation expects the source to be
+ * passed as an <code>InputStream</code>. It parses XML data from the source
+ * and builds a Map of Definition objects.
+ * </p>
+ * <p/>
+ * <p>
+ * The Digester object can be configured by passing in initialization
+ * parameters. Currently the only parameter that is supported is the
+ * <code>validating</code> parameter. This value is set to <code>false</code>
+ * by default. To enable DTD validation for XML Definition files, give the init
+ * method a parameter with a key of
+ * <code>org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE</code>
+ * and a value of <code>&quot;true&quot;</code>. <p/>
+ * <p>
+ * The Definition objects are stored internally in a Map. The Map is stored as
+ * an instance variable rather than a local variable in the <code>read</code>
+ * method. This means that instances of this class are <strong>not</strong>
+ * thread-safe and access by multiple threads must be synchronized.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ */
+public class DigesterDefinitionsReader implements DefinitionsReader {
+
+    /**
+     * Digester validation parameter name.
+     */
+    public static final String PARSER_VALIDATE_PARAMETER_NAME =
+        "org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE";
+
+    // Digester rules constants for tag interception.
+
+    /**
+     * Intercepts a &lt;definition&gt; tag.
+     */
+    private static final String DEFINITION_TAG = "tiles-definitions/definition";
+
+    /**
+     * Intercepts a &lt;put-attribute&gt; tag.
+     */
+    private static final String PUT_TAG = "*/definition/put-attribute";
+
+    /**
+     * Intercepts a &lt;definition&gt; inside a  &lt;put-attribute&gt; tag.
+     */
+    private static final String PUT_DEFINITION_TAG = "*/put-attribute/definition";
+
+    /**
+     * Intercepts a &lt;definition&gt; inside an &lt;add-attribute&gt; tag.
+     */
+    private static final String ADD_DEFINITION_TAG = "*/add-attribute/definition";
+
+    /**
+     * Intercepts a &lt;put-list-attribute&gt; tag inside a %lt;definition&gt;
+     * tag.
+     */
+    private static final String DEF_LIST_TAG = "*/definition/put-list-attribute";
+
+    /**
+     * Intercepts a &lt;add-attribute&gt; tag.
+     */
+    private static final String ADD_LIST_ELE_TAG = "*/add-attribute";
+
+    /**
+     * Intercepts a &lt;add-list-attribute&gt; tag.
+     */
+    private static final String NESTED_LIST = "*/add-list-attribute";
+
+    // Handler class names.
+
+    /**
+     * The handler to create definitions.
+     *
+     * @since 2.1.0
+     */
+    protected static final String DEFINITION_HANDLER_CLASS =
+        Definition.class.getName();
+
+    /**
+     * The handler to create attributes.
+     *
+     * @since 2.1.0
+     */
+    protected static final String PUT_ATTRIBUTE_HANDLER_CLASS =
+        Attribute.class.getName();
+
+    /**
+     * The handler to create list attributes.
+     *
+     * @since 2.1.0
+     */
+    protected static final String LIST_HANDLER_CLASS =
+        ListAttribute.class.getName();
+
+    /**
+     * Digester rule to manage definition filling.
+     *
+     * @since 2.1.2
+     */
+    public static class FillDefinitionRule extends Rule {
+
+        /** {@inheritDoc} */
+        @Override
+        public void begin(String namespace, String name, Attributes attributes) {
+            Definition definition = (Definition) digester.peek();
+            definition.setName(attributes.getValue("name"));
+            definition.setPreparer(attributes.getValue("preparer"));
+            String extendsAttribute = attributes.getValue("extends");
+            definition.setExtends(extendsAttribute);
+
+            String template = attributes.getValue("template");
+            Attribute attribute = Attribute.createTemplateAttribute(template);
+            attribute.setExpressionObject(Expression
+                    .createExpressionFromDescribedExpression(attributes
+                            .getValue("templateExpression")));
+            attribute.setRole(attributes.getValue("role"));
+            String templateType = attributes.getValue("templateType");
+            if (templateType != null) {
+                attribute.setRenderer(templateType);
+            } else if (extendsAttribute != null && templateType == null) {
+                attribute.setRenderer(null);
+            }
+            definition.setTemplateAttribute(attribute);
+        }
+    }
+
+    /**
+     * Digester rule to manage attribute filling.
+     *
+     * @since 2.1.0
+     */
+    public static class FillAttributeRule extends Rule {
+
+        /** {@inheritDoc} */
+        @Override
+        public void begin(String namespace, String name, Attributes attributes) {
+            Attribute attribute = (Attribute) digester.peek();
+            attribute.setValue(attributes.getValue("value"));
+            String expression = attributes.getValue("expression");
+            attribute.setExpressionObject(Expression
+                    .createExpressionFromDescribedExpression(expression));
+            attribute.setRole(attributes.getValue("role"));
+            attribute.setRenderer(attributes.getValue("type"));
+        }
+    }
+
+    /**
+     * Digester rule to manage assignment of the attribute to the parent
+     * element.
+     *
+     * @since 2.1.0
+     */
+    public static class PutAttributeRule extends Rule {
+
+        /** {@inheritDoc} */
+        @Override
+        public void begin(String namespace, String name, Attributes attributes) {
+            Attribute attribute = (Attribute) digester.peek(0);
+            Definition definition = (Definition) digester.peek(1);
+            definition.putAttribute(attributes.getValue("name"), attribute,
+                    "true".equals(attributes.getValue("cascade")));
+        }
+    }
+
+    /**
+     * Digester rule to manage assignment of a nested definition in an attribute
+     * value.
+     *
+     * @since 2.1.0
+     */
+    public class AddNestedDefinitionRule extends Rule {
+
+        /** {@inheritDoc} */
+        @Override
+        public void begin(String namespace, String name, Attributes attributes) {
+            Definition definition = (Definition) digester.peek(0);
+            if (definition.getName() == null) {
+                definition.setName(getNextUniqueDefinitionName(definitions));
+            }
+            Attribute attribute = (Attribute) digester.peek(1);
+            attribute.setValue(definition.getName());
+            attribute.setRenderer("definition");
+        }
+    }
+
+    /**
+     * <code>Digester</code> object used to read Definition data
+     * from the source.
+     */
+    protected Digester digester;
+
+    /**
+     * The set of public identifiers, and corresponding resource names for
+     * the versions of the configuration file DTDs we know about.  There
+     * <strong>MUST</strong> be an even number of Strings in this list!
+     */
+    protected String[] registrations;
+
+    /**
+     * Stores Definition objects.
+     */
+    private Map<String, Definition> definitions;
+
+    /**
+     * Index to be used to create unique definition names for anonymous
+     * (nested) definitions.
+     */
+    private int anonymousDefinitionIndex = 1;
+
+    /**
+     * Creates a new instance of DigesterDefinitionsReader.
+     */
+    public DigesterDefinitionsReader() {
+        digester = new Digester();
+        digester.setNamespaceAware(true);
+        digester.setUseContextClassLoader(true);
+        digester.setErrorHandler(new ThrowingErrorHandler());
+
+        // Register our local copy of the DTDs that we can find
+        String[] registrations = getRegistrations();
+        for (int i = 0; i < registrations.length; i += 2) {
+            URL url = this.getClass().getResource(
+                registrations[i + 1]);
+            if (url != null) {
+                digester.register(registrations[i], url.toString());
+            }
+        }
+
+        initSyntax(digester);
+    }
+
+    /**
+     * Sets the validation of XML files.
+     *
+     * @param validating <code>true</code> means that XML validation is turned
+     * on. <code>false</code> otherwise.
+     * @since 3.3.0
+     */
+    public void setValidating(boolean validating) {
+        digester.setValidating(validating);
+    }
+
+    /**
+     * Reads <code>{@link Definition}</code> objects from a source.
+     * <p/>
+     * Implementations should publish what type of source object is expected.
+     *
+     * @param source The <code>InputStream</code> source from which definitions
+     *               will be read.
+     * @return a Map of <code>Definition</code> objects read from
+     *         the source.
+     * @throws DefinitionsFactoryException If the source is invalid or
+     *          an error occurs when reading definitions.
+     */
+    public Map<String, Definition> read(Object source) {
+        // This is an instance variable instead of a local variable because
+        // we want to be able to call the addDefinition method to populate it.
+        // But we reset the Map here, which, of course, has threading implications.
+        definitions = new LinkedHashMap<String, Definition>();
+
+        if (source == null) {
+            // Perhaps we should throw an exception here.
+            return null;
+        }
+
+        InputStream input;
+        try {
+            input = (InputStream) source;
+        } catch (ClassCastException e) {
+            throw new DefinitionsFactoryException(
+                "Invalid source type.  Requires java.io.InputStream.", e);
+        }
+
+        try {
+            // set first object in stack
+            //digester.clear();
+            digester.push(this);
+            // parse
+            digester.parse(input);
+
+        } catch (SAXException e) {
+            throw new DefinitionsFactoryException(
+                "XML error reading definitions.", e);
+        } catch (IOException e) {
+            throw new DefinitionsFactoryException(
+                "I/O Error reading definitions.", e);
+        } finally {
+            digester.clear();
+        }
+
+        return definitions;
+    }
+
+    /**
+     * Initialised the syntax for reading XML files containing Tiles
+     * definitions.
+     *
+     * @param digester The digester to initialize.
+     */
+    protected void initSyntax(Digester digester) {
+        initDigesterForTilesDefinitionsSyntax(digester);
+    }
+
+
+    /**
+     * Init digester for Tiles syntax with first element = tiles-definitions.
+     *
+     * @param digester Digester instance to use.
+     */
+    private void initDigesterForTilesDefinitionsSyntax(Digester digester) {
+        // syntax rules
+        digester.addObjectCreate(DEFINITION_TAG, DEFINITION_HANDLER_CLASS);
+        digester.addRule(DEFINITION_TAG, new FillDefinitionRule());
+        digester.addSetNext(DEFINITION_TAG, "addDefinition", DEFINITION_HANDLER_CLASS);
+
+        // nested definition rules
+        digester.addObjectCreate(PUT_DEFINITION_TAG, DEFINITION_HANDLER_CLASS);
+        digester.addRule(PUT_DEFINITION_TAG, new FillDefinitionRule());
+        digester.addSetRoot(PUT_DEFINITION_TAG, "addDefinition");
+        digester.addRule(PUT_DEFINITION_TAG, new AddNestedDefinitionRule());
+        digester.addObjectCreate(ADD_DEFINITION_TAG, DEFINITION_HANDLER_CLASS);
+        digester.addRule(ADD_DEFINITION_TAG, new FillDefinitionRule());
+        digester.addSetRoot(ADD_DEFINITION_TAG, "addDefinition");
+        digester.addRule(ADD_DEFINITION_TAG, new AddNestedDefinitionRule());
+
+        // put / putAttribute rules
+        // Rules for a same pattern are called in order, but rule.end() are called
+        // in reverse order.
+        // SetNext and CallMethod use rule.end() method. So, placing SetNext in
+        // first position ensure it will be called last (sic).
+        digester.addObjectCreate(PUT_TAG, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addRule(PUT_TAG, new FillAttributeRule());
+        digester.addRule(PUT_TAG, new PutAttributeRule());
+        // Definition level list rules
+        // This is rules for lists nested in a definition
+        digester.addObjectCreate(DEF_LIST_TAG, LIST_HANDLER_CLASS);
+        digester.addSetProperties(DEF_LIST_TAG);
+        digester.addRule(DEF_LIST_TAG, new PutAttributeRule());
+        // list elements rules
+        // We use Attribute class to avoid rewriting a new class.
+        // Name part can't be used in listElement attribute.
+        digester.addObjectCreate(ADD_LIST_ELE_TAG, PUT_ATTRIBUTE_HANDLER_CLASS);
+        digester.addRule(ADD_LIST_ELE_TAG, new FillAttributeRule());
+        digester.addSetNext(ADD_LIST_ELE_TAG, "add", PUT_ATTRIBUTE_HANDLER_CLASS);
+
+        // nested list elements rules
+        // Create a list handler, and add it to parent list
+        digester.addObjectCreate(NESTED_LIST, LIST_HANDLER_CLASS);
+        digester.addSetProperties(NESTED_LIST);
+        digester.addSetNext(NESTED_LIST, "add", PUT_ATTRIBUTE_HANDLER_CLASS);
+    }
+
+    /**
+     * Adds a new <code>Definition</code> to the internal Map or replaces
+     * an existing one.
+     *
+     * @param definition The Definition object to be added.
+     */
+    public void addDefinition(Definition definition) {
+        String name = definition.getName();
+        if (name == null) {
+            throw new DigesterDefinitionsReaderException(
+                    "A root definition has been defined with no name");
+        }
+
+        definitions.put(name, definition);
+    }
+
+    /**
+     * Error Handler that throws every exception it receives.
+     */
+    private static class ThrowingErrorHandler implements ErrorHandler {
+
+        /** {@inheritDoc} */
+        public void warning(SAXParseException exception) throws SAXException {
+            throw exception;
+        }
+
+        /** {@inheritDoc} */
+        public void error(SAXParseException exception) throws SAXException {
+            throw exception;
+        }
+
+        /** {@inheritDoc} */
+        public void fatalError(SAXParseException exception) throws SAXException {
+            throw exception;
+        }
+    }
+
+    /**
+     * Returns the registrations for local DTDs.
+     *
+     * @return An array containing the locations for registrations of local
+     * DTDs.
+     * @since 2.1.0
+     */
+    protected String[] getRegistrations() {
+        if (registrations == null) {
+            registrations = new String[] {
+                "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN",
+                "/org/apache/tiles/resources/tiles-config_3_0.dtd"};
+        }
+        return registrations;
+    }
+
+    /**
+     * Create a unique definition name usable to store anonymous definitions.
+     *
+     * @param definitions The already created definitions.
+     * @return The unique definition name to be used to store the definition.
+     * @since 2.1.0
+     */
+    protected String getNextUniqueDefinitionName(
+            Map<String, Definition> definitions) {
+        String candidate;
+
+        do {
+            candidate = "$anonymousDefinition" + anonymousDefinitionIndex;
+            anonymousDefinitionIndex++;
+        } while (definitions.containsKey(candidate));
+
+        return candidate;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/digester/DigesterDefinitionsReaderException.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/digester/DigesterDefinitionsReaderException.java
new file mode 100644
index 0000000..644f38a
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/digester/DigesterDefinitionsReaderException.java
@@ -0,0 +1,73 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.definition.digester;
+
+import org.apache.tiles.TilesException;
+
+/**
+ * Indicates that something went wrong during the use of
+ * {@link DigesterDefinitionsReader}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class DigesterDefinitionsReaderException extends TilesException {
+
+    /**
+     * Constructor.
+     *
+     * @since 2.1.0
+     */
+    public DigesterDefinitionsReaderException() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @since 2.1.0
+     */
+    public DigesterDefinitionsReaderException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e The exception to be wrapped.
+     * @since 2.1.0
+     */
+    public DigesterDefinitionsReaderException(Throwable e) {
+        super(e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @param e The exception to be wrapped.
+     * @since 2.1.0
+     */
+    public DigesterDefinitionsReaderException(String message, Throwable e) {
+        super(message, e);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/digester/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/digester/package-info.java
new file mode 100644
index 0000000..129c2d3
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/digester/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Allows reading definitions with the use of Jakarta Commons Digester.
+ */
+package org.apache.tiles.definition.digester;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/package-info.java
new file mode 100644
index 0000000..3e154ec
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * It contains classes and interfaces to allow manipulations of "definitions", i.e.
+ * objects made of a template page and a number of filled attributes.
+ */
+package org.apache.tiles.definition;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/AbstractPatternDefinitionResolver.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/AbstractPatternDefinitionResolver.java
new file mode 100644
index 0000000..65ff73d
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/AbstractPatternDefinitionResolver.java
@@ -0,0 +1,109 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tiles.Definition;
+
+/**
+ * A pattern definition resolver that stores {@link DefinitionPatternMatcher}
+ * separated by customization key. <br>
+ * Implementations should provide a way to translate a definition to a
+ * {@link DefinitionPatternMatcher}.
+ *
+ * @param <T> The type of the customization key.
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public abstract class AbstractPatternDefinitionResolver<T> implements
+        PatternDefinitionResolver<T> {
+
+    /**
+     * Stores patterns depending on the locale they refer to.
+     */
+    private Map<T, List<DefinitionPatternMatcher>> localePatternPaths =
+        new HashMap<T, List<DefinitionPatternMatcher>>();
+
+    /** {@inheritDoc} */
+    public Definition resolveDefinition(String name, T customizationKey) {
+        Definition retValue = null;
+        if (localePatternPaths.containsKey(customizationKey)) {
+            retValue = searchAndResolveDefinition(localePatternPaths
+                    .get(customizationKey), name);
+        }
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    public Map<String, Definition> storeDefinitionPatterns(Map<String, Definition> localeDefsMap,
+            T customizationKey) {
+        List<DefinitionPatternMatcher> lpaths = localePatternPaths
+                .get(customizationKey);
+        if (lpaths == null) {
+            lpaths = new ArrayList<DefinitionPatternMatcher>();
+            localePatternPaths.put(customizationKey, lpaths);
+        }
+
+        return addDefinitionsAsPatternMatchers(lpaths, localeDefsMap);
+    }
+
+    /**
+     * Adds definitions, filtering and adding them to the list of definition
+     * pattern matchers. Only a subset of definitions will be transformed into
+     * definition pattern matchers.
+     *
+     * @param matchers The list containing the currently stored definition pattern
+     * matchers.
+     * @param defsMap The definition map to parse.
+     * @return The map of the definitions not recognized as containing
+     * definition patterns.
+     * @since 2.2.1
+     */
+    protected abstract Map<String, Definition> addDefinitionsAsPatternMatchers(
+            List<DefinitionPatternMatcher> matchers,
+            Map<String, Definition> defsMap);
+
+    /**
+     * Try to resolve a definition by iterating all pattern matchers.
+     *
+     * @param paths The list containing the currently stored paths.
+     * @param name The name of the definition to resolve.
+     * @return A definition, if found, or <code>null</code> if not.
+     */
+    private Definition searchAndResolveDefinition(
+            List<DefinitionPatternMatcher> paths, String name) {
+        Definition d = null;
+
+        for (DefinitionPatternMatcher wm : paths) {
+            d = wm.createDefinition(name);
+            if (d != null) {
+                break;
+            }
+        }
+
+        return d;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/BasicPatternDefinitionResolver.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/BasicPatternDefinitionResolver.java
new file mode 100644
index 0000000..9f6bf4e
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/BasicPatternDefinitionResolver.java
@@ -0,0 +1,83 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tiles.Definition;
+
+/**
+ * A pattern definition resolver that stores {@link DefinitionPatternMatcher}
+ * separated by customization key. <br>
+ * It delegates creation of definition pattern matchers to a
+ * {@link DefinitionPatternMatcherFactory} and recgnizes patterns through the
+ * use of a {@link PatternRecognizer}.
+ *
+ * @param <T> The type of the customization key.
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class BasicPatternDefinitionResolver<T> extends
+        AbstractPatternDefinitionResolver<T> {
+
+    /**
+     * The factory of pattern matchers.
+     */
+    private DefinitionPatternMatcherFactory definitionPatternMatcherFactory;
+
+    /**
+     * The pattern recognizer.
+     */
+    private PatternRecognizer patternRecognizer;
+
+    /**
+     * Constructor.
+     *
+     * @param definitionPatternMatcherFactory The definition pattern matcher factory.
+     * @param patternRecognizer The pattern recognizer.
+     */
+    public BasicPatternDefinitionResolver(DefinitionPatternMatcherFactory definitionPatternMatcherFactory,
+            PatternRecognizer patternRecognizer) {
+        this.definitionPatternMatcherFactory = definitionPatternMatcherFactory;
+        this.patternRecognizer = patternRecognizer;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected Map<String, Definition> addDefinitionsAsPatternMatchers(List<DefinitionPatternMatcher> matchers,
+            Map<String, Definition> defsMap) {
+        Set<String> excludedKeys = new LinkedHashSet<String>();
+        for (Map.Entry<String, Definition> de : defsMap.entrySet()) {
+            String key = de.getKey();
+            if (patternRecognizer.isPatternRecognized(key)) {
+                matchers.add(definitionPatternMatcherFactory
+                        .createDefinitionPatternMatcher(key, de.getValue()));
+            } else {
+                excludedKeys.add(key);
+            }
+        }
+        return PatternUtil.createExtractedMap(defsMap, excludedKeys);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/DefinitionPatternMatcher.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/DefinitionPatternMatcher.java
new file mode 100644
index 0000000..e003acc
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/DefinitionPatternMatcher.java
@@ -0,0 +1,45 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import org.apache.tiles.Definition;
+
+/**
+ * Matches a definition name to a definition, through pattern-matching. The
+ * matched pattern should be a single one.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface DefinitionPatternMatcher {
+
+    /**
+     * Creates a definition, given the definition name, through the use of
+     * pattern matching.
+     *
+     * @param definitionName The definition name to match.
+     * @return The created definition, if matched, or <code>null</code> if not
+     * matched.
+     * @since 2.2.0
+     */
+    Definition createDefinition(String definitionName);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/DefinitionPatternMatcherFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/DefinitionPatternMatcherFactory.java
new file mode 100644
index 0000000..64a0deb
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/DefinitionPatternMatcherFactory.java
@@ -0,0 +1,47 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import org.apache.tiles.Definition;
+
+/**
+ * Creates a new definition pattern matcher for the given pattern and the given
+ * base definition with pattern expressions.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface DefinitionPatternMatcherFactory {
+
+    /**
+     * Creates a new definition pattern matcher.
+     *
+     * @param pattern The pattern to be matched.
+     * @param definition The base definition. Created definitions by
+     * {@link DefinitionPatternMatcher#createDefinition(String)} will created
+     * with this one as a basis.
+     * @return The definition pattern matcher.
+     * @since 2.2.0
+     */
+    DefinitionPatternMatcher createDefinitionPatternMatcher(String pattern,
+            Definition definition);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternDefinitionResolver.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternDefinitionResolver.java
new file mode 100644
index 0000000..539f8dd
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternDefinitionResolver.java
@@ -0,0 +1,60 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import java.util.Map;
+
+import org.apache.tiles.Definition;
+
+/**
+ * Resolves a definition starting from patterns stored in definition maps.
+ *
+ * @param <T> The type of the customization key.
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface PatternDefinitionResolver<T> {
+
+    /**
+     * Stores definition patterns.
+     *
+     * @param localeDefsMap The map of definitions that may contain also
+     * patterns.
+     * @param customizationKey The customization key.
+     * @return The map of the definitions not recognized as containing
+     * definition patterns.
+     * @since 2.2.1
+     */
+    Map<String, Definition> storeDefinitionPatterns(Map<String, Definition> localeDefsMap,
+            T customizationKey);
+
+    /**
+     * Resolves a definition searching in all patterns for the requested
+     * customization key.
+     *
+     * @param name The name of the definition.
+     * @param customizationKey The customization key.
+     * @return The resolved definition.
+     * @since 2.2.0
+     */
+    Definition resolveDefinition(String name, T customizationKey);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternDefinitionResolverAware.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternDefinitionResolverAware.java
new file mode 100644
index 0000000..b353b34
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternDefinitionResolverAware.java
@@ -0,0 +1,40 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+/**
+ * It indicates an object that uses a {@link PatternDefinitionResolver}.
+ *
+ * @param <T> The type of the customization key.
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface PatternDefinitionResolverAware<T> {
+
+    /**
+     * Sets the pattern definition resolver to use.
+     *
+     * @param definitionResolver The pattern definition resolver.
+     * @since 2.2.0
+     */
+    void setPatternDefinitionResolver(PatternDefinitionResolver<T> definitionResolver);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternRecognizer.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternRecognizer.java
new file mode 100644
index 0000000..052fb03
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternRecognizer.java
@@ -0,0 +1,40 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+/**
+ * Checks if a pattern (or a candidate one) is recognized as a pattern.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface PatternRecognizer {
+
+    /**
+     * Checks if a pattern is recognized as a pattern.
+     *
+     * @param candidatePattern The pattern to check.
+     * @return <code>true</code> if the pattern has been recognized.
+     * @since 2.2.0
+     */
+    boolean isPatternRecognized(String candidatePattern);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternUtil.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternUtil.java
new file mode 100644
index 0000000..569416e
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PatternUtil.java
@@ -0,0 +1,226 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import java.text.MessageFormat;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.Expression;
+import org.apache.tiles.ListAttribute;
+
+/**
+ * Utilities for pattern matching and substitution.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public final class PatternUtil {
+
+    /**
+     * The root locale. Notice that this is a replacement for Locale.ROOT for
+     * Java 1.6.
+     */
+    private static final Locale ROOT_LOCALE = new Locale("", "");
+
+    /** Pattern to find {.*} occurrences that do not match {[0-9]+} so to prevent MessageFormat from crashing.
+     */
+    private static final Pattern INVALID_FORMAT_ELEMENT = Pattern.compile("\\Q{\\E[\\D^}]+\\Q}\\E");
+
+    /**
+     * Private constructor to avoid instantiation.
+     */
+    private PatternUtil() {
+    }
+
+    /**
+     * Creates a definition given its representation with wildcards and
+     * attribute values with placeholders, replacing real values into
+     * placeholders.
+     *
+     * @param d The definition to replace.
+     * @param name The name of the definition to be created.
+     * @param vars The variables to be substituted.
+     * @return The definition that can be rendered.
+     * @since 2.2.0
+     */
+    public static Definition replacePlaceholders(Definition d, String name,
+            Object... vars) {
+        Definition nudef = new Definition();
+
+        nudef.setExtends(replace(d.getExtends(), vars));
+        nudef.setName(name);
+        nudef.setPreparer(replace(d.getPreparer(), vars));
+        Attribute templateAttribute = d.getTemplateAttribute();
+        if (templateAttribute != null) {
+            nudef.setTemplateAttribute(replaceVarsInAttribute(
+                    templateAttribute, vars));
+        }
+
+        Set<String> attributeNames = d.getLocalAttributeNames();
+        if (attributeNames != null && !attributeNames.isEmpty()) {
+            for (String attributeName : attributeNames) {
+                Attribute attr = d.getLocalAttribute(attributeName);
+                Attribute nuattr = replaceVarsInAttribute(attr, vars);
+
+                nudef.putAttribute(replace(attributeName, vars), nuattr);
+            }
+        }
+
+        attributeNames = d.getCascadedAttributeNames();
+        if (attributeNames != null && !attributeNames.isEmpty()) {
+            for (String attributeName : attributeNames) {
+                Attribute attr = d.getCascadedAttribute(attributeName);
+                Attribute nuattr = replaceVarsInAttribute(attr, vars);
+
+                nudef.putAttribute(replace(attributeName, vars), nuattr, true);
+            }
+        }
+
+        return nudef;
+    }
+
+    /**
+     * Creates a new map that contains all the entries of the
+     * <code>defsMap</code> whose keys are contained in <code>keys</code>.
+     *
+     * @param map The map to read.
+     * @param keys The keys to extract.
+     * @param <K> The key of the map.
+     * @param <V> The value of the map.
+     * @return The extracted map.
+     * @since 2.2.1
+     */
+    public static <K, V> Map<K, V> createExtractedMap(Map<K, V> map, Set<K> keys) {
+        Map<K, V> retValue = new LinkedHashMap<K, V>();
+        for (K key : keys) {
+            retValue.put(key, map.get(key));
+        }
+        return retValue;
+    }
+
+    /**
+     * Replaces variables into an attribute.
+     *
+     * @param attr The attribute to be used as a basis, containing placeholders
+     * for variables.
+     * @param vars The variables to replace.
+     * @return A new instance of an attribute, whose properties have been
+     * replaced with variables' values.
+     */
+    private static Attribute replaceVarsInAttribute(Attribute attr,
+            Object... vars) {
+        Attribute nuattr;
+        if (attr instanceof ListAttribute) {
+            nuattr = replaceVarsInListAttribute((ListAttribute) attr, vars);
+        } else {
+            nuattr = replaceVarsInSimpleAttribute(attr, vars);
+        }
+        return nuattr;
+    }
+
+    /**
+     * Replaces variables into a simple (not list) attribute.
+     *
+     * @param attr The attribute to be used as a basis, containing placeholders
+     * for variables.
+     * @param vars The variables to replace.
+     * @return A new instance of an attribute, whose properties have been
+     * replaced with variables' values.
+     */
+    private static Attribute replaceVarsInSimpleAttribute(Attribute attr,
+            Object... vars) {
+        Attribute nuattr;
+        nuattr = new Attribute();
+
+        nuattr.setRole(replace(attr.getRole(), vars));
+        nuattr.setRenderer(attr.getRenderer());
+        Expression expressionObject = attr.getExpressionObject();
+        if (expressionObject != null) {
+            Expression newExpressionObject = Expression
+                    .createExpression(replace(expressionObject.getExpression(), vars), expressionObject.getLanguage());
+            nuattr.setExpressionObject(newExpressionObject);
+        }
+
+        Object value = attr.getValue();
+        if (value instanceof String) {
+            value = replace((String) value, vars);
+        }
+        nuattr.setValue(value);
+        return nuattr;
+    }
+
+    /**
+     * Replaces variables into a list attribute.
+     *
+     * @param listAttr The attribute to be used as a basis, containing attributes
+     * that may contain placeholders for variables.
+     * @param vars The variables to replace.
+     * @return A new instance of an attribute, whose properties have been
+     * replaced with variables' values.
+     */
+    private static Attribute replaceVarsInListAttribute(ListAttribute listAttr,
+            Object... vars) {
+        Attribute nuattr;
+        ListAttribute nuListAttr = new ListAttribute();
+        nuListAttr.setInherit(listAttr.isInherit());
+        List<Attribute> nuItems = nuListAttr.getValue();
+        for (Object item : listAttr.getValue()) {
+            Attribute child = (Attribute) item;
+            child = replaceVarsInAttribute(child, vars);
+            nuItems.add(child);
+        }
+        nuattr = nuListAttr;
+        return nuattr;
+    }
+
+    /**
+     * Replaces a string with placeholders using values of a variable map.
+     *
+     * @param st The string to replace.
+     * @param vars The variables.
+     * @return The replaced string.
+     */
+    private static String replace(String st, Object... vars) {
+        if (st != null && st.indexOf('{') >= 0) {
+            // remember the invalid "{...}" occurrences
+            Matcher m = INVALID_FORMAT_ELEMENT.matcher(st);
+            // replace them with markers
+            st = INVALID_FORMAT_ELEMENT.matcher(st).replaceAll("INVALID_FORMAT_ELEMENT");
+            // do the MessageFormat replacement (escaping quote characters)
+            st = new MessageFormat(st.replaceAll("'", "'''"), ROOT_LOCALE)
+                    .format(vars, new StringBuffer(), null).toString();
+            // return the markers to their original invalid occurrences
+            while (m.find()) {
+                st = st.replace("INVALID_FORMAT_ELEMENT", m.group());
+            }
+        }
+        return st;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PrefixedPatternDefinitionResolver.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PrefixedPatternDefinitionResolver.java
new file mode 100644
index 0000000..e5a3912
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/PrefixedPatternDefinitionResolver.java
@@ -0,0 +1,111 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.Expression;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This resolver allows the use of multiple pattern matching languages. The
+ * syntax of definition names must be <code>LANGUAGENAME:expression</code>.<br>
+ * The different languages must be registered through the use of
+ * {@link #registerDefinitionPatternMatcherFactory(String, DefinitionPatternMatcherFactory)}
+ * method before using this resolver.
+ *
+ * @param <T> The type of the customization key.
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class PrefixedPatternDefinitionResolver<T> extends
+        AbstractPatternDefinitionResolver<T> {
+
+    /**
+     * The logging object.
+     */
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    /**
+     * Matches languages names to the corresponding
+     * {@link DefinitionPatternMatcherFactory}.
+     */
+    private Map<String, DefinitionPatternMatcherFactory> language2matcherFactory;
+
+    /**
+     * Constructor.
+     *
+     * @since 2.2.0
+     */
+    public PrefixedPatternDefinitionResolver() {
+        language2matcherFactory = new HashMap<String, DefinitionPatternMatcherFactory>();
+    }
+
+    /**
+     * Registers a {@link DefinitionPatternMatcherFactory} connected to a
+     * particular language.
+     *
+     * @param language The name of the language.
+     * @param factory The pattern matcher factory to register.
+     * @since 2.2.0
+     */
+    public void registerDefinitionPatternMatcherFactory(String language,
+            DefinitionPatternMatcherFactory factory) {
+        language2matcherFactory.put(language, factory);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected Map<String, Definition> addDefinitionsAsPatternMatchers(
+            List<DefinitionPatternMatcher> matchers,
+            Map<String, Definition> defsMap) {
+        Set<String> excludedKeys = new LinkedHashSet<String>();
+        for (Map.Entry<String, Definition> entry : defsMap.entrySet()) {
+            String key = entry.getKey();
+            Expression expression = Expression
+                    .createExpressionFromDescribedExpression(key);
+            if (expression.getLanguage() != null) {
+                DefinitionPatternMatcherFactory factory = language2matcherFactory
+                        .get(expression.getLanguage());
+                if (factory != null) {
+                    DefinitionPatternMatcher matcher = factory
+                            .createDefinitionPatternMatcher(expression
+                                    .getExpression(), new Definition(entry
+                                    .getValue()));
+                    matchers.add(matcher);
+                } else {
+                    logger.warn("Cannot find a DefinitionPatternMatcherFactory for expression '{}'",
+                            key);
+                }
+            } else {
+                excludedKeys.add(key);
+            }
+        }
+        return PatternUtil.createExtractedMap(defsMap, excludedKeys);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/package-info.java
new file mode 100644
index 0000000..e41a60d
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes to manage pattern matching in definition names, and substitution in attributes.
+ */
+package org.apache.tiles.definition.pattern;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcher.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcher.java
new file mode 100644
index 0000000..6442d33
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcher.java
@@ -0,0 +1,76 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern.regexp;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.pattern.DefinitionPatternMatcher;
+import org.apache.tiles.definition.pattern.PatternUtil;
+
+/**
+ * Matches regular expression patterns in definitions.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class RegexpDefinitionPatternMatcher implements DefinitionPatternMatcher {
+
+    /**
+     * The pattern to match.
+     */
+    private Pattern pattern;
+
+    /**
+     * The definition to use as a basis.
+     */
+    private Definition definition;
+
+    /**
+     * Constructor.
+     *
+     * @param pattern The pattern to use, in string form.
+     * @param definition The definition to use as a basis.
+     * @since 2.2.0
+     */
+    public RegexpDefinitionPatternMatcher(String pattern, Definition definition) {
+        this.pattern = Pattern.compile(pattern);
+        this.definition = definition;
+    }
+
+    /** {@inheritDoc} */
+    public Definition createDefinition(String definitionName) {
+        Definition retValue = null;
+        Matcher matcher = pattern.matcher(definitionName);
+        if (matcher.matches()) {
+            int groupCount = matcher.groupCount() + 1;
+            Object[] vars = new Object[groupCount];
+            for (int i = 0; i < groupCount; i++) {
+                vars[i] = matcher.group(i);
+            }
+            retValue = PatternUtil.replacePlaceholders(definition,
+                    definitionName, vars);
+        }
+        return retValue;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcherFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcherFactory.java
new file mode 100644
index 0000000..2c17006
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcherFactory.java
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern.regexp;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.pattern.DefinitionPatternMatcher;
+import org.apache.tiles.definition.pattern.DefinitionPatternMatcherFactory;
+
+/**
+ * Creates instances of {@link RegexpDefinitionPatternMatcher}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class RegexpDefinitionPatternMatcherFactory implements
+        DefinitionPatternMatcherFactory {
+
+    /** {@inheritDoc} */
+    public DefinitionPatternMatcher createDefinitionPatternMatcher(
+            String pattern, Definition definition) {
+        return new RegexpDefinitionPatternMatcher(pattern, definition);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/regexp/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/regexp/package-info.java
new file mode 100644
index 0000000..f1fce91
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/regexp/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * In Tiles it is possible to use regular expression patterns thanks to this package.
+ */
+package org.apache.tiles.definition.pattern.regexp;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcher.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcher.java
new file mode 100644
index 0000000..033cd6a
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcher.java
@@ -0,0 +1,84 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern.wildcard;
+
+import java.util.List;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.pattern.DefinitionPatternMatcher;
+import org.apache.tiles.definition.pattern.PatternUtil;
+import org.apache.tiles.util.WildcardHelper;
+
+/**
+ * Matches wildcard patterns in definitions.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class WildcardDefinitionPatternMatcher implements
+        DefinitionPatternMatcher {
+
+    /**
+     * Allows to parse wildcard expressions and to recognize substitution
+     * variables.
+     */
+    private WildcardHelper wildcardHelper;
+
+    /**
+     * The definition to use as a basis.
+     */
+    private Definition definition;
+
+    /**
+     * The pattern to use.
+     */
+    private int[] pattern;
+
+    /**
+     * Constructor.
+     *
+     * @param pattern The pattern to use, in string form.
+     * @param definition The definition to use as a basis.
+     * @param wildcardHelper The object that parses wildcard expressions and
+     * recognized substitution variables.
+     * @since 2.2.0
+     */
+    public WildcardDefinitionPatternMatcher(String pattern,
+            Definition definition, WildcardHelper wildcardHelper) {
+        this.wildcardHelper = wildcardHelper;
+        this.definition = definition;
+        this.pattern = wildcardHelper.compilePattern(pattern);
+    }
+
+    /** {@inheritDoc} */
+    public Definition createDefinition(String definitionName) {
+        List<String> vars = wildcardHelper.match(definitionName, pattern);
+        Definition d = null;
+
+        if (vars != null) {
+            d = PatternUtil.replacePlaceholders(definition, definitionName,
+                    vars.toArray());
+        }
+
+        return d;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcherFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcherFactory.java
new file mode 100644
index 0000000..6cb05b5
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcherFactory.java
@@ -0,0 +1,55 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern.wildcard;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.pattern.DefinitionPatternMatcher;
+import org.apache.tiles.definition.pattern.DefinitionPatternMatcherFactory;
+import org.apache.tiles.definition.pattern.PatternRecognizer;
+import org.apache.tiles.util.WildcardHelper;
+
+/**
+ * Creates instances of {@link WildcardDefinitionPatternMatcher}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class WildcardDefinitionPatternMatcherFactory implements
+        DefinitionPatternMatcherFactory, PatternRecognizer {
+
+    /**
+     * Allows to parse wildcard expressions and to recognize substitution
+     * variables.
+     */
+    private WildcardHelper wildcardHelper = new WildcardHelper();
+
+    /** {@inheritDoc} */
+    public DefinitionPatternMatcher createDefinitionPatternMatcher(
+            String pattern, Definition definition) {
+        return new WildcardDefinitionPatternMatcher(pattern, definition, wildcardHelper);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isPatternRecognized(String candidatePattern) {
+        return candidatePattern.indexOf('*') >= 0;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/wildcard/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/wildcard/package-info.java
new file mode 100644
index 0000000..9de2624
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/definition/pattern/wildcard/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * In Tiles it is possible to use wildcard patterns thanks to this package.
+ */
+package org.apache.tiles.definition.pattern.wildcard;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/doc-files/image001.gif b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/doc-files/image001.gif
new file mode 100644
index 0000000..f675c12
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/doc-files/image001.gif
Binary files differ
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AbstractAttributeEvaluator.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AbstractAttributeEvaluator.java
new file mode 100644
index 0000000..82542a6
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AbstractAttributeEvaluator.java
@@ -0,0 +1,54 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.evaluator;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Expression;
+import org.apache.tiles.request.Request;
+
+/**
+ * Abstract class to link a correct evaluation of an attribute, by evaluating
+ * {@link Attribute#getValue()} and then {@link Attribute#getExpressionObject()}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.2
+ */
+public abstract class AbstractAttributeEvaluator implements AttributeEvaluator {
+
+    /** {@inheritDoc} */
+    public Object evaluate(Attribute attribute, Request request) {
+        if (attribute == null) {
+            throw new IllegalArgumentException("The attribute cannot be null");
+        }
+
+        Object retValue = attribute.getValue();
+
+        if (retValue == null) {
+            Expression expression = attribute.getExpressionObject();
+            if (expression != null) {
+                retValue = evaluate(attribute.getExpressionObject()
+                        .getExpression(), request);
+            }
+        }
+
+        return retValue;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AttributeEvaluator.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AttributeEvaluator.java
new file mode 100644
index 0000000..ae5839a
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AttributeEvaluator.java
@@ -0,0 +1,53 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.evaluator;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.request.Request;
+
+/**
+ * It represents an object that resolves a string to return an object.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public interface AttributeEvaluator {
+
+    /**
+     * Evaluates an expression.
+     *
+     * @param expression The expression to evaluate.
+     * @param request The request object.
+     * @return The evaluated object.
+     * @since 2.1.0
+     */
+    Object evaluate(String expression, Request request);
+
+    /**
+     * Evaluates an attribute value.
+     *
+     * @param attribute The attribute to evaluate.
+     * @param request The request object.
+     * @return The evaluated object.
+     * @since 2.1.0
+     */
+    Object evaluate(Attribute attribute, Request request);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AttributeEvaluatorFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AttributeEvaluatorFactory.java
new file mode 100644
index 0000000..ae77f08
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AttributeEvaluatorFactory.java
@@ -0,0 +1,51 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.evaluator;
+
+import org.apache.tiles.Attribute;
+
+/**
+ * Creates an attribute evaluator using the language or an attribute.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface AttributeEvaluatorFactory {
+
+    /**
+     * Creates and attribute evaluator using an attribute.
+     *
+     * @param attribute The attribute used to obtain the evaluator.
+     * @return The attribute evaluator. It must not be <code>null</code>.
+     * @since 2.2.0
+     */
+    AttributeEvaluator getAttributeEvaluator(Attribute attribute);
+
+    /**
+     * Creates and attribute evaluator for the given expression language.
+     *
+     * @param language The name of the expression language.
+     * @return The attribute evaluator. It must not be <code>null</code>.
+     * @since 2.2.0
+     */
+    AttributeEvaluator getAttributeEvaluator(String language);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AttributeEvaluatorFactoryAware.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AttributeEvaluatorFactoryAware.java
new file mode 100644
index 0000000..9f56716
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/AttributeEvaluatorFactoryAware.java
@@ -0,0 +1,39 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.evaluator;
+
+/**
+ * It represents an object that can use an {@link AttributeEvaluatorFactory}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface AttributeEvaluatorFactoryAware {
+
+    /**
+     * Sets the attribute evaluator factory.
+     *
+     * @param attributeEvaluatorFactory The attribute evaluator factory to use.
+     * @since 2.2.0
+     */
+    void setAttributeEvaluatorFactory(AttributeEvaluatorFactory attributeEvaluatorFactory);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/BasicAttributeEvaluatorFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/BasicAttributeEvaluatorFactory.java
new file mode 100644
index 0000000..c4c396b
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/BasicAttributeEvaluatorFactory.java
@@ -0,0 +1,93 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.evaluator;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Expression;
+
+/**
+ * Basic implementation of {@link AttributeEvaluatorFactory}. It supports a
+ * default attribute evaluator, in case the language is not recognized.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class BasicAttributeEvaluatorFactory implements
+        AttributeEvaluatorFactory {
+
+    /**
+     * The default evaluator to return if it is not found in the map of known
+     * languages.
+     */
+    private AttributeEvaluator defaultEvaluator;
+
+    /**
+     * Maps names of expression languages to their attribute evaluator.
+     *
+     * @since 2.2.0
+     */
+    private Map<String, AttributeEvaluator> language2evaluator;
+
+    /**
+     * Constructor.
+     *
+     * @param defaultEvaluator The default evaluator to return if it is not
+     * found in the map of known languages.
+     * @since 2.2.0
+     */
+    public BasicAttributeEvaluatorFactory(AttributeEvaluator defaultEvaluator) {
+        this.defaultEvaluator = defaultEvaluator;
+        language2evaluator = new HashMap<String, AttributeEvaluator>();
+    }
+
+    /**
+     * Registers a known expression language with its attribute evaluator.
+     *
+     * @param language The name of the expression language.
+     * @param evaluator The associated attribute evaluator.
+     * @since 2.2.0
+     */
+    public void registerAttributeEvaluator(String language, AttributeEvaluator evaluator) {
+        language2evaluator.put(language, evaluator);
+    }
+
+    /** {@inheritDoc} */
+    public AttributeEvaluator getAttributeEvaluator(String language) {
+        AttributeEvaluator retValue = language2evaluator.get(language);
+        if (retValue == null) {
+            retValue = defaultEvaluator;
+        }
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    public AttributeEvaluator getAttributeEvaluator(Attribute attribute) {
+        Expression expression = attribute.getExpressionObject();
+        if (expression != null) {
+            return getAttributeEvaluator(expression.getLanguage());
+        }
+        return defaultEvaluator;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/EvaluationException.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/EvaluationException.java
new file mode 100644
index 0000000..2b05ca3
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/EvaluationException.java
@@ -0,0 +1,72 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.evaluator;
+
+import org.apache.tiles.TilesException;
+
+/**
+ * Exception raised when an expression language evaluation fails.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class EvaluationException extends TilesException {
+
+    /**
+     * Constructor.
+     *
+     * @since 2.2.0
+     */
+    public EvaluationException() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message-
+     * @since 2.2.0
+     */
+    public EvaluationException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e The cause.
+     * @since 2.2.0
+     */
+    public EvaluationException(Throwable e) {
+        super(e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message-
+     * @param e The cause.
+     * @since 2.2.0
+     */
+    public EvaluationException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/impl/DirectAttributeEvaluator.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/impl/DirectAttributeEvaluator.java
new file mode 100644
index 0000000..6a9d0f4
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/impl/DirectAttributeEvaluator.java
@@ -0,0 +1,39 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.evaluator.impl;
+
+import org.apache.tiles.evaluator.AbstractAttributeEvaluator;
+import org.apache.tiles.request.Request;
+
+/**
+ * Resolves a string and returns the string itself. It is useful for backward
+ * compatibility.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class DirectAttributeEvaluator extends AbstractAttributeEvaluator {
+
+    /** {@inheritDoc} */
+    public Object evaluate(String expression, Request request) {
+        return expression;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/impl/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/impl/package-info.java
new file mode 100644
index 0000000..de88542
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/impl/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes to manage attribute value evaluation.
+ */
+package org.apache.tiles.evaluator.impl;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/package-info.java
new file mode 100644
index 0000000..6ba1ab1
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/evaluator/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Interfaces to manage attribute value evaluation.
+ */
+package org.apache.tiles.evaluator;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/AbstractTilesContainerFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/AbstractTilesContainerFactory.java
new file mode 100644
index 0000000..9111fc5
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/AbstractTilesContainerFactory.java
@@ -0,0 +1,53 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.factory;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.ApplicationContext;
+
+/**
+ * Abstract Factory that creates instances of {@link TilesContainerFactory}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public abstract class AbstractTilesContainerFactory {
+
+    /**
+     * Initialization parameter that represents the container factory class
+     * name.
+     *
+     * @since 2.1.0
+     */
+    public static final String CONTAINER_FACTORY_INIT_PARAM =
+        "org.apache.tiles.factory.AbstractTilesContainerFactory";
+
+    /**
+     * Creates a Tiles container.
+     *
+     * @param applicationContext The Tiles application context object.
+     * @return The created container.
+     * @throws TilesContainerFactoryException If something goes wrong during
+     * instantiation.
+     * @since 2.1.1
+     */
+    public abstract TilesContainer createContainer(ApplicationContext applicationContext);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/BasicTilesContainerFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/BasicTilesContainerFactory.java
new file mode 100644
index 0000000..2bc10ad
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/BasicTilesContainerFactory.java
@@ -0,0 +1,400 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.factory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.definition.DefinitionsFactory;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory;
+import org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO;
+import org.apache.tiles.definition.dao.DefinitionDAO;
+import org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO;
+import org.apache.tiles.definition.digester.DigesterDefinitionsReader;
+import org.apache.tiles.definition.pattern.BasicPatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.PatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.PatternDefinitionResolverAware;
+import org.apache.tiles.definition.pattern.wildcard.WildcardDefinitionPatternMatcherFactory;
+import org.apache.tiles.evaluator.AttributeEvaluatorFactory;
+import org.apache.tiles.evaluator.BasicAttributeEvaluatorFactory;
+import org.apache.tiles.evaluator.impl.DirectAttributeEvaluator;
+import org.apache.tiles.impl.BasicTilesContainer;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.locale.impl.DefaultLocaleResolver;
+import org.apache.tiles.preparer.factory.BasicPreparerFactory;
+import org.apache.tiles.preparer.factory.PreparerFactory;
+import org.apache.tiles.renderer.DefinitionRenderer;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.render.BasicRendererFactory;
+import org.apache.tiles.request.render.ChainedDelegateRenderer;
+import org.apache.tiles.request.render.DispatchRenderer;
+import org.apache.tiles.request.render.Renderer;
+import org.apache.tiles.request.render.RendererFactory;
+import org.apache.tiles.request.render.StringRenderer;
+
+/**
+ * Factory that builds a standard Tiles container using only Java code.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class BasicTilesContainerFactory extends AbstractTilesContainerFactory {
+
+    /**
+     * The string renderer name.
+     */
+    protected static final String STRING_RENDERER_NAME = "string";
+
+    /**
+     * The template renderer name.
+     */
+    protected static final String TEMPLATE_RENDERER_NAME = "template";
+
+    /**
+     * The definition renderer name.
+     */
+    protected static final String DEFINITION_RENDERER_NAME = "definition";
+
+    /** {@inheritDoc} */
+    @Override
+    public TilesContainer createContainer(ApplicationContext applicationContext) {
+        BasicTilesContainer container = instantiateContainer(applicationContext);
+        container.setApplicationContext(applicationContext);
+        LocaleResolver resolver = createLocaleResolver(applicationContext);
+        container.setDefinitionsFactory(createDefinitionsFactory(applicationContext,
+                resolver));
+        AttributeEvaluatorFactory attributeEvaluatorFactory = createAttributeEvaluatorFactory(
+                applicationContext, resolver);
+        container.setAttributeEvaluatorFactory(attributeEvaluatorFactory);
+        container.setPreparerFactory(createPreparerFactory(applicationContext));
+        TilesContainer injectedContainer = createDecoratedContainer(container, applicationContext);
+        container.setRendererFactory(createRendererFactory(applicationContext,
+                injectedContainer, attributeEvaluatorFactory));
+        return injectedContainer;
+    }
+
+    /**
+     * Instantiate the container, without initialization.
+     *
+     * @param context The Tiles application context object.
+     * @return The instantiated container.
+     * @since 2.1.1
+     */
+    protected BasicTilesContainer instantiateContainer(
+            ApplicationContext context) {
+        return new BasicTilesContainer();
+    }
+
+    /**
+     * Instantiate the container that will be injected to child objects.
+     *
+     * @param originalContainer The original instantiated container.
+     * @param context The Tiles application context object.
+     * @return The instantiated container.
+     * @since 3.0.0
+     */
+    protected TilesContainer createDecoratedContainer(TilesContainer originalContainer,
+            ApplicationContext context) {
+        return originalContainer;
+    }
+
+    /**
+     * Creates the definitions factory. By default it creates a
+     * {@link UnresolvingLocaleDefinitionsFactory} with default dependencies.
+     *
+     * @param applicationContext The Tiles application context.
+     * @param resolver The locale resolver.
+     * @return The definitions factory.
+     * @since 2.1.1
+     */
+    protected DefinitionsFactory createDefinitionsFactory(ApplicationContext applicationContext,
+            LocaleResolver resolver) {
+        UnresolvingLocaleDefinitionsFactory factory = instantiateDefinitionsFactory(
+                applicationContext, resolver);
+        factory.setLocaleResolver(resolver);
+        factory.setDefinitionDAO(createLocaleDefinitionDao(applicationContext,
+                resolver));
+        return factory;
+    }
+
+    /**
+     * Instantiate a new definitions factory based on Locale.
+     * @param applicationContext The Tiles application context.
+     * @param resolver The locale resolver.
+     * @return The definitions factory.
+     * @since 2.2.1
+     */
+    protected UnresolvingLocaleDefinitionsFactory instantiateDefinitionsFactory(
+            ApplicationContext applicationContext,
+            LocaleResolver resolver) {
+        return new UnresolvingLocaleDefinitionsFactory();
+    }
+
+
+    /**
+     * Instantiate (and does not initialize) a Locale-based definition DAO.
+     * @param applicationContext The Tiles application context.
+     * @param resolver The locale resolver.
+     * @return The definition DAO.
+     * @since 2.1.1
+     */
+    protected BaseLocaleUrlDefinitionDAO instantiateLocaleDefinitionDao(ApplicationContext applicationContext,
+            LocaleResolver resolver) {
+        ResolvingLocaleUrlDefinitionDAO dao = new ResolvingLocaleUrlDefinitionDAO(applicationContext);
+        return dao;
+    }
+
+    /**
+     * Creates a Locale-based definition DAO.
+     * @param applicationContext The Tiles application context.
+     * @param resolver The locale resolver.
+     * @return The definition DAO.
+     * @since 2.1.1
+     */
+    @SuppressWarnings("unchecked")
+    protected DefinitionDAO<Locale> createLocaleDefinitionDao(ApplicationContext applicationContext,
+            LocaleResolver resolver) {
+        BaseLocaleUrlDefinitionDAO definitionDao = instantiateLocaleDefinitionDao(
+                applicationContext, resolver);
+        definitionDao.setReader(createDefinitionsReader(applicationContext));
+        definitionDao.setSources(getSources(applicationContext));
+        if (definitionDao instanceof PatternDefinitionResolverAware) {
+            ((PatternDefinitionResolverAware<Locale>) definitionDao)
+                    .setPatternDefinitionResolver(createPatternDefinitionResolver(Locale.class));
+        }
+        return definitionDao;
+    }
+
+    /**
+     * Creates the locale resolver. By default it creates a
+     * {@link DefaultLocaleResolver}.
+     * @param applicationContext The Tiles application context.
+     * @return The locale resolver.
+     * @since 2.1.1
+     */
+    protected LocaleResolver createLocaleResolver(ApplicationContext applicationContext) {
+        return new DefaultLocaleResolver();
+    }
+
+    /**
+     * Creates the definitions reader. By default it creates a
+     * {@link DigesterDefinitionsReader}.
+     * @param applicationContext The Tiles application context.
+     * @return The definitions reader.
+     * @since 2.1.1
+     */
+    protected DefinitionsReader createDefinitionsReader(
+            ApplicationContext applicationContext) {
+        return new DigesterDefinitionsReader();
+    }
+
+    /**
+     * Returns a list containing the resources to be parsed. By default, it returns a
+     * list containing the resource at "/WEB-INF/tiles.xml".
+     * @param applicationContext The Tiles application context.
+     * @return The resources.
+     * @since 2.1.1
+     */
+    protected List<ApplicationResource> getSources(ApplicationContext applicationContext) {
+        List<ApplicationResource> retValue = new ArrayList<ApplicationResource>(1);
+        retValue.add(applicationContext.getResource("/WEB-INF/tiles.xml"));
+        return retValue;
+    }
+
+    /**
+     * Creates the attribute evaluator factory to use. By default it returns a
+     * {@link BasicAttributeEvaluatorFactory} containing the
+     * {@link DirectAttributeEvaluator} as the default evaluator.
+     *
+     * @param applicationContext The Tiles application context.
+     * @param resolver The locale resolver.
+     * @return The evaluator factory.
+     * @since 2.2.0
+     */
+    protected AttributeEvaluatorFactory createAttributeEvaluatorFactory(
+            ApplicationContext applicationContext,
+            LocaleResolver resolver) {
+        return new BasicAttributeEvaluatorFactory(new DirectAttributeEvaluator());
+    }
+
+    /**
+     * Creates the preparer factory to use. By default it returns a
+     * {@link BasicPreparerFactory}.
+     * @param applicationContext The Tiles application context.
+     * @return The preparer factory.
+     * @since 2.1.1
+     */
+    protected PreparerFactory createPreparerFactory(ApplicationContext applicationContext) {
+        return new BasicPreparerFactory();
+    }
+
+    /**
+     * Creates a renderer factory. By default it returns a
+     * {@link BasicRendererFactory}, composed of an
+     * {@link UntypedAttributeRenderer} as default, and delegates of
+     * {@link StringRenderer}, {@link DispatchRenderer},
+     * {@link DefinitionRenderer}.
+     *
+     * @param applicationContext The Tiles application context.
+     * @param container The container.
+     * @param attributeEvaluatorFactory The attribute evaluator factory.
+     * @return The renderer factory.
+     * @since 2.2.0
+     */
+    protected RendererFactory createRendererFactory(ApplicationContext applicationContext,
+            TilesContainer container,
+            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+        BasicRendererFactory retValue = new BasicRendererFactory();
+        registerAttributeRenderers(retValue, applicationContext, container,
+                attributeEvaluatorFactory);
+        retValue.setDefaultRenderer(createDefaultAttributeRenderer(retValue,
+                applicationContext, container, attributeEvaluatorFactory));
+        return retValue;
+    }
+
+    /**
+     * Creates the default attribute renderer. By default it is an
+     * {@link ChainedDelegateRenderer}.
+     *
+     * @param rendererFactory The renderer factory to configure.
+     * @param applicationContext The Tiles application context.
+     * @param container The container.
+     * @param attributeEvaluatorFactory The attribute evaluator factory.
+     * @return The default attribute renderer.
+     * @since 3.0.0
+     */
+    protected Renderer createDefaultAttributeRenderer(
+            BasicRendererFactory rendererFactory,
+            ApplicationContext applicationContext,
+            TilesContainer container,
+            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+        ChainedDelegateRenderer retValue = new ChainedDelegateRenderer();
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(DEFINITION_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(TEMPLATE_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(STRING_RENDERER_NAME));
+        return retValue;
+    }
+
+    /**
+     * Creates a new pattern definition resolver. By default, it instantiate a
+     * {@link BasicPatternDefinitionResolver} with
+     * {@link WildcardDefinitionPatternMatcherFactory} to manage wildcard
+     * substitution.
+     *
+     * @param <T> The type of the customization key.
+     * @param customizationKeyClass The customization key class.
+     * @return The pattern definition resolver.
+     * @since 2.2.0
+     */
+    protected <T> PatternDefinitionResolver<T> createPatternDefinitionResolver(
+            Class<T> customizationKeyClass) {
+        WildcardDefinitionPatternMatcherFactory definitionPatternMatcherFactory =
+            new WildcardDefinitionPatternMatcherFactory();
+        return new BasicPatternDefinitionResolver<T>(
+                definitionPatternMatcherFactory,
+                definitionPatternMatcherFactory);
+    }
+
+    /**
+     * Registers attribute renderers in a {@link BasicRendererFactory}. By
+     * default, it registers delegates to {@link StringRenderer},
+     * {@link DispatchRenderer} and {@link DefinitionRenderer}.
+     *
+     * @param rendererFactory The renderer factory to configure.
+     * @param applicationContext The Tiles application context.
+     * @param container The container.
+     * @param attributeEvaluatorFactory The attribute evaluator factory.
+     * @since 2.2.0
+     */
+    protected void registerAttributeRenderers(
+            BasicRendererFactory rendererFactory,
+            ApplicationContext applicationContext,
+            TilesContainer container,
+            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+        rendererFactory.registerRenderer(STRING_RENDERER_NAME,
+                createStringAttributeRenderer(rendererFactory,
+                        applicationContext, container, attributeEvaluatorFactory));
+        rendererFactory.registerRenderer(TEMPLATE_RENDERER_NAME,
+                createTemplateAttributeRenderer(rendererFactory,
+                        applicationContext, container, attributeEvaluatorFactory));
+        rendererFactory.registerRenderer(DEFINITION_RENDERER_NAME,
+                createDefinitionAttributeRenderer(rendererFactory,
+                        applicationContext, container, attributeEvaluatorFactory));
+    }
+
+    /**
+     * Creates an attribute renderer to render strings.
+     *
+     * @param rendererFactory The renderer factory to configure.
+     * @param applicationContext The Tiles application context.
+     * @param container The container.
+     * @param attributeEvaluatorFactory The attribute evaluator factory.
+     * @return The renderer.
+     * @since 3.0.0
+     */
+    protected Renderer createStringAttributeRenderer(
+            BasicRendererFactory rendererFactory,
+            ApplicationContext applicationContext,
+            TilesContainer container,
+            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+        return new StringRenderer();
+    }
+
+    /**
+     * Creates a {@link AttributeRenderer} that uses a {@link DispatchRenderer}.
+     *
+     * @param rendererFactory The renderer factory to configure.
+     * @param applicationContext The Tiles application context.
+     * @param container The container.
+     * @param attributeEvaluatorFactory The attribute evaluator factory.
+     * @return The renderer.
+     * @since 2.2.1
+     */
+    protected Renderer createTemplateAttributeRenderer(
+            BasicRendererFactory rendererFactory,
+            ApplicationContext applicationContext,
+            TilesContainer container,
+            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+        return new DispatchRenderer();
+    }
+
+    /**
+     * Creates a {@link AttributeRenderer} using a {@link DefinitionRenderer}.
+     *
+     * @param rendererFactory The renderer factory to configure.
+     * @param applicationContext The Tiles application context.
+     * @param container The container.
+     * @param attributeEvaluatorFactory The attribute evaluator factory.
+     * @return The renderer.
+     * @since 3.0.0
+     */
+    protected Renderer createDefinitionAttributeRenderer(
+            BasicRendererFactory rendererFactory,
+            ApplicationContext applicationContext,
+            TilesContainer container,
+            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+        return new DefinitionRenderer(container);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/TilesContainerFactoryException.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/TilesContainerFactoryException.java
new file mode 100644
index 0000000..18b8595
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/TilesContainerFactoryException.java
@@ -0,0 +1,72 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.factory;
+
+import org.apache.tiles.TilesException;
+
+/**
+ * Indicates that something went wrong in {@link TilesContainerFactory} use.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class TilesContainerFactoryException extends TilesException {
+
+    /**
+     * Constructor.
+     *
+     * @since 2.1.0
+     */
+    public TilesContainerFactoryException() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @since 2.1.0
+     */
+    public TilesContainerFactoryException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e The exception to be wrapped.
+     * @since 2.1.0
+     */
+    public TilesContainerFactoryException(Throwable e) {
+        super(e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @param e The exception to be wrapped.
+     * @since 2.1.0
+     */
+    public TilesContainerFactoryException(String message, Throwable e) {
+        super(message, e);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/package-info.java
new file mode 100644
index 0000000..9223e13
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/factory/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Factory classes, to allow creation of container instances.
+ */
+package org.apache.tiles.factory;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/BasicTilesContainer.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/BasicTilesContainer.java
new file mode 100644
index 0000000..05ad174
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/BasicTilesContainer.java
@@ -0,0 +1,402 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.impl;
+
+import java.io.IOException;
+import java.util.Deque;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.BasicAttributeContext;
+import org.apache.tiles.Definition;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.definition.DefinitionsFactory;
+import org.apache.tiles.definition.NoSuchDefinitionException;
+import org.apache.tiles.evaluator.AttributeEvaluator;
+import org.apache.tiles.evaluator.AttributeEvaluatorFactory;
+import org.apache.tiles.evaluator.AttributeEvaluatorFactoryAware;
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.preparer.factory.NoSuchPreparerException;
+import org.apache.tiles.preparer.factory.PreparerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.render.CannotRenderException;
+import org.apache.tiles.request.render.Renderer;
+import org.apache.tiles.request.render.RendererFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Basic implementation of the tiles container interface.
+ * In most cases, this container will be customized by
+ * injecting customized services, not necessarily by
+ * override the container
+ *
+ * @since 2.0
+ * @version $Rev$ $Date$
+ */
+public class BasicTilesContainer implements TilesContainer,
+        AttributeEvaluatorFactoryAware {
+
+    /**
+     * Name used to store attribute context stack.
+     */
+    private static final String ATTRIBUTE_CONTEXT_STACK =
+        "org.apache.tiles.AttributeContext.STACK";
+
+    /**
+     * Log instance for all BasicTilesContainer
+     * instances.
+     */
+    private final Logger log = LoggerFactory
+            .getLogger(BasicTilesContainer.class);
+
+    /**
+     * The Tiles application context object.
+     */
+    private ApplicationContext context;
+
+    /**
+     * The definitions factory.
+     */
+    private DefinitionsFactory definitionsFactory;
+
+    /**
+     * The preparer factory.
+     */
+    private PreparerFactory preparerFactory;
+
+    /**
+     * The renderer factory.
+     */
+    private RendererFactory rendererFactory;
+
+    /**
+     * The attribute evaluator.
+     */
+    private AttributeEvaluatorFactory attributeEvaluatorFactory;
+
+    /** {@inheritDoc} */
+    public AttributeContext startContext(Request request) {
+        AttributeContext context = new BasicAttributeContext();
+        Deque<AttributeContext>  stack = getContextStack(request);
+        if (!stack.isEmpty()) {
+            AttributeContext parent = stack.peek();
+            context.inheritCascadedAttributes(parent);
+        }
+        stack.push(context);
+        return context;
+    }
+
+    /** {@inheritDoc} */
+    public void endContext(Request request) {
+        popContext(request);
+    }
+
+    /** {@inheritDoc} */
+    public void renderContext(Request request) {
+        AttributeContext attributeContext = getAttributeContext(request);
+
+        render(request, attributeContext);
+    }
+
+    /**
+     * Returns the Tiles application context used by this container.
+     *
+     * @return the application context for this container.
+     */
+    public ApplicationContext getApplicationContext() {
+        return context;
+    }
+
+    /**
+     * Sets the Tiles application context to use.
+     *
+     * @param context The Tiles application context.
+     */
+    public void setApplicationContext(ApplicationContext context) {
+        this.context = context;
+    }
+
+    /** {@inheritDoc} */
+    public AttributeContext getAttributeContext(Request request) {
+        AttributeContext context = getContext(request);
+        if (context == null) {
+            context = new BasicAttributeContext();
+            pushContext(context, request);
+        }
+        return context;
+
+    }
+
+    /**
+     * Returns the definitions factory.
+     *
+     * @return The definitions factory used by this container.
+     */
+    public DefinitionsFactory getDefinitionsFactory() {
+        return definitionsFactory;
+    }
+
+    /**
+     * Set the definitions factory. This method first ensures
+     * that the container has not yet been initialized.
+     *
+     * @param definitionsFactory the definitions factory for this instance.
+     */
+    public void setDefinitionsFactory(DefinitionsFactory definitionsFactory) {
+        this.definitionsFactory = definitionsFactory;
+    }
+
+    /**
+     * Returns the preparer factory used by this container.
+     *
+     * @return return the preparerInstance factory used by this container.
+     */
+    public PreparerFactory getPreparerFactory() {
+        return preparerFactory;
+    }
+
+    /**
+     * Set the preparerInstance factory.  This method first ensures
+     * that the container has not yet been initialized.
+     *
+     * @param preparerFactory the preparerInstance factory for this conainer.
+     */
+    public void setPreparerFactory(PreparerFactory preparerFactory) {
+        this.preparerFactory = preparerFactory;
+    }
+
+    /**
+     * Sets the renderer instance factory.
+     *
+     * @param rendererFactory the renderer instance factory for this container.
+     * @since 2.1.0
+     */
+    public void setRendererFactory(RendererFactory rendererFactory) {
+        this.rendererFactory = rendererFactory;
+    }
+
+    /** {@inheritDoc} */
+    public void setAttributeEvaluatorFactory(
+            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+        this.attributeEvaluatorFactory = attributeEvaluatorFactory;
+    }
+
+    /** {@inheritDoc} */
+    public void prepare(String preparer, Request request) {
+        prepare(request, preparer, false);
+    }
+
+    /** {@inheritDoc} */
+    public void render(String definitionName, Request request) {
+        log.debug("Render request received for definition '{}'", definitionName);
+
+        Definition definition = getDefinition(definitionName, request);
+
+        if (definition == null) {
+            throw new NoSuchDefinitionException("Unable to find the definition '" + definitionName + "'");
+        }
+
+        render(definition, request);
+    }
+
+    /**
+     * Renders the specified definition.
+     * @param definition The definition to render.
+     * @param request The request context.
+     * @since 2.1.3
+     */
+    public void render(Definition definition, Request request) {
+        AttributeContext originalContext = getAttributeContext(request);
+        BasicAttributeContext subContext = new BasicAttributeContext(originalContext);
+        subContext.inherit(definition);
+
+        pushContext(subContext, request);
+
+        try {
+            render(request, subContext);
+        } finally {
+            popContext(request);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void render(Attribute attr, Request request)
+        throws IOException {
+        if (attr == null) {
+            throw new CannotRenderException("Cannot render a null attribute");
+        }
+
+        if (attr.isPermitted(request)) {
+            Renderer renderer = rendererFactory.getRenderer(attr.getRenderer());
+            Object value = evaluate(attr, request);
+            if (!(value instanceof String)) {
+                throw new CannotRenderException(
+                        "Cannot render an attribute that is not a string, toString returns: "
+                                + value);
+            }
+            renderer.render((String) value, request);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public Object evaluate(Attribute attribute, Request request) {
+        AttributeEvaluator evaluator = attributeEvaluatorFactory
+                .getAttributeEvaluator(attribute);
+        return evaluator.evaluate(attribute, request);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isValidDefinition(String definitionName, Request request) {
+        try {
+            Definition definition = getDefinition(definitionName, request);
+            return definition != null;
+        } catch (NoSuchDefinitionException nsde) {
+            log.debug("Cannot find definition '{}'", definitionName);
+            log.debug("Exception related to the not found definition", nsde);
+            return false;
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Definition getDefinition(String definitionName,
+            Request request) {
+        Definition definition =
+            definitionsFactory.getDefinition(definitionName, request);
+        return definition;
+    }
+
+    /**
+     * Returns the context stack.
+     *
+     * @param tilesContext The Tiles context object to use.
+     * @return The needed stack of contexts.
+     * @since 2.0.6
+     */
+    @SuppressWarnings("unchecked")
+    protected Deque<AttributeContext> getContextStack(Request tilesContext) {
+        Map<String, Object> requestScope = tilesContext.getContext("request");
+        Deque<AttributeContext> contextStack = (Deque<AttributeContext>) requestScope
+                .get(ATTRIBUTE_CONTEXT_STACK);
+        if (contextStack == null) {
+            contextStack = new LinkedList<AttributeContext>();
+            requestScope.put(ATTRIBUTE_CONTEXT_STACK, contextStack);
+        }
+
+        return contextStack;
+    }
+
+    /**
+     * Pushes a context object in the stack.
+     *
+     * @param context The context to push.
+     * @param tilesContext The Tiles context object to use.
+     * @since 2.0.6
+     */
+    protected void pushContext(AttributeContext context,
+            Request tilesContext) {
+        Deque<AttributeContext> contextStack = getContextStack(tilesContext);
+        contextStack.push(context);
+    }
+
+    /**
+     * Pops a context object out of the stack.
+     *
+     * @param tilesContext The Tiles context object to use.
+     * @return The popped context object.
+     * @since 2.0.6
+     */
+    protected AttributeContext popContext(Request tilesContext) {
+        Deque<AttributeContext> contextStack = getContextStack(tilesContext);
+        return contextStack.pop();
+    }
+
+    /**
+     * Get attribute context from request.
+     *
+     * @param tilesContext current Tiles application context.
+     * @return BasicAttributeContext or null if context is not found.
+     * @since 2.0.6
+     */
+    protected AttributeContext getContext(Request tilesContext) {
+        Deque<AttributeContext> contextStack = getContextStack(tilesContext);
+        if (!contextStack.isEmpty()) {
+            return contextStack.peek();
+        }
+        return null;
+    }
+
+    /**
+     * Execute a preparer.
+     *
+     * @param context The request context.
+     * @param preparerName The name of the preparer.
+     * @param ignoreMissing If <code>true</code> if the preparer is not found,
+     * it ignores the problem.
+     * @throws NoSuchPreparerException If the preparer is not found (and
+     * <code>ignoreMissing</code> is not set) or if the preparer itself threw an
+     * exception.
+     */
+    private void prepare(Request context, String preparerName, boolean ignoreMissing) {
+
+        log.debug("Prepare request received for '{}'", preparerName);
+
+        ViewPreparer preparer = preparerFactory.getPreparer(preparerName, context);
+        if (preparer == null && ignoreMissing) {
+            return;
+        }
+
+        if (preparer == null) {
+            throw new NoSuchPreparerException("Preparer '" + preparerName + " not found");
+        }
+
+        AttributeContext attributeContext = getContext(context);
+
+        preparer.execute(context, attributeContext);
+    }
+
+    /**
+     * Renders the specified attribute context.
+     *
+     * @param request The request context.
+     * @param attributeContext The context to render.
+     * @throws InvalidTemplateException If the template is not valid.
+     * @throws CannotRenderException If something goes wrong during rendering.
+     * @since 2.1.3
+     */
+    protected void render(Request request,
+            AttributeContext attributeContext) {
+
+        try {
+            if (attributeContext.getPreparer() != null) {
+                prepare(request, attributeContext.getPreparer(), true);
+            }
+
+            render(attributeContext.getTemplateAttribute(), request);
+        } catch (IOException e) {
+            throw new CannotRenderException(e.getMessage(), e);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/InvalidTemplateException.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/InvalidTemplateException.java
new file mode 100644
index 0000000..660c2d4
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/InvalidTemplateException.java
@@ -0,0 +1,71 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.impl;
+
+import org.apache.tiles.TilesException;
+
+/**
+ * An invalid template has been identified.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class InvalidTemplateException extends TilesException {
+
+    /**
+     * Constructor.
+     *
+     * @since 2.1.0
+     */
+    public InvalidTemplateException() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @since 2.1.0
+     */
+    public InvalidTemplateException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e The exception to be wrapped.
+     * @since 2.1.0
+     */
+    public InvalidTemplateException(Throwable e) {
+        super(e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @param e The exception to be wrapped.
+     * @since 2.1.0
+     */
+    public InvalidTemplateException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/CachingTilesContainer.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/CachingTilesContainer.java
new file mode 100644
index 0000000..608ba47
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/CachingTilesContainer.java
@@ -0,0 +1,242 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.impl.mgmt;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.TilesContainerWrapper;
+import org.apache.tiles.definition.NoSuchDefinitionException;
+import org.apache.tiles.mgmt.MutableTilesContainer;
+import org.apache.tiles.request.Request;
+
+/**
+ * Manages custom and configured definitions, so they can be used by the
+ * container, instead of using a simple {@link org.apache.tiles.definition.DefinitionsFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CachingTilesContainer extends TilesContainerWrapper implements MutableTilesContainer {
+
+    /**
+     * The default name of the attribute in which storing custom definitions.
+     */
+    private static final String DEFAULT_DEFINITIONS_ATTRIBUTE_NAME =
+        "org.apache.tiles.impl.mgmt.DefinitionManager.DEFINITIONS";
+
+    /**
+     * The name of the attribute in which storing custom definitions.
+     */
+    private String definitionsAttributeName;
+
+    /**
+     * Constructor.
+     * @param originalContainer The original container to wrap.
+     */
+    public CachingTilesContainer(TilesContainer originalContainer) {
+        super(originalContainer);
+        definitionsAttributeName = DEFAULT_DEFINITIONS_ATTRIBUTE_NAME;
+    }
+
+    /**
+     * Constructor.
+     * @param originalContainer The original container to wrap.
+     * @param definitionsAttributeName The name of the attribute in which
+     * storing custom definitions.
+     */
+    public CachingTilesContainer(TilesContainer originalContainer, String definitionsAttributeName) {
+        super(originalContainer);
+        this.definitionsAttributeName = definitionsAttributeName;
+        if (this.definitionsAttributeName == null) {
+            this.definitionsAttributeName = DEFAULT_DEFINITIONS_ATTRIBUTE_NAME;
+        }
+    }
+
+    /**
+     * Returns a definition by name.
+     *
+     * @param definition The name of the definition.
+     * @param request The current request.
+     * @return The requested definition, either main or custom.
+     * @throws org.apache.tiles.definition.DefinitionsFactoryException If
+     * something goes wrong when obtaining a main definition.
+     */
+    public Definition getDefinition(String definition,
+            Request request) {
+        Definition retValue = null;
+        retValue = getCustomDefinition(definition, request);
+        if (retValue == null) {
+            retValue = super.getDefinition(definition, request);
+        }
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isValidDefinition(String definition, Request request) {
+        if (getCustomDefinition(definition, request) != null) {
+            return true;
+        }
+        return super.isValidDefinition(definition, request);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void register(Definition definition, Request request) {
+        Map<String, Definition> definitions = getOrCreateDefinitions(request);
+        if (definition.getName() == null) {
+            definition.setName(getNextUniqueDefinitionName(definitions));
+        }
+
+        if (definition.isExtending()) {
+            this.resolveInheritance(definition, request);
+        }
+
+        definitions.put(definition.getName(), definition);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void render(String definition, Request request) {
+        Definition toRender = getDefinition(definition, request);
+        if (toRender == null) {
+            throw new NoSuchDefinitionException(
+                    "Cannot find definition named '" + definition + "'");
+        }
+        super.render(toRender, request);
+    }
+
+    /**
+     * Resolve inheritance.
+     * First, resolve parent's inheritance, then set template to the parent's
+     * template.
+     * Also copy attributes set in parent, and not set in child
+     * If instance doesn't extend anything, do nothing.
+     *
+     * @param definition The definition that needs to have its inheritances
+     * resolved.
+     * @param request The current request.
+     * @throws org.apache.tiles.definition.DefinitionsFactoryException If an
+     * inheritance can not be solved.
+     */
+    private void resolveInheritance(Definition definition,
+            Request request) {
+        // Already done, or not needed ?
+        if (!definition.isExtending()) {
+            return;
+        }
+
+        String parentDefinitionName = definition.getExtends();
+
+        boolean recurse = true;
+        Definition parent = getCustomDefinition(parentDefinitionName, request);
+        if (parent == null) {
+            parent = container.getDefinition(parentDefinitionName, request);
+            recurse = false;
+        }
+
+        if (parent == null) {
+            throw new NoSuchDefinitionException(
+                    "Error while resolving definition inheritance: child '"
+                            + definition.getName()
+                            + "' can't find its ancestor '"
+                            + parentDefinitionName
+                            + "'. Please check your description file.");
+        }
+
+        // Resolve parent before itself.
+        if (recurse) {
+            resolveInheritance(parent, request);
+        }
+        definition.inherit(parent);
+    }
+
+    /**
+     * Returns the map with custom definitions for the current request.
+     *
+     * @param request The current request.
+     * @return A map that connects a definition name to a definition.
+     */
+    @SuppressWarnings("unchecked")
+    private Map<String, Definition> getDefinitions(
+            Request request) {
+        return (Map<String, Definition>) request.getContext("request")
+                .get(definitionsAttributeName);
+    }
+
+    /**
+     * Returns a map of type "definition name -> definition" and, if it has not
+     * been defined before, creates one.
+     *
+     * @param request The current request.
+     * @return A map that connects a definition name to a definition.
+     */
+    @SuppressWarnings("unchecked")
+    private Map<String, Definition> getOrCreateDefinitions(
+            Request request) {
+        Map<String, Definition> definitions =
+            (Map<String, Definition>) request.getContext("request").get(definitionsAttributeName);
+        if (definitions == null) {
+            definitions = new HashMap<String, Definition>();
+            request.getContext("request")
+                    .put(definitionsAttributeName, definitions);
+        }
+
+        return definitions;
+    }
+
+    /**
+     * Create a unique definition name usable to store anonymous definitions.
+     *
+     * @param definitions The already created definitions.
+     * @return The unique definition name to be used to store the definition.
+     * @since 2.1.0
+     */
+    private String getNextUniqueDefinitionName(
+            Map<String, Definition> definitions) {
+        String candidate;
+        int anonymousDefinitionIndex = 1;
+
+        do {
+            candidate = "$anonymousMutableDefinition" + anonymousDefinitionIndex;
+            anonymousDefinitionIndex++;
+        } while (definitions.containsKey(candidate));
+
+        return candidate;
+    }
+
+    /**
+     * Returns a custom definition from the cache.
+     *
+     * @param definition The definition to search.
+     * @param request The request.
+     * @return The requested definition.
+     */
+    private Definition getCustomDefinition(String definition, Request request) {
+        Map<String, Definition> definitions = getDefinitions(request);
+        if (definitions != null) {
+            return definitions.get(definition);
+        }
+        return null;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/package-info.java
new file mode 100644
index 0000000..beb0283
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * It contains the basic implementations of mutable Tiles containers.
+ */
+package org.apache.tiles.impl.mgmt;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/package-info.java
new file mode 100644
index 0000000..4df849e
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/impl/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * It contains the basic implementations of Tiles container.
+ */
+package org.apache.tiles.impl;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/LocaleResolver.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/LocaleResolver.java
new file mode 100644
index 0000000..4022cc3
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/LocaleResolver.java
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.locale;
+
+import java.util.Locale;
+
+import org.apache.tiles.request.Request;
+
+/**
+ * It represents an object able to resolve the current locale for the current
+ * request, where its strategy depends on its implementation.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface LocaleResolver {
+
+    /**
+     * Resolves the locale.
+     *
+     * @param request The Tiles request object.
+     * @return The current locale for the current request.
+     */
+    Locale resolveLocale(Request request);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/impl/DefaultLocaleResolver.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/impl/DefaultLocaleResolver.java
new file mode 100644
index 0000000..19fd12f
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/impl/DefaultLocaleResolver.java
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.locale.impl;
+
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.request.Request;
+
+/**
+ * Default implementation of <code>LocaleResolver</code><br>
+ * It tries to take the locale from the session-scoped attribute
+ * {@link DefaultLocaleResolver#LOCALE_KEY}. If it is not found, it returns the
+ * locale included in the request.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefaultLocaleResolver implements LocaleResolver {
+
+    /**
+     * The attribute name that is used to store the current locale.
+     */
+    public static final String LOCALE_KEY = "org.apache.tiles.LOCALE";
+
+    /** {@inheritDoc} */
+    public Locale resolveLocale(Request request) {
+        Locale retValue = null;
+        Map<String, Object> session = request.getContext("session");
+        if (session != null) {
+            retValue = (Locale) session.get(DefaultLocaleResolver.LOCALE_KEY);
+        }
+        if (retValue == null) {
+            retValue = request.getRequestLocale();
+        }
+
+        return retValue;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/impl/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/impl/package-info.java
new file mode 100644
index 0000000..8005c7b
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/impl/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Basic implementation of the locale resolver.
+ */
+package org.apache.tiles.locale.impl;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/package-info.java
new file mode 100644
index 0000000..b9225e7
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/locale/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes and interfaces to allow locale resolution in an application, i.e. it
+ * allows to specify how to access the locale that the user wants to use.
+ */
+package org.apache.tiles.locale;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/BasicPreparerFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/BasicPreparerFactory.java
new file mode 100644
index 0000000..c9d46cd
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/BasicPreparerFactory.java
@@ -0,0 +1,93 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.preparer.factory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.reflect.ClassUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Default implementation of the {@link PreparerFactory}.
+ * This factory provides no contextual configuration.  It
+ * simply instantiates the named preparerInstance and returns it.
+ *
+ * @since Tiles 2.0
+ * @version $Rev$ $Date$
+ */
+public class BasicPreparerFactory implements PreparerFactory {
+
+    /**
+     * The logging object.
+     */
+    private final Logger log = LoggerFactory
+            .getLogger(BasicPreparerFactory.class);
+
+    /**
+     * Maps a preparer name to the instantiated preparer.
+     */
+    protected Map<String, ViewPreparer> preparers;
+
+    /**
+     * Constructor.
+     */
+    public BasicPreparerFactory() {
+        this.preparers = new HashMap<String, ViewPreparer>();
+    }
+
+
+    /**
+     * Create a new instance of the named preparerInstance.  This factory
+     * expects all names to be qualified class names.
+     *
+     * @param name    the named preparerInstance
+     * @param context current context
+     * @return ViewPreparer instance
+     */
+    public ViewPreparer getPreparer(String name, Request context) {
+
+        if (!preparers.containsKey(name)) {
+            preparers.put(name, createPreparer(name));
+        }
+
+        return preparers.get(name);
+    }
+
+    /**
+     * Creates a view preparer for the given name.
+     *
+     * @param name The name of the preparer.
+     * @return The created preparer.
+     */
+    protected ViewPreparer createPreparer(String name) {
+
+        log.debug("Creating ViewPreparer '{}' . . .", name);
+
+        Object instance = ClassUtil.instantiate(name, true);
+        log.debug("ViewPreparer created successfully");
+        return (ViewPreparer) instance;
+
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/NoSuchPreparerException.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/NoSuchPreparerException.java
new file mode 100644
index 0000000..ed57cd3
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/NoSuchPreparerException.java
@@ -0,0 +1,67 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.preparer.factory;
+
+import org.apache.tiles.preparer.PreparerException;
+
+/**
+ * Thrown when the named preparerInstance can not be found.
+ *
+ * @since 2.0
+ * @version $Rev$ $Date$
+ */
+public class NoSuchPreparerException extends PreparerException {
+
+    /**
+     * Constructor.
+     */
+    public NoSuchPreparerException() {
+        super();
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message to include.
+     */
+    public NoSuchPreparerException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e The cause exception.
+     */
+    public NoSuchPreparerException(Throwable e) {
+        super(e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message to include.
+     * @param e The cause exception.
+     */
+    public NoSuchPreparerException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/PreparerFactory.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/PreparerFactory.java
new file mode 100644
index 0000000..2575d7e
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/PreparerFactory.java
@@ -0,0 +1,53 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.preparer.factory;
+
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.request.Request;
+
+/**
+ * <p>
+ * Factory interface used to create/retrieve instances of
+ * the {@link ViewPreparer} interface.
+ * <p/>
+ *
+ * <p>
+ * This factory provides an extension point into the default
+ * tiles implementation. Implementors wishing to provide
+ * per request initialization of the ViewPreparer (for instance)
+ * may provide a custom prerparer.
+ * </p>
+ *
+ * @since 2.0
+ *
+ * @version $Rev$ $Date$
+ */
+public interface PreparerFactory {
+
+    /**
+     * Create the named {link ViewPreparer} for the specified context.
+     *
+     * @param name    ViewPreparer name, commonly the qualified classname.
+     * @param context the context within which the preparerInstance will be invoked.
+     * @return instance of the ViewPreparer
+     */
+    ViewPreparer getPreparer(String name, Request context);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/package-info.java
new file mode 100644
index 0000000..ea80abe
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/preparer/factory/package-info.java
@@ -0,0 +1,28 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * "View preparers" are objects that allows the "preparation" of a Tiles artifact
+ * (definition, template or attribute) before it is rendered.<br>
+ * It is useful, for example, when a view item should be built and stored in a
+ * particular context (e.g. a menu) and then rendered.
+ */
+package org.apache.tiles.preparer.factory;
+
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/renderer/DefinitionRenderer.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/renderer/DefinitionRenderer.java
new file mode 100644
index 0000000..84a7943
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/renderer/DefinitionRenderer.java
@@ -0,0 +1,66 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.renderer;
+
+import java.io.IOException;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.render.CannotRenderException;
+import org.apache.tiles.request.render.Renderer;
+
+/**
+ * Renders an attribute that contains a reference to a definition.
+ *
+ * @version $Rev$ $Date$
+ * @since 3.0.0
+ */
+public class DefinitionRenderer implements Renderer {
+
+    /**
+     * The Tiles container.
+     */
+    private TilesContainer container;
+
+    /**
+     * Constructor.
+     *
+     * @param container The Tiles container.
+     */
+    public DefinitionRenderer(TilesContainer container) {
+        this.container = container;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void render(String path, Request request) throws IOException {
+        if (path == null) {
+            throw new CannotRenderException("Cannot dispatch a null path");
+        }
+
+        container.render(path, request);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isRenderable(String path, Request request) {
+        return path != null && container.isValidDefinition(path, request);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/renderer/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/renderer/package-info.java
new file mode 100644
index 0000000..8e58cfd
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/renderer/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Interfaces to manage attribute rendering.
+ */
+package org.apache.tiles.renderer;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/AbstractTilesInitializer.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/AbstractTilesInitializer.java
new file mode 100644
index 0000000..5d8fc7a
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/AbstractTilesInitializer.java
@@ -0,0 +1,127 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.startup;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.request.ApplicationAccess;
+import org.apache.tiles.request.ApplicationContext;
+
+/**
+ * Default Tiles initialization delegate implementation under a servlet
+ * environment. It uses init parameters to create the
+ * {@link ApplicationContext} and the {@link TilesContainer}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public abstract class AbstractTilesInitializer implements TilesInitializer {
+
+    /**
+     * Init parameter to define the key under which the container will be
+     * stored.
+     *
+     * @since 2.1.2
+     */
+    public static final String CONTAINER_KEY_INIT_PARAMETER =
+        "org.apache.tiles.startup.AbstractTilesInitializer.CONTAINER_KEY";
+
+    /**
+     * The initialized application context.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * The initialized container.
+     */
+    private TilesContainer container;
+
+    /** {@inheritDoc} */
+    public void initialize(ApplicationContext applicationContext) {
+        this.applicationContext = createTilesApplicationContext(applicationContext);
+        ApplicationAccess.register(applicationContext);
+        String key = getContainerKey(this.applicationContext);
+        container = createContainer(this.applicationContext);
+        TilesAccess.setContainer(this.applicationContext, container, key);
+    }
+
+    /** {@inheritDoc} */
+    public void destroy() {
+        TilesAccess.setContainer(applicationContext, null,
+                getContainerKey(applicationContext));
+    }
+
+    /**
+     * Creates the Tiles application context, to be used across all the
+     * Tiles-based application. If you override this class, please override this
+     * method or
+     * {@link #createAndInitializeTilesApplicationContextFactory(ApplicationContext)}
+     * .<br>
+     * This implementation returns the preliminary context passed as a parameter
+     *
+     * @param preliminaryContext The preliminary application context to use.
+     * @return The Tiles application context.
+     * @since 2.2.0
+     */
+    protected ApplicationContext createTilesApplicationContext(
+            ApplicationContext preliminaryContext) {
+        return preliminaryContext;
+    }
+
+    /**
+     * Returns the container key under which the container will be stored.
+     * This implementation returns <code>null</code> so that the container will
+     * be the default one.
+     *
+     * @param applicationContext The Tiles application context to use.
+     * @return The container key.
+     * @since 2.2.0
+     */
+    protected String getContainerKey(ApplicationContext applicationContext) {
+        return null;
+    }
+
+    /**
+     * Creates a Tiles container. If you override this class, please override
+     * this method or {@link #createContainerFactory(ApplicationContext)}.
+     *
+     * @param context The servlet context to use.
+     * @return The created container.
+     * @since 2.2.0
+     */
+    protected TilesContainer createContainer(ApplicationContext context) {
+        AbstractTilesContainerFactory factory = createContainerFactory(context);
+        return factory.createContainer(context);
+    }
+
+    /**
+     * Creates a Tiles container factory. If you override this class, please
+     * override this method or {@link #createContainer(ApplicationContext)}.
+     *
+     * @param context The servlet context to use.
+     * @return The created container factory.
+     * @since 2.2.0
+     */
+    protected abstract AbstractTilesContainerFactory createContainerFactory(
+            ApplicationContext context);
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/DefaultTilesInitializer.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/DefaultTilesInitializer.java
new file mode 100644
index 0000000..c0f3796
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/DefaultTilesInitializer.java
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.startup;
+
+import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.factory.BasicTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+
+/**
+ * Loads Tiles with the default settings.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class DefaultTilesInitializer extends AbstractTilesInitializer {
+
+    /** {@inheritDoc} */
+    @Override
+    protected AbstractTilesContainerFactory createContainerFactory(
+            ApplicationContext context) {
+        return new BasicTilesContainerFactory();
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/TilesInitializer.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/TilesInitializer.java
new file mode 100644
index 0000000..539f9a9
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/TilesInitializer.java
@@ -0,0 +1,49 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.startup;
+
+import org.apache.tiles.request.ApplicationContext;
+
+/**
+ * Tiles initialization delegate. It initializes Tiles container(s) and the
+ * application context to use across all the application.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface TilesInitializer {
+
+    /**
+     * Initializes Tiles.
+     *
+     * @param preliminaryContext The preliminary application context to use. It
+     * will be overwritten with the real instance later. Use a context usable
+     * under your current environment, like ServletTilesApplicationContext or
+     * PortletTilesApplicationContext.
+     */
+    void initialize(ApplicationContext preliminaryContext);
+
+    /**
+     * Destroys the Tiles container.
+     *
+     * @since 2.2.0
+     */
+    void destroy();
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/package-info.java
new file mode 100644
index 0000000..f102e1b
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/startup/package-info.java
@@ -0,0 +1,26 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes to start the Tiles engine up. Use these classes in your environment by
+ * using a preliminary TilesApplicationContext that expose at least the needed
+ * initialization parameters.
+ */
+package org.apache.tiles.startup;
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/util/CombinedBeanInfo.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/util/CombinedBeanInfo.java
new file mode 100644
index 0000000..4a962e4
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/util/CombinedBeanInfo.java
@@ -0,0 +1,100 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.util;
+
+import java.beans.FeatureDescriptor;
+import java.beans.PropertyDescriptor;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tiles.request.reflect.ClassUtil;
+
+/**
+ * Contains the bean infos about one or more classes.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class CombinedBeanInfo {
+    /**
+     * The descriptors of the introspected classes.
+     */
+    private List<FeatureDescriptor> descriptors;
+
+    /**
+     * Maps analyzed classes to the map of introspected properties.
+     */
+    private Map<Class<?>, Map<String, PropertyDescriptor>> class2descriptors;
+
+    /**
+     * Constructor.
+     * @param clazzes The list of classes to analyze and combine.
+     *
+     * @since 2.2.0
+     */
+    public CombinedBeanInfo(Class<?>... clazzes) {
+        descriptors = new ArrayList<FeatureDescriptor>();
+        class2descriptors = new LinkedHashMap<Class<?>, Map<String, PropertyDescriptor>>();
+        for (int i = 0; i < clazzes.length; i++) {
+            Class<?> clazz = clazzes[i];
+            Map<String, PropertyDescriptor> mappedDescriptors = new LinkedHashMap<String, PropertyDescriptor>();
+            ClassUtil.collectBeanInfo(clazz, mappedDescriptors);
+            descriptors.addAll(mappedDescriptors.values());
+            class2descriptors.put(clazz, mappedDescriptors);
+        }
+    }
+
+    /**
+     * Returns the descriptors of all the introspected classes.
+     *
+     * @return The feature descriptors.
+     * @since 2.2.0
+     */
+    public List<FeatureDescriptor> getDescriptors() {
+        return descriptors;
+    }
+
+    /**
+     * Returns a map of the introspected properties for the given class.
+     *
+     * @param clazz The class to get the properties from.
+     * @return The map of property descriptors.
+     * @since 2.2.0
+     */
+    public Map<String, PropertyDescriptor> getMappedDescriptors(Class<?> clazz) {
+        return class2descriptors.get(clazz);
+    }
+
+    /**
+     * Returns the set of properties for the given introspected class.
+     *
+     * @param clazz The class to get the properties from.
+     * @return The set of properties.
+     * @since 2.2.0
+     */
+    public Set<String> getProperties(Class<?> clazz) {
+        return class2descriptors.get(clazz).keySet();
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/util/WildcardHelper.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/util/WildcardHelper.java
new file mode 100644
index 0000000..b6359c6
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/util/WildcardHelper.java
@@ -0,0 +1,548 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.util;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This class is an utility class that perform wilcard-patterns matching and
+ * isolation taken from Apache Struts that is taken, in turn, from Apache
+ * Struts.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.1.0
+ */
+public class WildcardHelper {
+    /**
+     * The int representing '*' in the pattern <code>int []</code>.
+     *
+     * @since 2.1.0
+     */
+    protected static final int MATCH_FILE = -1;
+
+    /**
+     * The int representing '**' in the pattern <code>int []</code>.
+     *
+     * @since 2.1.0
+     */
+    protected static final int MATCH_PATH = -2;
+
+    /**
+     * The int representing begin in the pattern <code>int []</code>.
+     *
+     * @since 2.1.0
+     */
+    protected static final int MATCH_BEGIN = -4;
+
+    /**
+     * The int representing end in pattern <code>int []</code>.
+     *
+     * @since 2.1.0
+     */
+    protected static final int MATCH_THEEND = -5;
+
+    /**
+     * The int value that terminates the pattern <code>int []</code>.
+     *
+     * @since 2.1.0
+     */
+    protected static final int MATCH_END = -3;
+
+    /**
+     * The length of the placeholder.
+     *
+     * @since 2.1.0
+     */
+    private static final int PLACEHOLDER_LENGTH = 3;
+
+    /**
+     * <p>
+     * Translate the given <code>String</code> into a <code>int []</code>
+     * representing the pattern matchable by this class. <br>
+     * This function translates a <code>String</code> into an int array
+     * converting the special '*' and '\' characters. <br>
+     * Here is how the conversion algorithm works:
+     * </p>
+     *
+     * <ul>
+     *
+     * <li>The '*' character is converted to MATCH_FILE, meaning that zero or
+     * more characters (excluding the path separator '/') are to be matched.</li>
+     *
+     * <li>The '**' sequence is converted to MATCH_PATH, meaning that zero or
+     * more characters (including the path separator '/') are to be matched.</li>
+     *
+     * <li>The '\' character is used as an escape sequence ('\*' is translated
+     * in '*', not in MATCH_FILE). If an exact '\' character is to be matched
+     * the source string must contain a '\\'. sequence.</li>
+     *
+     * </ul>
+     *
+     * <p>
+     * When more than two '*' characters, not separated by another character,
+     * are found their value is considered as '**' (MATCH_PATH). <br>
+     * The array is always terminated by a special value (MATCH_END). <br>
+     * All MATCH* values are less than zero, while normal characters are equal
+     * or greater.
+     * </p>
+     *
+     * @param data The string to translate.
+     * @return The encoded string as an int array, terminated by the MATCH_END
+     * value (don't consider the array length).
+     * @throws NullPointerException If data is null.
+     * @since 2.1.0
+     */
+    public int[] compilePattern(String data) {
+        // Prepare the arrays
+        int[] expr = new int[data.length() + 2];
+        char[] buff = data.toCharArray();
+
+        // Prepare variables for the translation loop
+        int y = 0;
+        boolean slash = false;
+
+        // Must start from beginning
+        expr[y++] = MATCH_BEGIN;
+
+        if (buff.length > 0) {
+            if (buff[0] == '\\') {
+                slash = true;
+            } else if (buff[0] == '*') {
+                expr[y++] = MATCH_FILE;
+            } else {
+                expr[y++] = buff[0];
+            }
+
+            // Main translation loop
+            for (int x = 1; x < buff.length; x++) {
+                // If the previous char was '\' simply copy this char.
+                if (slash) {
+                    expr[y++] = buff[x];
+                    slash = false;
+
+                    // If the previous char was not '\' we have to do a bunch of
+                    // checks
+                } else {
+                    // If this char is '\' declare that and continue
+                    if (buff[x] == '\\') {
+                        slash = true;
+
+                        // If this char is '*' check the previous one
+                    } else if (buff[x] == '*') {
+                        // If the previous character als was '*' match a path
+                        if (expr[y - 1] <= MATCH_FILE) {
+                            expr[y - 1] = MATCH_PATH;
+                        } else {
+                            expr[y++] = MATCH_FILE;
+                        }
+                    } else {
+                        expr[y++] = buff[x];
+                    }
+                }
+            }
+        }
+
+        // Must match end at the end
+        expr[y] = MATCH_THEEND;
+
+        return expr;
+    }
+
+    /**
+     * Match a pattern agains a string and isolates wildcard replacement into a
+     * <code>Stack</code>.
+     *
+     * @param data The string to match
+     * @param expr The compiled wildcard expression
+     * @return The list of matched variables, or <code>null</code> if it does not match.
+     * @throws NullPointerException If any parameters are null
+     * @since 2.2.0
+     */
+    public List<String> match(String data, int[] expr) {
+        List<String> varsValues = null;
+
+        if (data == null) {
+            throw new NullPointerException("No data provided");
+        }
+
+        if (expr == null) {
+            throw new NullPointerException("No pattern expression provided");
+        }
+
+        char[] buff = data.toCharArray();
+
+        // Allocate the result buffer
+        char[] rslt = new char[expr.length + buff.length];
+
+        // The previous and current position of the expression character
+        // (MATCH_*)
+        int charpos = 0;
+
+        // The position in the expression, input, translation and result arrays
+        int exprpos = 0;
+        int buffpos = 0;
+        int rsltpos = 0;
+        int offset = -1;
+
+        // First check for MATCH_BEGIN
+        boolean matchBegin = false;
+
+        if (expr[charpos] == MATCH_BEGIN) {
+            matchBegin = true;
+            exprpos = ++charpos;
+        }
+
+        // Search the fist expression character (except MATCH_BEGIN - already
+        // skipped)
+        while (expr[charpos] >= 0) {
+            charpos++;
+        }
+
+        // The expression charater (MATCH_*)
+        int exprchr = expr[charpos];
+
+        while (true) {
+            // Check if the data in the expression array before the current
+            // expression character matches the data in the input buffer
+            if (matchBegin) {
+                if (!matchArray(expr, exprpos, charpos, buff, buffpos)) {
+                    return null;
+                }
+
+                matchBegin = false;
+            } else {
+                offset = indexOfArray(expr, exprpos, charpos, buff, buffpos);
+
+                if (offset < 0) {
+                    return null;
+                }
+            }
+
+            // Check for MATCH_BEGIN
+            if (matchBegin) {
+                if (offset != 0) {
+                    return null;
+                }
+
+                matchBegin = false;
+            }
+
+            // Advance buffpos
+            buffpos += (charpos - exprpos);
+
+            // Check for END's
+            if (exprchr == MATCH_END) {
+                if (rsltpos > 0) {
+                    varsValues = addAndCreateList(varsValues, new String(rslt,
+                            0, rsltpos));
+                }
+
+                // Don't care about rest of input buffer
+                varsValues = addElementOnTop(varsValues, data);
+                return varsValues;
+            } else if (exprchr == MATCH_THEEND) {
+                if (rsltpos > 0) {
+                    varsValues = addAndCreateList(varsValues, new String(rslt,
+                            0, rsltpos));
+                }
+
+                // Check that we reach buffer's end
+                if (buffpos == buff.length) {
+                    addElementOnTop(varsValues, data);
+                    return varsValues;
+                }
+                return null;
+            }
+
+            // Search the next expression character
+            exprpos = ++charpos;
+
+            while (expr[charpos] >= 0) {
+                charpos++;
+            }
+
+            int prevchr = exprchr;
+
+            exprchr = expr[charpos];
+
+            // We have here prevchr == * or **.
+            offset = (prevchr == MATCH_FILE) ? indexOfArray(expr, exprpos,
+                    charpos, buff, buffpos) : lastIndexOfArray(expr, exprpos,
+                    charpos, buff, buffpos);
+
+            if (offset < 0) {
+                return null;
+            }
+
+            // Copy the data from the source buffer into the result buffer
+            // to substitute the expression character
+            if (prevchr == MATCH_PATH) {
+                while (buffpos < offset) {
+                    rslt[rsltpos++] = buff[buffpos++];
+                }
+            } else {
+                // Matching file, don't copy '/'
+                while (buffpos < offset) {
+                    if (buff[buffpos] == '/') {
+                        return null;
+                    }
+
+                    rslt[rsltpos++] = buff[buffpos++];
+                }
+            }
+
+            varsValues = addAndCreateList(varsValues, new String(rslt, 0,
+                    rsltpos));
+            rsltpos = 0;
+        }
+    }
+
+    /**
+     * Get the offset of a part of an int array within a char array. <br>
+     * This method return the index in d of the first occurrence after dpos of
+     * that part of array specified by r, starting at rpos and terminating at
+     * rend.
+     *
+     * @param r The array containing the data that need to be matched in d.
+     * @param rpos The index of the first character in r to look for.
+     * @param rend The index of the last character in r to look for plus 1.
+     * @param d The array of char that should contain a part of r.
+     * @param dpos The starting offset in d for the matching.
+     * @return The offset in d of the part of r matched in d or -1 if that was
+     * not found.
+     * @since 2.1.0
+     */
+    protected int indexOfArray(int[] r, int rpos, int rend, char[] d, int dpos) {
+        // Check if pos and len are legal
+        if (rend < rpos) {
+            throw new IllegalArgumentException("rend < rpos");
+        }
+
+        // If we need to match a zero length string return current dpos
+        if (rend == rpos) {
+            return (d.length); // ?? dpos?
+        }
+
+        // If we need to match a 1 char length string do it simply
+        if ((rend - rpos) == 1) {
+            // Search for the specified character
+            for (int x = dpos; x < d.length; x++) {
+                if (r[rpos] == d[x]) {
+                    return (x);
+                }
+            }
+        }
+
+        // Main string matching loop. It gets executed if the characters to
+        // match are less then the characters left in the d buffer
+        while (((dpos + rend) - rpos) <= d.length) {
+            // Set current startpoint in d
+            int y = dpos;
+
+            // Check every character in d for equity. If the string is matched
+            // return dpos
+            for (int x = rpos; x <= rend; x++) {
+                if (x == rend) {
+                    return (dpos);
+                }
+
+                if (r[x] != d[y++]) {
+                    break;
+                }
+            }
+
+            // Increase dpos to search for the same string at next offset
+            dpos++;
+        }
+
+        // The remaining chars in d buffer were not enough or the string
+        // wasn't matched
+        return (-1);
+    }
+
+    /**
+     * Get the offset of a last occurance of an int array within a char array.
+     * <br>
+     * This method return the index in d of the last occurrence after dpos of
+     * that part of array specified by r, starting at rpos and terminating at
+     * rend.
+     *
+     * @param r The array containing the data that need to be matched in d.
+     * @param rpos The index of the first character in r to look for.
+     * @param rend The index of the last character in r to look for plus 1.
+     * @param d The array of char that should contain a part of r.
+     * @param dpos The starting offset in d for the matching.
+     * @return The offset in d of the last part of r matched in d or -1 if that
+     * was not found.
+     * @since 2.1.0
+     */
+    protected int lastIndexOfArray(int[] r, int rpos, int rend, char[] d,
+            int dpos) {
+        // Check if pos and len are legal
+        if (rend < rpos) {
+            throw new IllegalArgumentException("rend < rpos");
+        }
+
+        // If we need to match a zero length string return current dpos
+        if (rend == rpos) {
+            return (d.length); // ?? dpos?
+        }
+
+        // If we need to match a 1 char length string do it simply
+        if ((rend - rpos) == 1) {
+            // Search for the specified character
+            for (int x = d.length - 1; x > dpos; x--) {
+                if (r[rpos] == d[x]) {
+                    return (x);
+                }
+            }
+        }
+
+        // Main string matching loop. It gets executed if the characters to
+        // match are less then the characters left in the d buffer
+        int l = d.length - (rend - rpos);
+
+        while (l >= dpos) {
+            // Set current startpoint in d
+            int y = l;
+
+            // Check every character in d for equity. If the string is matched
+            // return dpos
+            for (int x = rpos; x <= rend; x++) {
+                if (x == rend) {
+                    return (l);
+                }
+
+                if (r[x] != d[y++]) {
+                    break;
+                }
+            }
+
+            // Decrease l to search for the same string at next offset
+            l--;
+        }
+
+        // The remaining chars in d buffer were not enough or the string
+        // wasn't matched
+        return (-1);
+    }
+
+    /**
+     * Matches elements of array r from rpos to rend with array d, starting from
+     * dpos. <br>
+     * This method return true if elements of array r from rpos to rend equals
+     * elements of array d starting from dpos to dpos+(rend-rpos).
+     *
+     * @param r The array containing the data that need to be matched in d.
+     * @param rpos The index of the first character in r to look for.
+     * @param rend The index of the last character in r to look for.
+     * @param d The array of char that should start from a part of r.
+     * @param dpos The starting offset in d for the matching.
+     * @return true if array d starts from portion of array r.
+     * @since 2.1.0
+     */
+    protected boolean matchArray(int[] r, int rpos, int rend, char[] d, int dpos) {
+        if ((d.length - dpos) < (rend - rpos)) {
+            return (false);
+        }
+
+        for (int i = rpos; i < rend; i++) {
+            if (r[i] != d[dpos++]) {
+                return (false);
+            }
+        }
+
+        return (true);
+    }
+
+    /**
+     * <p>
+     * Inserts into a value wildcard-matched strings where specified.
+     * </p>
+     *
+     * @param val The value to convert
+     * @param vars A Map of wildcard-matched strings
+     * @return The new value
+     * @since 2.1.0
+     */
+    public static String convertParam(String val, Map<Integer, String> vars) {
+        if (val == null) {
+            return null;
+        } else if (val.indexOf("{") == -1) {
+            return val;
+        }
+
+        Map.Entry<Integer, String> entry;
+        StringBuffer key = new StringBuffer("{0}");
+        StringBuffer ret = new StringBuffer(val);
+        String keyTmp;
+        int x;
+
+        for (Iterator<Map.Entry<Integer, String>> i = vars.entrySet()
+                .iterator(); i.hasNext();) {
+            entry = i.next();
+            key.setCharAt(1, entry.getKey().toString().charAt(0));
+            keyTmp = key.toString();
+
+            // Replace all instances of the placeholder
+            while ((x = ret.toString().indexOf(keyTmp)) > -1) {
+                ret.replace(x, x + PLACEHOLDER_LENGTH, entry.getValue());
+            }
+        }
+
+        return ret.toString();
+    }
+
+    /**
+     * Adds and object to a list. If the list is null, it creates it.
+     *
+     * @param <T> The type of the element.
+     * @param list The list.
+     * @param data The data to add.
+     * @return The list itself, or a new one if it is <code>null</code>.
+     */
+    private <T> List<T> addAndCreateList(List<T> list, T data) {
+        if (list == null) {
+            list = new ArrayList<T>();
+        }
+        list.add(data);
+        return list;
+    }
+
+    /**
+     * Adds and object on top of a list. If the list is null, it creates it.
+     *
+     * @param <T> The type of the element.
+     * @param list The list.
+     * @param data The data to add.
+     * @return The list itself, or a new one if it is <code>null</code>.
+     */
+    private <T> List<T> addElementOnTop(List<T> list, T data) {
+        if (list == null) {
+            list = new ArrayList<T>();
+        }
+        list.add(0, data);
+        return list;
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/util/package-info.java b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/util/package-info.java
new file mode 100644
index 0000000..2854d44
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/java/org/apache/tiles/util/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Static utility classes used throughout the implementation.
+ */
+package org.apache.tiles.util;
diff --git a/TILES_3_0_X/tiles-core/src/main/resources/LICENSE.txt b/TILES_3_0_X/tiles-core/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/tiles-core/src/main/resources/NOTICE.txt b/TILES_3_0_X/tiles-core/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..1f13ff8
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/resources/NOTICE.txt
@@ -0,0 +1,6 @@
+   Apache Tiles
+   Copyright 1999-2009 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/TILES_3_0_X/tiles-core/src/main/resources/org/apache/tiles/resources/tiles-config_3_0.dtd b/TILES_3_0_X/tiles-core/src/main/resources/org/apache/tiles/resources/tiles-config_3_0.dtd
new file mode 100644
index 0000000..b8d3dd8
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/main/resources/org/apache/tiles/resources/tiles-config_3_0.dtd
@@ -0,0 +1,246 @@
+<!--
+%
+   $Id$
+
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+
+%
+
+@hidden $Id$
+@title DTD for the Tiles Definition File, Version 3.0
+@doctype tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" "http://tiles.apache.org/dtds/tiles-config_3_0.dtd"
+@root tiles-definitions
+-->
+
+
+<!-- ========== Defined Types ============================================= -->
+
+
+<!-- A "Boolean" is the string representation of a boolean (true or false)
+     variable.
+-->
+<!ENTITY % Boolean "(true|false)">
+
+
+<!-- A "ContentType" is the content type of an attribute passed to a template.
+-->
+<!ENTITY % ContentType "CDATA">
+
+<!-- A "ClassName" is the fully qualified name of a Java class that is
+     instantiated to provide the functionality of the enclosing element.
+-->
+<!ENTITY % ClassName "CDATA">
+
+<!-- A "RequestPath" is an module-relative URI path, beginning with a
+     slash, that identifies a mapped resource (such as a JSP page or a servlet)
+     within this web application.
+-->
+<!ENTITY % RequestPath "CDATA">
+
+<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
+     is a logical name used to reference the definition.
+-->
+<!ENTITY % DefinitionName "CDATA">
+
+<!-- A "Location" is a relative path, delimited by "/" characters, that
+     defines the location of a resource relative to the location of the
+     configuration file itself.
+-->
+<!ENTITY % Location "#PCDATA">
+
+
+
+<!-- ========== Top Level Elements ======================================== -->
+
+
+<!-- The "tiles-definitions" element is the root of the configuration file
+     hierarchy, and contains nested elements for all of the other
+     configuration settings.
+-->
+<!ELEMENT tiles-definitions (definition+)>
+
+<!-- The "definition" element describes a definition that can be inserted in a jsp
+     page. This definition is identified by its logical name. A definition allows
+     to define all the attributes that can be set in <insert> tag from a jsp page.
+-->
+<!ELEMENT definition (put-attribute*, put-list-attribute*)>
+<!ATTLIST definition       id               ID               #IMPLIED>
+<!--
+@attr preparer       The fully qualified Java class name of the preparer
+                     subclass to call immediately before the tiles is inserted.
+                     Only one of preparerClass or preparerUrl should be
+                     specified.
+-->
+<!ATTLIST definition       preparer         %ClassName;      #IMPLIED>
+<!--
+@attr extends        Name of a definition that is used as ancestor of this definition.
+                     All attributes from the ancestor are available to the new
+                     definition. Any attribute inherited from the ancestor can
+                     be overloaded by providing a new value.
+-->
+<!ATTLIST definition       extends          %DefinitionName; #IMPLIED>
+<!--
+@attr name           The unique identifier for this definition. Required when
+                     it is a root definition, while it is implied in nested
+                     definitions.
+-->
+<!ATTLIST definition       name             %DefinitionName; #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this definition
+                     object. The definition is inserted only if the role name is
+                     allowed.
+-->
+<!ATTLIST definition       role             CDATA            #IMPLIED>
+<!--
+@attr template       The context-relative path to the resource used as tiles to
+                     insert. This tiles will be inserted and a tiles context
+                     containing appropriate attributes will be available.
+-->
+<!ATTLIST definition       template         %RequestPath;    #IMPLIED>
+<!--
+@attr templateExpression The expression that will evaluate to a template for this definition.
+               This attribute will be ignored if template is specified.
+
+-->
+<!ATTLIST definition       templateExpression       CDATA    #IMPLIED>
+<!--
+@attr templateType   The type of the template attribute. Can be: string,
+           template or definition.
+                     By default, the type is "template". If a type is
+                     associated, the desidered renderer will be invoked.
+-->
+<!ATTLIST definition       templateType             %ContentType;   #IMPLIED>
+
+<!-- The "put-attribute" element describes an attribute of a definition. It allows to
+     specify the tiles attribute name and its value. The tiles value can be
+     specified as an xml attribute, or in the body of the <put-attribute> tag.
+-->
+<!ELEMENT put-attribute ( (definition*) )>
+<!ATTLIST put-attribute     id               ID              #IMPLIED>
+<!--
+@attr name           The unique identifier for this put-attribute.
+-->
+<!ATTLIST put-attribute     name             CDATA           #REQUIRED>
+<!--
+@attr type           The type of the value. Can be: string, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+-->
+<!ATTLIST put-attribute     type             %ContentType;   #IMPLIED>
+<!--
+@attr value          The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ATTLIST put-attribute     value            CDATA           #IMPLIED>
+<!--
+@attr expression     The expression associated to this tiles attribute. This
+           attribute will be ignored if value is specified.
+
+-->
+<!ATTLIST put-attribute     expression       CDATA           #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute is inserted only if the role name is
+                     allowed.
+-->
+<!ATTLIST put-attribute     role             CDATA            #IMPLIED>
+<!--
+@attr cascade        If true, the attribute will be cascaded to all inner
+                     definitions. By default, cascade is false.
+-->
+<!ATTLIST put-attribute     cascade          %Boolean;    #IMPLIED>
+
+
+<!-- The "put-list-attribute" element describes a list attribute of a definition. It allows to
+     specify an attribute that is a java List containing any kind of values. In
+     the config file, the list elements are specified by nested <add-attribute> or
+     <add-list-attribute>.
+-->
+<!ELEMENT put-list-attribute ( (add-attribute* | add-list-attribute*)+) >
+<!ATTLIST put-list-attribute id               ID              #IMPLIED>
+<!--
+@attr name           The unique identifier for this put attribute list.
+-->
+<!ATTLIST put-list-attribute name             CDATA           #REQUIRED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute is inserted only if the role name is
+                     allowed.
+-->
+<!ATTLIST put-list-attribute role             CDATA            #IMPLIED>
+<!--
+@attr inherit        If true, the attribute will put the elements of the attribute
+                     with the same name of the parent definition before the ones
+                     specified here. By default, it is 'false'.
+-->
+<!ATTLIST put-list-attribute inherit          %Boolean;        #IMPLIED>
+<!--
+@attr cascade        If true, the attribute will be cascaded to all inner
+                     definitions. By default, cascade is false.
+-->
+<!ATTLIST put-list-attribute cascade          %Boolean;        #IMPLIED>
+
+<!-- ========== Subordinate Elements ====================================== -->
+
+
+<!-- The "add-attribute" element describes an element of a list. It is similar to the
+     <put> element.
+-->
+<!ELEMENT add-attribute ( (definition*) )>
+<!ATTLIST add-attribute              id               ID              #IMPLIED>
+<!--
+@attr type           The type of the value. Can be: string, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+-->
+<!ATTLIST add-attribute              type             %ContentType;   #IMPLIED>
+<!--
+@attr value          The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ATTLIST add-attribute              value            CDATA           #IMPLIED>
+<!--
+@attr expression     The expression associated to this tiles attribute. This
+           attribute will be ignored if value is specified.
+
+-->
+<!ATTLIST add-attribute              expression       CDATA           #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute will be added to the parent list
+                     anyway. It is delegated to the user of this attribute to
+                     use it or not depending on the role of the user.
+-->
+<!ATTLIST add-attribute              role             CDATA            #IMPLIED>
+
+<!-- The "add-list-attribute" element describes a list attribute subordinate to another
+     list attribute. It allows to specify an attribute value that is a java List
+     containing any kind of values. In the config file, the list elements are specified
+     by nested <add-attribute> or <add-list-attribute>.
+-->
+<!ELEMENT add-list-attribute ( (add-attribute* | add-list-attribute*)+) >
+<!ATTLIST add-list-attribute id               ID              #IMPLIED>
+<!--
+@attr role           Security role name that is allowed access to this attribute
+                     object. The attribute will be added to the parent list
+                     anyway. It is delegated to the user of this attribute to
+                     use it or not depending on the role of the user.
+-->
+<!ATTLIST add-list-attribute role             CDATA            #IMPLIED>
diff --git a/TILES_3_0_X/tiles-core/src/site/site.xml b/TILES_3_0_X/tiles-core/src/site/site.xml
new file mode 100644
index 0000000..7f5d6c6
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Core Library">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/context/TilesRequestContextHolderTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/context/TilesRequestContextHolderTest.java
new file mode 100644
index 0000000..7547f0d
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/context/TilesRequestContextHolderTest.java
@@ -0,0 +1,51 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.context;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import org.apache.tiles.request.Request;
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesRequestContextHolderTest}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class TilesRequestContextHolderTest {
+
+    /**
+     * Test method for {@link TilesRequestContextHolder#setTilesRequestContext(Request)}.
+     */
+    @Test
+    public void testSetTilesRequestContext() {
+        Request request = createMock(Request.class);
+
+        replay(request);
+        TilesRequestContextHolder holder = new TilesRequestContextHolder();
+        holder.setTilesRequestContext(request);
+        assertSame(request, holder.getTilesRequestContext());
+        verify(request);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/DefinitionsFactoryExceptionTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/DefinitionsFactoryExceptionTest.java
new file mode 100644
index 0000000..fbd48c2
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/DefinitionsFactoryExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link DefinitionsFactoryException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefinitionsFactoryExceptionTest {
+
+    /**
+     * Test method for {@link DefinitionsFactoryException#DefinitionsFactoryException()}.
+     */
+    @Test
+    public void testDefinitionsFactoryException() {
+        DefinitionsFactoryException exception = new DefinitionsFactoryException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link DefinitionsFactoryException#DefinitionsFactoryException(java.lang.String)}.
+     */
+    @Test
+    public void testDefinitionsFactoryExceptionString() {
+        DefinitionsFactoryException exception = new DefinitionsFactoryException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link DefinitionsFactoryException#DefinitionsFactoryException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testDefinitionsFactoryExceptionThrowable() {
+        Throwable cause = new Throwable();
+        DefinitionsFactoryException exception = new DefinitionsFactoryException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link DefinitionsFactoryException#DefinitionsFactoryException(String, Throwable)}.
+     */
+    @Test
+    public void testDefinitionsFactoryExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        DefinitionsFactoryException exception = new DefinitionsFactoryException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/FactoryNotFoundExceptitonTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/FactoryNotFoundExceptitonTest.java
new file mode 100644
index 0000000..e774288
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/FactoryNotFoundExceptitonTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link FactoryNotFoundException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class FactoryNotFoundExceptitonTest {
+
+    /**
+     * Test method for {@link FactoryNotFoundException#FactoryNotFoundException()}.
+     */
+    @Test
+    public void testFactoryNotFoundException() {
+        FactoryNotFoundException exception = new FactoryNotFoundException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link FactoryNotFoundException#FactoryNotFoundException(java.lang.String)}.
+     */
+    @Test
+    public void testFactoryNotFoundExceptionString() {
+        FactoryNotFoundException exception = new FactoryNotFoundException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link FactoryNotFoundException#FactoryNotFoundException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testFactoryNotFoundExceptionThrowable() {
+        Throwable cause = new Throwable();
+        FactoryNotFoundException exception = new FactoryNotFoundException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link FactoryNotFoundException#FactoryNotFoundException(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testFactoryNotFoundExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        FactoryNotFoundException exception = new FactoryNotFoundException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/LocaleDefinitionsFactoryTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/LocaleDefinitionsFactoryTest.java
new file mode 100644
index 0000000..f2bc63d
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/LocaleDefinitionsFactoryTest.java
@@ -0,0 +1,108 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.dao.DefinitionDAO;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.request.Request;
+import org.junit.Test;
+
+/**
+ * Tests {@link LocaleDefinitionsFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class LocaleDefinitionsFactoryTest {
+
+    /**
+     * Test method for {@link LocaleDefinitionsFactory#getDefinition(String, Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetDefinition() {
+        DefinitionDAO<Locale> dao = createMock(DefinitionDAO.class);
+        LocaleResolver localeResolver = createMock(LocaleResolver.class);
+        Request request = createMock(Request.class);
+        Attribute templateAttribute = Attribute.createTemplateAttribute("/mytemplate.jsp");
+        Definition definition = new Definition("myDefinition", null, null);
+        definition.setExtends("anotherDefinition");
+        Map<String, Attribute> attributes = new HashMap<String, Attribute>();
+        attributes.put("first", new Attribute("myValue"));
+        Definition anotherDefinition = new Definition("anotherDefinition", templateAttribute, attributes);
+        Locale locale = Locale.ITALY;
+
+        expect(localeResolver.resolveLocale(request)).andReturn(locale);
+        expect(dao.getDefinition("myDefinition", locale)).andReturn(definition);
+        expect(dao.getDefinition("anotherDefinition", locale)).andReturn(anotherDefinition);
+
+        LocaleDefinitionsFactory factory = new LocaleDefinitionsFactory();
+
+        replay(dao, localeResolver, request);
+        factory.setDefinitionDAO(dao);
+        factory.setLocaleResolver(localeResolver);
+        Definition realDefinition = new Definition(definition);
+        realDefinition.inherit(anotherDefinition);
+        assertEquals(realDefinition, factory.getDefinition("myDefinition", request));
+        verify(dao, localeResolver, request);
+    }
+
+    /**
+     * Test method for {@link LocaleDefinitionsFactory#getDefinition(String, Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test(expected = NoSuchDefinitionException.class)
+    public void testGetDefinitionNoParent() {
+        DefinitionDAO<Locale> dao = createMock(DefinitionDAO.class);
+        LocaleResolver localeResolver = createMock(LocaleResolver.class);
+        Request request = createMock(Request.class);
+        Definition definition = new Definition("myDefinition", null, null);
+        definition.setExtends("anotherDefinition");
+        Map<String, Attribute> attributes = new HashMap<String, Attribute>();
+        attributes.put("first", new Attribute("myValue"));
+        Locale locale = Locale.ITALY;
+
+        expect(localeResolver.resolveLocale(request)).andReturn(locale);
+        expect(dao.getDefinition("myDefinition", locale)).andReturn(definition);
+        expect(dao.getDefinition("anotherDefinition", locale)).andReturn(null);
+
+        LocaleDefinitionsFactory factory = new LocaleDefinitionsFactory();
+
+        replay(dao, localeResolver, request);
+        try {
+            factory.setDefinitionDAO(dao);
+            factory.setLocaleResolver(localeResolver);
+            factory.getDefinition("myDefinition", request);
+        } finally {
+            verify(dao, localeResolver, request);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/MockDefinitionsReader.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/MockDefinitionsReader.java
new file mode 100644
index 0000000..6c91d7d
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/MockDefinitionsReader.java
@@ -0,0 +1,69 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.tiles.Definition;
+
+/**
+ * Mock Defintions Reader implementation.  Stubs out all functionality.
+ *
+ * @version $Rev$ $Date$
+ */
+public class MockDefinitionsReader implements DefinitionsReader {
+
+    /**
+     * Hokey way to verify that this was created.
+     */
+    private static int instanceCount = 0;
+
+    /**
+     * Hokey way to verify that this class was created.
+     *
+     * @return The number of created instances.
+     */
+    public static int getInstanceCount() {
+        return instanceCount;
+    }
+
+    /** Creates a new instance of MockDefinitionsReader. */
+    public MockDefinitionsReader() {
+        instanceCount++;
+    }
+
+    /**
+     * Reads <code>{@link Definition}</code> objects from a source.
+     *
+     * Implementations should publish what type of source object is expected.
+     *
+     * @param source The source from which definitions will be read.
+     * @return a Map of <code>Definition</code> objects read from
+     *  the source.
+     * @throws org.apache.tiles.definition.DefinitionsFactoryException if the source is invalid or
+     *  an error occurs when reading definitions.
+     */
+    public Map<String, Definition> read(Object source) {
+        return new LinkedHashMap<String, Definition>();
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/NoSuchDefinitionExceptionTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/NoSuchDefinitionExceptionTest.java
new file mode 100644
index 0000000..e2130d2
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/NoSuchDefinitionExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link NoSuchDefinitionException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class NoSuchDefinitionExceptionTest {
+
+    /**
+     * Test method for {@link NoSuchDefinitionException#NoSuchDefinitionException()}.
+     */
+    @Test
+    public void testNoSuchDefinitionException() {
+        NoSuchDefinitionException exception = new NoSuchDefinitionException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link NoSuchDefinitionException#NoSuchDefinitionException(java.lang.String)}.
+     */
+    @Test
+    public void testNoSuchDefinitionExceptionString() {
+        NoSuchDefinitionException exception = new NoSuchDefinitionException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link NoSuchDefinitionException#NoSuchDefinitionException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testNoSuchDefinitionExceptionThrowable() {
+        Throwable cause = new Throwable();
+        NoSuchDefinitionException exception = new NoSuchDefinitionException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link NoSuchDefinitionException#NoSuchDefinitionException(String, Throwable)}.
+     */
+    @Test
+    public void testNoSuchDefinitionExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        NoSuchDefinitionException exception = new NoSuchDefinitionException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/UnresolvingLocaleDefinitionsFactoryTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/UnresolvingLocaleDefinitionsFactoryTest.java
new file mode 100644
index 0000000..918ac09
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/UnresolvingLocaleDefinitionsFactoryTest.java
@@ -0,0 +1,66 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.Locale;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.dao.DefinitionDAO;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.request.Request;
+import org.junit.Test;
+
+/**
+ * Tests {@link UnresolvingLocaleDefinitionsFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class UnresolvingLocaleDefinitionsFactoryTest {
+
+    /**
+     * Test method for {@link UnresolvingLocaleDefinitionsFactory#getDefinition(String, Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetDefinition() {
+        DefinitionDAO<Locale> dao = createMock(DefinitionDAO.class);
+        LocaleResolver localeResolver = createMock(LocaleResolver.class);
+        UnresolvingLocaleDefinitionsFactory factory = new UnresolvingLocaleDefinitionsFactory();
+        Request request = createMock(Request.class);
+        Definition definition = createMock(Definition.class);
+        Locale locale = Locale.ITALY;
+
+        expect(localeResolver.resolveLocale(request)).andReturn(locale);
+        expect(dao.getDefinition("myDefinition", locale)).andReturn(definition);
+
+        replay(dao, localeResolver, request, definition);
+        factory.setDefinitionDAO(dao);
+        factory.setLocaleResolver(localeResolver);
+        assertEquals(definition, factory.getDefinition("myDefinition", request));
+        verify(dao, localeResolver, request, definition);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/BaseLocaleUrlDefinitionDAOTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/BaseLocaleUrlDefinitionDAOTest.java
new file mode 100644
index 0000000..1c1d050
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/BaseLocaleUrlDefinitionDAOTest.java
@@ -0,0 +1,184 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.definition.dao;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.apache.tiles.definition.RefreshMonitor;
+import org.apache.tiles.definition.digester.DigesterDefinitionsReader;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.locale.PostfixedApplicationResource;
+import org.apache.tiles.request.locale.URLApplicationResource;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link BaseLocaleUrlDefinitionDAO}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class BaseLocaleUrlDefinitionDAOTest {
+
+    private static final class MutableApplicationResource extends PostfixedApplicationResource {
+        private long lastModified = System.currentTimeMillis();
+        private String xml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n"
+                + "<!DOCTYPE tiles-definitions PUBLIC "
+                + "\"-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN\" "
+                + "\"http://tiles.apache.org/dtds/tiles-config_3_0.dtd\">\n\n" + "<tiles-definitions>"
+                + "<definition name=\"rewrite.test\" template=\"/test.jsp\">"
+                + "<put-attribute name=\"testparm\" value=\"testval\"/>" + "</definition>" //
+                + "</tiles-definitions>";
+
+        private MutableApplicationResource(String localePath) {
+            super(localePath);
+        }
+
+        public void modify(String xml) {
+            lastModified = System.currentTimeMillis();
+            this.xml = xml;
+        }
+
+        @Override
+        public long getLastModified() {
+            return lastModified;
+        }
+
+        @Override
+        public InputStream getInputStream() throws IOException {
+
+            return new ByteArrayInputStream(xml.getBytes("ISO-8859-1"));
+        }
+    }
+
+    /**
+     * The time (in milliseconds) to wait to be sure that the system updates the
+     * modify date of a file.
+     */
+    private static final int SLEEP_MILLIS = 2000;
+
+    /**
+     * The dao to test.
+     */
+    private ApplicationContext applicationContext;
+
+    private BaseLocaleUrlDefinitionDAO dao;
+    private MutableApplicationResource resource;
+
+    /**
+     * Sets up the test.
+     * @throws IOException 
+     */
+    @Before
+    public void setUp() throws IOException {
+        resource = new MutableApplicationResource("org/apache/tiles/config/temp-defs.xml");
+        applicationContext = createMock(ApplicationContext.class);
+        expect(applicationContext.getResource("org/apache/tiles/config/temp-defs.xml")).andReturn(resource).anyTimes();
+        replay(applicationContext);
+        dao = createMockBuilder(BaseLocaleUrlDefinitionDAO.class).withConstructor(applicationContext).createMock();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO#refreshRequired()}.
+     * @throws URISyntaxException If something goes wrong.
+     * @throws IOException If something goes wrong.
+     * @throws InterruptedException If something goes wrong.
+     */
+    @Test
+    public void testRefreshRequired() throws URISyntaxException, IOException, InterruptedException {
+        // Set up multiple data sources.
+        Map<String, Attribute> attribs = new HashMap<String, Attribute>();
+        attribs.put("testparm", new Attribute("testval"));
+        Definition rewriteTest = new Definition("rewrite.test", Attribute.createTemplateAttribute("/test.jsp"), attribs);
+        expect(dao.getDefinition("rewrite.test", null)).andReturn(rewriteTest);
+
+        replay(dao);
+
+        List<ApplicationResource> sources = new ArrayList<ApplicationResource>();
+        sources.add(resource);
+        dao.setSources(sources);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        dao.setReader(reader);
+
+        Request context = createMock(Request.class);
+        expect(context.getContext("session")).andReturn(new HashMap<String, Object>()).anyTimes();
+        expect(context.getRequestLocale()).andReturn(null).anyTimes();
+        replay(context);
+
+        Definition definition = dao.getDefinition("rewrite.test", null);
+        assertNotNull("rewrite.test definition not found.", definition);
+        assertEquals("Incorrect initial template value", "/test.jsp", definition.getTemplateAttribute().getValue());
+
+        RefreshMonitor reloadable = dao;
+        dao.loadDefinitionsFromResource(resource);
+        assertEquals("Factory should be fresh.", false, reloadable.refreshRequired());
+
+        // Make sure the system actually updates the timestamp.
+        Thread.sleep(SLEEP_MILLIS);
+
+        // Set up multiple data sources.
+        resource.modify("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n" + "<!DOCTYPE tiles-definitions PUBLIC "
+                + "\"-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN\" "
+                + "\"http://tiles.apache.org/dtds/tiles-config_3_0.dtd\">\n\n" + "<tiles-definitions>"
+                + "<definition name=\"rewrite.test\" template=\"/newtest.jsp\">"
+                + "<put-attribute name=\"testparm\" value=\"testval\"/>" + "</definition>" //
+                + "</tiles-definitions>");
+
+        assertEquals("Factory should be stale.", true, reloadable.refreshRequired());
+
+        verify(context, dao);
+    }
+
+    /**
+     * Test method for {@link BaseLocaleUrlDefinitionDAO#loadDefinitionsFromURL(URL)}.
+     * @throws MalformedURLException If something goes wrong.
+     */
+    @Test
+    public void testLoadDefinitionsFromURLFileNotFound() throws MalformedURLException {
+        URLApplicationResource resource = new URLApplicationResource("/hello/there.txt", new URL(
+                "file:///hello/there.txt"));
+        replay(dao);
+        DefinitionsReader reader = createMock(DefinitionsReader.class);
+        replay(reader);
+
+        dao.setReader(reader);
+        assertNull(dao.loadDefinitionsFromResource(resource));
+        verify(dao, reader);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/CachingLocaleUrlDefinitionDAOTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/CachingLocaleUrlDefinitionDAOTest.java
new file mode 100644
index 0000000..c7eb12f
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/CachingLocaleUrlDefinitionDAOTest.java
@@ -0,0 +1,382 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.dao;
+
+import static org.easymock.EasyMock.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.apache.tiles.definition.MockDefinitionsReader;
+import org.apache.tiles.definition.digester.DigesterDefinitionsReader;
+import org.apache.tiles.definition.pattern.BasicPatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.PatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.wildcard.WildcardDefinitionPatternMatcherFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.locale.URLApplicationResource;
+
+/**
+ * Tests {@link CachingLocaleUrlDefinitionDAO}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CachingLocaleUrlDefinitionDAOTest extends TestCase {
+
+    /**
+     * The object to test.
+     */
+    private CachingLocaleUrlDefinitionDAO definitionDao;
+
+    private ApplicationContext applicationContext;
+
+    private ApplicationResource url1;
+
+    private ApplicationResource url2;
+
+    private ApplicationResource url3;
+
+    private ApplicationResource urlWildcard;
+
+    private ApplicationResource url21;
+
+    private ApplicationResource setupUrl(String filename, Locale... locales) throws IOException {
+        ApplicationResource url = new URLApplicationResource("org/apache/tiles/config/" + filename + ".xml", this
+                .getClass().getClassLoader().getResource("org/apache/tiles/config/" + filename + ".xml"));
+        assertNotNull("Could not load " + filename + " file.", url);
+        expect(applicationContext.getResource(url.getLocalePath())).andReturn(url).anyTimes();
+        expect(applicationContext.getResource(url, Locale.ROOT)).andReturn(url).anyTimes();
+        Map<Locale, ApplicationResource> localeResources = new HashMap<Locale, ApplicationResource>();
+        for (Locale locale : locales) {
+            ApplicationResource urlLocale = new URLApplicationResource("org/apache/tiles/config/" + filename + "_"
+                    + locale.toString() + ".xml", this.getClass().getClassLoader()
+                    .getResource("org/apache/tiles/config/" + filename + "_" + locale.toString() + ".xml"));
+            assertNotNull("Could not load " + filename + "_" + locale.toString() + " file.", urlLocale);
+            localeResources.put(locale, urlLocale);
+        }
+        for (Locale locale : new Locale[] { Locale.CANADA_FRENCH, Locale.FRENCH, Locale.US, Locale.ENGLISH,
+                Locale.CHINA, Locale.CHINESE, Locale.ITALY, Locale.ITALIAN }) {
+            ApplicationResource urlLocale = localeResources.get(locale);
+            expect(applicationContext.getResource(url, locale)).andReturn(urlLocale).anyTimes();
+        }
+        return url;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        applicationContext = createMock(ApplicationContext.class);
+        url1 = setupUrl("defs1", Locale.FRENCH, Locale.CANADA_FRENCH, Locale.US);
+        url2 = setupUrl("defs2");
+        url3 = setupUrl("defs3");
+        urlWildcard = setupUrl("defs-wildcard");
+        url21 = setupUrl("tiles-defs-2.1", Locale.ITALIAN);
+        replay(applicationContext);
+        definitionDao = new CachingLocaleUrlDefinitionDAO(applicationContext);
+        WildcardDefinitionPatternMatcherFactory definitionPatternMatcherFactory =
+            new WildcardDefinitionPatternMatcherFactory();
+        PatternDefinitionResolver<Locale> definitionResolver = new BasicPatternDefinitionResolver<Locale>(
+                definitionPatternMatcherFactory,
+                definitionPatternMatcherFactory);
+        definitionDao.setPatternDefinitionResolver(definitionResolver);
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#getDefinition(String, Locale)}.
+     */
+    public void testGetDefinition() {
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        definitionDao.setReader(reader);
+
+        assertNotNull("test.def1 definition not found.", definitionDao
+                .getDefinition("test.def1", null));
+        assertNotNull("test.def2 definition not found.", definitionDao
+                .getDefinition("test.def2", null));
+        assertNotNull("test.def3 definition not found.", definitionDao
+                .getDefinition("test.def3", null));
+        assertNotNull("test.common definition not found.", definitionDao
+                .getDefinition("test.common", null));
+        assertNotNull("test.common definition in US locale not found.",
+                definitionDao.getDefinition("test.common", Locale.US));
+        assertNotNull("test.common definition in FRENCH locale not found.",
+                definitionDao.getDefinition("test.common", Locale.FRENCH));
+        assertNotNull("test.common definition in CHINA locale not found.",
+                definitionDao.getDefinition("test.common", Locale.CHINA));
+        assertNotNull(
+                "test.common.french definition in FRENCH locale not found.",
+                definitionDao.getDefinition("test.common.french",
+                        Locale.FRENCH));
+        assertNotNull(
+                "test.common.french definition in CANADA_FRENCH locale not found.",
+                definitionDao.getDefinition("test.common.french",
+                        Locale.CANADA_FRENCH));
+        assertNotNull("test.def.toextend definition not found.", definitionDao
+                .getDefinition("test.def.toextend", null));
+        assertNotNull("test.def.overridden definition not found.",
+                definitionDao.getDefinition("test.def.overridden", null));
+        assertNotNull(
+                "test.def.overridden definition in FRENCH locale not found.",
+                definitionDao.getDefinition("test.def.overridden",
+                        Locale.FRENCH));
+
+        assertEquals("Incorrect default country value", "default",
+                definitionDao.getDefinition("test.def1", null).getAttribute(
+                        "country").getValue());
+        assertEquals("Incorrect US country value", "US", definitionDao
+                .getDefinition("test.def1", Locale.US).getAttribute("country")
+                .getValue());
+        assertEquals("Incorrect France country value", "France", definitionDao
+                .getDefinition("test.def1", Locale.FRENCH).getAttribute(
+                        "country").getValue());
+        assertEquals("Incorrect Chinese country value (should be default)",
+                "default", definitionDao.getDefinition("test.def1",
+                        Locale.CHINA).getAttribute("country").getValue());
+        assertEquals("Incorrect default country value", "default",
+                definitionDao.getDefinition("test.def.overridden", null)
+                        .getAttribute("country").getValue());
+        assertEquals("Incorrect default title value",
+                "Definition to be overridden", definitionDao.getDefinition(
+                        "test.def.overridden", null).getAttribute("title")
+                        .getValue());
+        assertEquals("Incorrect France country value", "France", definitionDao
+                .getDefinition("test.def.overridden", Locale.FRENCH)
+                .getAttribute("country").getValue());
+        assertNull("Definition in French not found", definitionDao
+                .getDefinition("test.def.overridden", Locale.FRENCH)
+                .getAttribute("title"));
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#getDefinitions(Locale)}.
+     */
+    public void testGetDefinitions() {
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        definitionDao.setReader(reader);
+
+        Map<String, Definition> defaultDefinitions = definitionDao
+                .getDefinitions(null);
+        Map<String, Definition> usDefinitions = definitionDao
+                .getDefinitions(Locale.US);
+        Map<String, Definition> frenchDefinitions = definitionDao
+                .getDefinitions(Locale.FRENCH);
+        Map<String, Definition> chinaDefinitions = definitionDao
+                .getDefinitions(Locale.CHINA);
+        Map<String, Definition> canadaFrenchDefinitions = definitionDao
+                .getDefinitions(Locale.CANADA_FRENCH);
+
+        assertNotNull("test.def1 definition not found.", defaultDefinitions
+                .get("test.def1"));
+        assertNotNull("test.def2 definition not found.", defaultDefinitions
+                .get("test.def2"));
+        assertNotNull("test.def3 definition not found.", defaultDefinitions
+                .get("test.def3"));
+        assertNotNull("test.common definition not found.", defaultDefinitions
+                .get("test.common"));
+        assertNotNull("test.common definition in US locale not found.",
+                usDefinitions.get("test.common"));
+        assertNotNull("test.common definition in FRENCH locale not found.",
+                frenchDefinitions.get("test.common"));
+        assertNotNull("test.common definition in CHINA locale not found.",
+                chinaDefinitions.get("test.common"));
+        assertNotNull(
+                "test.common.french definition in FRENCH locale not found.",
+                frenchDefinitions.get("test.common.french"));
+        assertNotNull(
+                "test.common.french definition in CANADA_FRENCH locale not found.",
+                canadaFrenchDefinitions.get("test.common.french"));
+        assertNotNull("test.def.toextend definition not found.",
+                defaultDefinitions.get("test.def.toextend"));
+        assertNotNull("test.def.overridden definition not found.",
+                defaultDefinitions.get("test.def.overridden"));
+        assertNotNull(
+                "test.def.overridden definition in FRENCH locale not found.",
+                frenchDefinitions.get("test.def.overridden"));
+
+        assertEquals("Incorrect default country value", "default",
+                defaultDefinitions.get("test.def1").getAttribute("country")
+                        .getValue());
+        assertEquals("Incorrect US country value", "US", usDefinitions.get(
+                "test.def1").getAttribute("country").getValue());
+        assertEquals("Incorrect France country value", "France",
+                frenchDefinitions.get("test.def1").getAttribute("country")
+                        .getValue());
+        assertEquals("Incorrect Chinese country value (should be default)",
+                "default", chinaDefinitions.get("test.def1").getAttribute(
+                        "country").getValue());
+        assertEquals("Incorrect default country value", "default",
+                defaultDefinitions.get("test.def.overridden").getAttribute(
+                        "country").getValue());
+        assertEquals("Incorrect default title value",
+                "Definition to be overridden", defaultDefinitions.get(
+                        "test.def.overridden").getAttribute("title").getValue());
+        assertEquals("Incorrect France country value", "France",
+                frenchDefinitions.get("test.def.overridden").getAttribute(
+                        "country").getValue());
+        assertNull("Definition in French not found", frenchDefinitions.get(
+                "test.def.overridden").getAttribute("title"));
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#setSources(List)}.
+     */
+    public void testSetSourceURLs() {
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        assertEquals("The source URLs are not set correctly", sourceURLs,
+                definitionDao.sources);
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#setReader(DefinitionsReader)}.
+     */
+    public void testSetReader() {
+        DefinitionsReader reader = createMock(DefinitionsReader.class);
+        definitionDao.setReader(reader);
+        assertEquals("There reader has not been set correctly", reader,
+                definitionDao.reader);
+    }
+
+    /**
+     * Tests execution.
+     *
+     * @throws IOException If something goes wrong.
+     */
+    public void testInit() throws IOException {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Set<ApplicationResource> urlSet = new HashSet<ApplicationResource>();
+        urlSet.add(url1);
+        expect(applicationContext.getResources("/WEB-INF/tiles.xml"))
+                .andReturn(urlSet);
+        replay(applicationContext);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        definitionDao.setReader(reader);
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        definitionDao.setSources(sourceURLs);
+        assertEquals("The reader is not of the correct class",
+                DigesterDefinitionsReader.class, definitionDao.reader
+                        .getClass());
+        assertEquals("The source URLs are not correct", sourceURLs,
+                definitionDao.sources);
+        reset(applicationContext);
+
+        definitionDao.setReader(new MockDefinitionsReader());
+        assertEquals("The reader is not of the correct class",
+                MockDefinitionsReader.class, definitionDao.reader.getClass());
+        sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        assertEquals("The source URLs are not correct", sourceURLs,
+                definitionDao.sources);
+    }
+
+    /**
+     * Tests wildcard mappings.
+     */
+    public void testWildcardMapping() {
+        List<ApplicationResource> urls = new ArrayList<ApplicationResource>();
+        urls.add(urlWildcard);
+        definitionDao.setSources(urls);
+        definitionDao.setReader(new DigesterDefinitionsReader());
+
+        Definition definition = definitionDao.getDefinition("test.defName.subLayered", Locale.ITALY);
+        assertEquals("The template is not correct", "/testName.jsp", definition
+                .getTemplateAttribute().getValue());
+        assertEquals("The header attribute is not correct",
+                "/common/headerLayered.jsp", definition.getAttribute("header")
+                        .getValue());
+        definition = definitionDao.getDefinition("test.defName.subLayered", Locale.ITALIAN);
+        assertEquals("The template is not correct", "/testName.jsp", definition
+                .getTemplateAttribute().getValue());
+        assertEquals("The header attribute is not correct",
+                "/common/headerLayered.jsp", definition.getAttribute("header")
+                        .getValue());
+        definition = definitionDao.getDefinition("test.defName.subLayered", null);
+        assertEquals("The template is not correct", "/testName.jsp", definition
+                .getTemplateAttribute().getValue());
+        assertEquals("The header attribute is not correct",
+                "/common/headerLayered.jsp", definition.getAttribute("header")
+                        .getValue());
+        definition = definitionDao.getDefinition("test.defName.noAttribute", null);
+        assertEquals("/testName.jsp", definition.getTemplateAttribute().getValue());
+        assertEquals(null, definition.getLocalAttributeNames());
+        definition = definitionDao.getDefinition("test.def3", null);
+        assertNotNull("The simple definition is null", definition);
+
+        definition = definitionDao.getDefinition("test.extended.defName.subLayered", null);
+        assertEquals("test.defName.subLayered", definition.getExtends());
+        assertNull(definition.getTemplateAttribute().getValue());
+        assertEquals(1, definition.getLocalAttributeNames().size());
+        assertEquals("Overridden Title", definition.getAttribute("title").getValue());
+    }
+
+    /**
+     * Tests
+     * {@link ResolvingLocaleUrlDefinitionDAO#getDefinition(String, Locale)}
+     * when loading multiple files for a locale.
+     */
+    public void testListAttributeLocaleInheritance() {
+        List<ApplicationResource> urls = new ArrayList<ApplicationResource>();
+        urls.add(url21);
+        definitionDao.setSources(urls);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        definitionDao.setReader(new DigesterDefinitionsReader());
+        replay(applicationContext);
+
+        Definition definition = definitionDao.getDefinition(
+                "test.inherit.list", Locale.ITALIAN);
+        ListAttribute listAttribute = (ListAttribute) definition
+                .getAttribute("list");
+        List<Attribute> attributes = listAttribute.getValue();
+        // It is right not to resolve inheritance in this DAO.
+        assertEquals(1, attributes.size());
+        verify(applicationContext);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/LocaleUrlDefinitionDAOTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/LocaleUrlDefinitionDAOTest.java
new file mode 100644
index 0000000..57bb86a
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/LocaleUrlDefinitionDAOTest.java
@@ -0,0 +1,252 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.dao;
+
+import static org.easymock.EasyMock.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.apache.tiles.definition.MockDefinitionsReader;
+import org.apache.tiles.definition.digester.DigesterDefinitionsReader;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.locale.URLApplicationResource;
+
+/**
+ * Tests {@link LocaleUrlDefinitionDAO}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class LocaleUrlDefinitionDAOTest extends TestCase {
+
+    /**
+     * The object to test.
+     */
+    private LocaleUrlDefinitionDAO definitionDao;
+
+    private ApplicationContext applicationContext;
+
+    private ApplicationResource url1;
+
+    private ApplicationResource url2;
+
+    private ApplicationResource url3;
+
+    private ApplicationResource setupUrl(String filename, Locale... locales) throws IOException {
+        ApplicationResource url = new URLApplicationResource("org/apache/tiles/config/" + filename + ".xml", this
+                .getClass().getClassLoader().getResource("org/apache/tiles/config/" + filename + ".xml"));
+        assertNotNull("Could not load " + filename + " file.", url);
+        expect(applicationContext.getResource(url.getLocalePath())).andReturn(url).anyTimes();
+        expect(applicationContext.getResource(url, Locale.ROOT)).andReturn(url).anyTimes();
+        Map<Locale, ApplicationResource> localeResources = new HashMap<Locale, ApplicationResource>();
+        for (Locale locale : locales) {
+            ApplicationResource urlLocale = new URLApplicationResource("org/apache/tiles/config/" + filename + "_"
+                    + locale.toString() + ".xml", this.getClass().getClassLoader()
+                    .getResource("org/apache/tiles/config/" + filename + "_" + locale.toString() + ".xml"));
+            assertNotNull("Could not load " + filename + "_" + locale.toString() + " file.", urlLocale);
+            localeResources.put(locale, urlLocale);
+        }
+        for (Locale locale : new Locale[] { Locale.CANADA_FRENCH, Locale.FRENCH, Locale.US, Locale.ENGLISH,
+                Locale.CHINA, Locale.CHINESE }) {
+            ApplicationResource urlLocale = localeResources.get(locale);
+            expect(applicationContext.getResource(url, locale)).andReturn(urlLocale).anyTimes();
+        }
+        return url;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        applicationContext = createMock(ApplicationContext.class);
+        url1 = setupUrl("defs1", Locale.FRENCH, Locale.CANADA_FRENCH, Locale.US);
+        url2 = setupUrl("defs2");
+        url3 = setupUrl("defs3");
+        replay(applicationContext);
+        definitionDao = new LocaleUrlDefinitionDAO(applicationContext);
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#getDefinition(String, Locale)}.
+     */
+    public void testGetDefinition() {
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        definitionDao.setReader(reader);
+        assertNotNull("test.def1 definition not found.", definitionDao.getDefinition("test.def1", null));
+        assertNotNull("test.def2 definition not found.", definitionDao.getDefinition("test.def2", null));
+        assertNotNull("test.def3 definition not found.", definitionDao.getDefinition("test.def3", null));
+        assertNotNull("test.common definition not found.", definitionDao.getDefinition("test.common", null));
+        assertNotNull("test.common definition in US locale not found.",
+                definitionDao.getDefinition("test.common", Locale.US));
+        assertNotNull("test.common definition in FRENCH locale not found.",
+                definitionDao.getDefinition("test.common", Locale.FRENCH));
+        assertNotNull("test.common definition in CHINA locale not found.",
+                definitionDao.getDefinition("test.common", Locale.CHINA));
+        assertNotNull("test.common.french definition in FRENCH locale not found.",
+                definitionDao.getDefinition("test.common.french", Locale.FRENCH));
+        assertNotNull("test.common.french definition in CANADA_FRENCH locale not found.",
+                definitionDao.getDefinition("test.common.french", Locale.CANADA_FRENCH));
+        assertNotNull("test.def.toextend definition not found.", definitionDao.getDefinition("test.def.toextend", null));
+        assertNotNull("test.def.overridden definition not found.",
+                definitionDao.getDefinition("test.def.overridden", null));
+        assertNotNull("test.def.overridden definition in FRENCH locale not found.",
+                definitionDao.getDefinition("test.def.overridden", Locale.FRENCH));
+
+        assertEquals("Incorrect default country value", "default", definitionDao.getDefinition("test.def1", null)
+                .getAttribute("country").getValue());
+        assertEquals("Incorrect US country value", "US", definitionDao.getDefinition("test.def1", Locale.US)
+                .getAttribute("country").getValue());
+        assertEquals("Incorrect France country value", "France", definitionDao
+                .getDefinition("test.def1", Locale.FRENCH).getAttribute("country").getValue());
+        assertEquals("Incorrect Chinese country value (should be default)", "default",
+                definitionDao.getDefinition("test.def1", Locale.CHINA).getAttribute("country").getValue());
+        assertEquals("Incorrect default country value", "default",
+                definitionDao.getDefinition("test.def.overridden", null).getAttribute("country").getValue());
+        assertEquals("Incorrect default title value", "Definition to be overridden",
+                definitionDao.getDefinition("test.def.overridden", null).getAttribute("title").getValue());
+        assertEquals("Incorrect France country value", "France",
+                definitionDao.getDefinition("test.def.overridden", Locale.FRENCH).getAttribute("country").getValue());
+        assertNull("Definition in French not found", definitionDao.getDefinition("test.def.overridden", Locale.FRENCH)
+                .getAttribute("title"));
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#getDefinitions(Locale)}.
+     */
+    public void testGetDefinitions() {
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        definitionDao.setReader(reader);
+
+        Map<String, Definition> defaultDefinitions = definitionDao.getDefinitions(null);
+        Map<String, Definition> usDefinitions = definitionDao.getDefinitions(Locale.US);
+        Map<String, Definition> frenchDefinitions = definitionDao.getDefinitions(Locale.FRENCH);
+        Map<String, Definition> chinaDefinitions = definitionDao.getDefinitions(Locale.CHINA);
+        Map<String, Definition> canadaFrenchDefinitions = definitionDao.getDefinitions(Locale.CANADA_FRENCH);
+
+        assertNotNull("test.def1 definition not found.", defaultDefinitions.get("test.def1"));
+        assertNotNull("test.def2 definition not found.", defaultDefinitions.get("test.def2"));
+        assertNotNull("test.def3 definition not found.", defaultDefinitions.get("test.def3"));
+        assertNotNull("test.common definition not found.", defaultDefinitions.get("test.common"));
+        assertNotNull("test.common definition in US locale not found.", usDefinitions.get("test.common"));
+        assertNotNull("test.common definition in FRENCH locale not found.", frenchDefinitions.get("test.common"));
+        assertNotNull("test.common definition in CHINA locale not found.", chinaDefinitions.get("test.common"));
+        assertNotNull("test.common.french definition in FRENCH locale not found.",
+                frenchDefinitions.get("test.common.french"));
+        assertNotNull("test.common.french definition in CANADA_FRENCH locale not found.",
+                canadaFrenchDefinitions.get("test.common.french"));
+        assertNotNull("test.def.toextend definition not found.", defaultDefinitions.get("test.def.toextend"));
+        assertNotNull("test.def.overridden definition not found.", defaultDefinitions.get("test.def.overridden"));
+        assertNotNull("test.def.overridden definition in FRENCH locale not found.",
+                frenchDefinitions.get("test.def.overridden"));
+
+        assertEquals("Incorrect default country value", "default",
+                defaultDefinitions.get("test.def1").getAttribute("country").getValue());
+        assertEquals("Incorrect US country value", "US", usDefinitions.get("test.def1").getAttribute("country")
+                .getValue());
+        assertEquals("Incorrect France country value", "France",
+                frenchDefinitions.get("test.def1").getAttribute("country").getValue());
+        assertEquals("Incorrect Chinese country value (should be default)", "default", chinaDefinitions
+                .get("test.def1").getAttribute("country").getValue());
+        assertEquals("Incorrect default country value", "default", defaultDefinitions.get("test.def.overridden")
+                .getAttribute("country").getValue());
+        assertEquals("Incorrect default title value", "Definition to be overridden",
+                defaultDefinitions.get("test.def.overridden").getAttribute("title").getValue());
+        assertEquals("Incorrect France country value", "France", frenchDefinitions.get("test.def.overridden")
+                .getAttribute("country").getValue());
+        assertNull("Definition in French not found", frenchDefinitions.get("test.def.overridden").getAttribute("title"));
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#setSources(List)}.
+     */
+    public void testSetSourceURLs() {
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        assertEquals("The source URLs are not set correctly", sourceURLs, definitionDao.sources);
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#setReader(DefinitionsReader)}.
+     */
+    public void testSetReader() {
+        DefinitionsReader reader = createMock(DefinitionsReader.class);
+        replay(reader);
+        definitionDao.setReader(reader);
+        assertEquals("There reader has not been set correctly", reader, definitionDao.reader);
+        verify(reader);
+    }
+
+    /**
+     * Tests execution.
+     *
+     * @throws IOException If something goes wrong.
+     */
+    public void testInit() throws IOException {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        List<ApplicationResource> urlSet = new ArrayList<ApplicationResource>();
+        urlSet.add(url1);
+        expect(applicationContext.getResources("/WEB-INF/tiles.xml")).andReturn(urlSet);
+        replay(applicationContext);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        definitionDao.setReader(reader);
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        definitionDao.setSources(sourceURLs);
+        assertEquals("The reader is not of the correct class", DigesterDefinitionsReader.class,
+                definitionDao.reader.getClass());
+        assertEquals("The source URLs are not correct", sourceURLs, definitionDao.sources);
+        reset(applicationContext);
+
+        definitionDao.setReader(new MockDefinitionsReader());
+        assertEquals("The reader is not of the correct class", MockDefinitionsReader.class,
+                definitionDao.reader.getClass());
+        sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        assertEquals("The source URLs are not correct", sourceURLs, definitionDao.sources);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/ResolvingLocaleUrlDefinitionDAOTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/ResolvingLocaleUrlDefinitionDAOTest.java
new file mode 100644
index 0000000..27642b3
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/dao/ResolvingLocaleUrlDefinitionDAOTest.java
@@ -0,0 +1,400 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.dao;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.apache.tiles.definition.MockDefinitionsReader;
+import org.apache.tiles.definition.NoSuchDefinitionException;
+import org.apache.tiles.definition.digester.DigesterDefinitionsReader;
+import org.apache.tiles.definition.pattern.BasicPatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.PatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.wildcard.WildcardDefinitionPatternMatcherFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.locale.URLApplicationResource;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link ResolvingLocaleUrlDefinitionDAO}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ResolvingLocaleUrlDefinitionDAOTest {
+
+    /**
+     * The number of attribute names.
+     */
+    private static final int ATTRIBUTE_NAMES_COUNT = 6;
+
+    /**
+     * The object to test.
+     */
+    private ResolvingLocaleUrlDefinitionDAO definitionDao;
+
+    private ApplicationContext applicationContext;
+
+    private ApplicationResource url1;
+    private ApplicationResource url2;
+    private ApplicationResource url3;
+    private ApplicationResource urlWildcard;
+    private ApplicationResource url21;
+    private ApplicationResource url513;
+
+    private ApplicationResource setupUrl(String filename, Locale... locales) throws IOException {
+        ApplicationResource url = new URLApplicationResource("org/apache/tiles/config/" + filename + ".xml", this
+                .getClass().getClassLoader().getResource("org/apache/tiles/config/" + filename + ".xml"));
+        assertNotNull("Could not load " + filename + " file.", url);
+        expect(applicationContext.getResource(url.getLocalePath())).andReturn(url).anyTimes();
+        expect(applicationContext.getResource(url, Locale.ROOT)).andReturn(url).anyTimes();
+        Map<Locale, ApplicationResource> localeResources = new HashMap<Locale, ApplicationResource>();
+        for (Locale locale : locales) {
+            ApplicationResource urlLocale = new URLApplicationResource("org/apache/tiles/config/" + filename + "_"
+                    + locale.toString() + ".xml", this.getClass().getClassLoader()
+                    .getResource("org/apache/tiles/config/" + filename + "_" + locale.toString() + ".xml"));
+            assertNotNull("Could not load " + filename + "_" + locale.toString() + " file.", urlLocale);
+            localeResources.put(locale, urlLocale);
+        }
+        for (Locale locale : new Locale[] { Locale.CANADA_FRENCH, Locale.FRENCH, Locale.US, Locale.ENGLISH,
+                Locale.CHINA, Locale.CHINESE, Locale.ITALY, Locale.ITALIAN, new Locale("es", "CO"), new Locale("es", "CA") }) {
+            ApplicationResource urlLocale = localeResources.get(locale);
+            expect(applicationContext.getResource(url, locale)).andReturn(urlLocale).anyTimes();
+        }
+        return url;
+    }
+
+    /** {@inheritDoc} */
+    @Before
+    public void setUp() throws IOException {
+        // Set up multiple data sources.
+        applicationContext = createMock(ApplicationContext.class);
+        url1 = setupUrl("defs1", Locale.FRENCH, Locale.CANADA_FRENCH, Locale.US);
+        url2 = setupUrl("defs2");
+        url3 = setupUrl("defs3");
+        urlWildcard = setupUrl("defs-wildcard");
+        url21 = setupUrl("tiles-defs-2.1", Locale.ITALIAN);
+        url513 = setupUrl("defs-tiles-513");
+        replay(applicationContext);
+
+        definitionDao = new ResolvingLocaleUrlDefinitionDAO(applicationContext);
+        WildcardDefinitionPatternMatcherFactory definitionPatternMatcherFactory = new WildcardDefinitionPatternMatcherFactory();
+        PatternDefinitionResolver<Locale> definitionResolver = new BasicPatternDefinitionResolver<Locale>(
+                definitionPatternMatcherFactory, definitionPatternMatcherFactory);
+        definitionDao.setPatternDefinitionResolver(definitionResolver);
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#getDefinition(String, Locale)}.
+     */
+    @Test
+    public void testGetDefinition() {
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        definitionDao.setReader(reader);
+
+        assertNotNull("test.def1 definition not found.", definitionDao.getDefinition("test.def1", null));
+        assertNotNull("test.def2 definition not found.", definitionDao.getDefinition("test.def2", null));
+        assertNotNull("test.def3 definition not found.", definitionDao.getDefinition("test.def3", null));
+        assertNotNull("test.common definition not found.", definitionDao.getDefinition("test.common", null));
+        assertNotNull("test.common definition in US locale not found.",
+                definitionDao.getDefinition("test.common", Locale.US));
+        assertNotNull("test.common definition in FRENCH locale not found.",
+                definitionDao.getDefinition("test.common", Locale.FRENCH));
+        assertNotNull("test.common definition in CHINA locale not found.",
+                definitionDao.getDefinition("test.common", Locale.CHINA));
+        assertNotNull("test.common.french definition in FRENCH locale not found.",
+                definitionDao.getDefinition("test.common.french", Locale.FRENCH));
+        assertNotNull("test.common.french definition in CANADA_FRENCH locale not found.",
+                definitionDao.getDefinition("test.common.french", Locale.CANADA_FRENCH));
+        assertNotNull("test.def.toextend definition not found.", definitionDao.getDefinition("test.def.toextend", null));
+        assertNotNull("test.def.overridden definition not found.",
+                definitionDao.getDefinition("test.def.overridden", null));
+        assertNotNull("test.def.overridden definition in FRENCH locale not found.",
+                definitionDao.getDefinition("test.def.overridden", Locale.FRENCH));
+
+        assertEquals("Incorrect default country value", "default", definitionDao.getDefinition("test.def1", null)
+                .getAttribute("country").getValue());
+        assertEquals("Incorrect US country value", "US", definitionDao.getDefinition("test.def1", Locale.US)
+                .getAttribute("country").getValue());
+        assertEquals("Incorrect France country value", "France", definitionDao
+                .getDefinition("test.def1", Locale.FRENCH).getAttribute("country").getValue());
+        assertEquals("Incorrect Chinese country value (should be default)", "default",
+                definitionDao.getDefinition("test.def1", Locale.CHINA).getAttribute("country").getValue());
+        assertEquals("Incorrect default country value", "default",
+                definitionDao.getDefinition("test.def.overridden", null).getAttribute("country").getValue());
+        assertEquals("Incorrect default title value", "Definition to be overridden",
+                definitionDao.getDefinition("test.def.overridden", null).getAttribute("title").getValue());
+        assertEquals("Incorrect France country value", "France",
+                definitionDao.getDefinition("test.def.overridden", Locale.FRENCH).getAttribute("country").getValue());
+        assertEquals("Incorrect France title value", "Definition to be extended",
+                definitionDao.getDefinition("test.def.overridden", Locale.FRENCH).getAttribute("title").getValue());
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#getDefinitions(Locale)}.
+     */
+    @Test
+    public void testGetDefinitions() {
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        definitionDao.setReader(reader);
+
+        Map<String, Definition> defaultDefinitions = definitionDao.getDefinitions(null);
+        Map<String, Definition> usDefinitions = definitionDao.getDefinitions(Locale.US);
+        Map<String, Definition> frenchDefinitions = definitionDao.getDefinitions(Locale.FRENCH);
+        Map<String, Definition> chinaDefinitions = definitionDao.getDefinitions(Locale.CHINA);
+        Map<String, Definition> canadaFrendDefinitions = definitionDao.getDefinitions(Locale.CANADA_FRENCH);
+
+        assertNotNull("test.def1 definition not found.", defaultDefinitions.get("test.def1"));
+        assertNotNull("test.def2 definition not found.", defaultDefinitions.get("test.def2"));
+        assertNotNull("test.def3 definition not found.", defaultDefinitions.get("test.def3"));
+        assertNotNull("test.common definition not found.", defaultDefinitions.get("test.common"));
+        assertNotNull("test.common definition in US locale not found.", usDefinitions.get("test.common"));
+        assertNotNull("test.common definition in FRENCH locale not found.", frenchDefinitions.get("test.common"));
+        assertNotNull("test.common definition in CHINA locale not found.", chinaDefinitions.get("test.common"));
+        assertNotNull("test.common.french definition in FRENCH locale not found.",
+                canadaFrendDefinitions.get("test.common.french"));
+        assertNotNull("test.common.french definition in CANADA_FRENCH locale not found.",
+                canadaFrendDefinitions.get("test.common.french"));
+        assertNotNull("test.def.toextend definition not found.", defaultDefinitions.get("test.def.toextend"));
+        assertNotNull("test.def.overridden definition not found.", defaultDefinitions.get("test.def.overridden"));
+        assertNotNull("test.def.overridden definition in FRENCH locale not found.",
+                frenchDefinitions.get("test.def.overridden"));
+
+        assertEquals("Incorrect default country value", "default",
+                defaultDefinitions.get("test.def1").getAttribute("country").getValue());
+        assertEquals("Incorrect US country value", "US", usDefinitions.get("test.def1").getAttribute("country")
+                .getValue());
+        assertEquals("Incorrect France country value", "France",
+                frenchDefinitions.get("test.def1").getAttribute("country").getValue());
+        assertEquals("Incorrect Chinese country value (should be default)", "default", chinaDefinitions
+                .get("test.def1").getAttribute("country").getValue());
+        assertEquals("Incorrect default country value", "default", defaultDefinitions.get("test.def.overridden")
+                .getAttribute("country").getValue());
+        assertEquals("Incorrect default title value", "Definition to be overridden",
+                defaultDefinitions.get("test.def.overridden").getAttribute("title").getValue());
+        assertEquals("Incorrect France country value", "France", frenchDefinitions.get("test.def.overridden")
+                .getAttribute("country").getValue());
+        assertEquals("Incorrect France title value", "Definition to be extended",
+                frenchDefinitions.get("test.def.overridden").getAttribute("title").getValue());
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#setSources(List)}.
+     */
+    @Test
+    public void testSetSourceURLs() {
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        assertEquals("The source URLs are not set correctly", sourceURLs, definitionDao.sources);
+    }
+
+    /**
+     * Tests {@link LocaleUrlDefinitionDAO#setReader(DefinitionsReader)}.
+     */
+    @Test
+    public void testSetReader() {
+        DefinitionsReader reader = createMock(DefinitionsReader.class);
+        definitionDao.setReader(reader);
+        assertEquals("There reader has not been set correctly", reader, definitionDao.reader);
+    }
+
+    /**
+     * Tests {@link ResolvingLocaleUrlDefinitionDAO#resolveInheritance(Definition, Map, Locale, Set)}.
+     */
+    @Test(expected = NoSuchDefinitionException.class)
+    public void testResolveInheritanceNoParent() {
+        Definition definition = new Definition("mydef", null, null);
+        definition.setExtends("otherDef");
+        definitionDao.resolveInheritance(definition, new HashMap<String, Definition>(), Locale.ITALY,
+                new HashSet<String>());
+    }
+
+    /**
+     * Tests execution.
+     *
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testInit() throws IOException {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Set<ApplicationResource> urlSet = new HashSet<ApplicationResource>();
+        urlSet.add(url1);
+        expect(applicationContext.getResources("/WEB-INF/tiles.xml")).andReturn(urlSet);
+        replay(applicationContext);
+        DefinitionsReader reader = new DigesterDefinitionsReader();
+        definitionDao.setReader(reader);
+        List<ApplicationResource> sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        definitionDao.setSources(sourceURLs);
+        assertEquals("The reader is not of the correct class", DigesterDefinitionsReader.class,
+                definitionDao.reader.getClass());
+        assertEquals("The source URLs are not correct", sourceURLs, definitionDao.sources);
+        reset(applicationContext);
+
+        applicationContext = createMock(ApplicationContext.class);
+        replay(applicationContext);
+        definitionDao.setReader(new MockDefinitionsReader());
+        assertEquals("The reader is not of the correct class", MockDefinitionsReader.class,
+                definitionDao.reader.getClass());
+        sourceURLs = new ArrayList<ApplicationResource>();
+        sourceURLs.add(url1);
+        sourceURLs.add(url2);
+        sourceURLs.add(url3);
+        definitionDao.setSources(sourceURLs);
+        assertEquals("The source URLs are not correct", sourceURLs, definitionDao.sources);
+        verify(applicationContext);
+    }
+
+    /**
+     * Tests wildcard mappings.
+     */
+    @Test
+    public void testWildcardMapping() {
+        List<ApplicationResource> urls = new ArrayList<ApplicationResource>();
+        urls.add(urlWildcard);
+        definitionDao.setSources(urls);
+        definitionDao.setReader(new DigesterDefinitionsReader());
+
+        Definition definition = definitionDao.getDefinition("test.defName.subLayered", Locale.ITALY);
+        assertEquals("The template is not correct", "/testName.jsp", definition.getTemplateAttribute().getValue());
+        assertEquals("The header attribute is not correct", "/common/headerLayered.jsp",
+                definition.getAttribute("header").getValue());
+        definition = definitionDao.getDefinition("test.defName.subLayered", Locale.ITALIAN);
+        assertEquals("The template is not correct", "/testName.jsp", definition.getTemplateAttribute().getValue());
+        assertEquals("The header attribute is not correct", "/common/headerLayered.jsp",
+                definition.getAttribute("header").getValue());
+        definition = definitionDao.getDefinition("test.defName.subLayered", null);
+        assertEquals("The template is not correct", "/testName.jsp", definition.getTemplateAttribute().getValue());
+        assertEquals("The header attribute is not correct", "/common/headerLayered.jsp",
+                definition.getAttribute("header").getValue());
+        definition = definitionDao.getDefinition("test.defName.noAttribute", null);
+        assertEquals("/testName.jsp", definition.getTemplateAttribute().getValue());
+        assertEquals(null, definition.getLocalAttributeNames());
+        definition = definitionDao.getDefinition("test.def3", null);
+        assertNotNull("The simple definition is null", definition);
+
+        definition = definitionDao.getDefinition("test.extended.defName.subLayered", null);
+        assertEquals("test.defName.subLayered", definition.getExtends());
+        assertEquals(ATTRIBUTE_NAMES_COUNT, definition.getLocalAttributeNames().size());
+        assertEquals("The template is not correct", "/testName.jsp", definition.getTemplateAttribute().getValue());
+        assertEquals("Overridden Title", definition.getAttribute("title").getValue());
+        assertEquals("The header attribute is not correct", "/common/headerLayered.jsp",
+                definition.getAttribute("header").getValue());
+    }
+
+    /**
+     * Tests
+     * {@link ResolvingLocaleUrlDefinitionDAO#getDefinition(String, Locale)}
+     * when loading multiple files for a locale.
+     */
+    @Test
+    public void testListAttributeLocaleInheritance() {
+        List<ApplicationResource> urls = new ArrayList<ApplicationResource>();
+        urls.add(url21);
+        definitionDao.setSources(urls);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        definitionDao.setReader(new DigesterDefinitionsReader());
+        replay(applicationContext);
+
+        Definition definition = definitionDao.getDefinition("test.inherit.list", Locale.ITALIAN);
+        ListAttribute listAttribute = (ListAttribute) definition.getAttribute("list");
+        List<Attribute> attributes = listAttribute.getValue();
+        assertEquals(2, attributes.size());
+        verify(applicationContext);
+    }
+
+    /**
+     * Tests
+     * {@link ResolvingLocaleUrlDefinitionDAO#getDefinition(String, Locale)}
+     * to solve the TILES-512 issue.
+     *
+     * @throws IOException If something goes wrong.
+     */
+    public void testTiles512() throws IOException {
+        List<ApplicationResource> urls = new ArrayList<ApplicationResource>();
+        urls.add(url21);
+        definitionDao.setSources(urls);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        definitionDao.setReader(new DigesterDefinitionsReader());
+        replay(applicationContext);
+
+        Definition definition = definitionDao.getDefinition("test.inherit.othertype", Locale.ITALIAN);
+        assertEquals("/layout.ftl", definition.getTemplateAttribute().getValue());
+        assertEquals("freemarker", definition.getTemplateAttribute().getRenderer());
+    }
+
+    /**
+     * Tests
+     * {@link ResolvingLocaleUrlDefinitionDAO#getDefinition(String, Locale)}
+     * to solve the TILES-513 issue.
+     *
+     * @throws IOException If something goes wrong.
+     */
+    public void testTiles513() throws IOException {
+        List<ApplicationResource> urls = new ArrayList<ApplicationResource>();
+        urls.add(url513);
+        definitionDao.setSources(urls);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        definitionDao.setReader(new DigesterDefinitionsReader());
+        replay(applicationContext);
+
+        Definition definition = definitionDao.getDefinition("test.anonymous", null);
+        definitionDao.getDefinition("test.anonymous", new Locale("es", "CO"));
+        definitionDao.getDefinition("test.anonymous", new Locale("en", "CA"));
+        Attribute attribute = definition.getAttribute("header");
+        Definition child = definitionDao.getDefinition((String) attribute.getValue(), null);
+        assertNotNull(child);
+        attribute = definition.getAttribute("menu");
+        child = definitionDao.getDefinition((String) attribute.getValue(), null);
+        assertNotNull(child);
+        attribute = definition.getAttribute("footer");
+        child = definitionDao.getDefinition((String) attribute.getValue(), null);
+        assertNotNull(child);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/digester/DigesterDefinitionsReaderExceptionTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/digester/DigesterDefinitionsReaderExceptionTest.java
new file mode 100644
index 0000000..cd73885
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/digester/DigesterDefinitionsReaderExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.digester;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link DigesterDefinitionsReaderException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DigesterDefinitionsReaderExceptionTest {
+
+    /**
+     * Test method for {@link DigesterDefinitionsReaderException#DigesterDefinitionsReaderException()}.
+     */
+    @Test
+    public void testDigesterDefinitionsReaderException() {
+        DigesterDefinitionsReaderException exception = new DigesterDefinitionsReaderException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link DigesterDefinitionsReaderException#DigesterDefinitionsReaderException(java.lang.String)}.
+     */
+    @Test
+    public void testDigesterDefinitionsReaderExceptionString() {
+        DigesterDefinitionsReaderException exception = new DigesterDefinitionsReaderException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link DigesterDefinitionsReaderException#DigesterDefinitionsReaderException(Throwable)}.
+     */
+    @Test
+    public void testDigesterDefinitionsReaderExceptionThrowable() {
+        Throwable cause = new Throwable();
+        DigesterDefinitionsReaderException exception = new DigesterDefinitionsReaderException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link DigesterDefinitionsReaderException#DigesterDefinitionsReaderException(String, Throwable)}.
+     */
+    @Test
+    public void testDigesterDefinitionsReaderExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        DigesterDefinitionsReaderException exception = new DigesterDefinitionsReaderException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/digester/TestDigesterDefinitionsReader.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/digester/TestDigesterDefinitionsReader.java
new file mode 100644
index 0000000..44742fe
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/digester/TestDigesterDefinitionsReader.java
@@ -0,0 +1,320 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.digester;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.definition.DefinitionsFactoryException;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Tests the <code>org.apache.tiles.definition.digester.DigesterDefinitionsReader</code> class.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestDigesterDefinitionsReader {
+
+    /**
+     * The logging object.
+     */
+    private final Logger log = LoggerFactory
+            .getLogger(TestDigesterDefinitionsReader.class);
+
+    /**
+     * The definitions reader.
+     */
+    private DigesterDefinitionsReader reader;
+
+    /**
+     * Sets up the test.
+     *
+     * @throws Exception
+     */
+    @Before
+    public void setUp() {
+        reader = new DigesterDefinitionsReader();
+    }
+
+    /**
+     * Tests the read method under normal conditions.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testRead() throws IOException {
+        URL configFile = this.getClass().getClassLoader().getResource(
+                "org/apache/tiles/config/tiles-defs.xml");
+        assertNotNull("Config file not found", configFile);
+
+        InputStream source = configFile.openStream();
+        Map<String, Definition> definitions = reader.read(source);
+
+        assertNotNull("Definitions not returned.", definitions);
+        assertNotNull("Couldn't find doc.mainLayout tile.",
+                definitions.get("doc.mainLayout"));
+        assertNotNull("Couldn't Find title attribute.", definitions.get(
+                "doc.mainLayout").getAttribute("title").getValue());
+        assertEquals("Incorrect Find title attribute.",
+                "Tiles Library Documentation", definitions.get(
+                        "doc.mainLayout").getAttribute("title").getValue());
+
+        Definition def = definitions.get("doc.role.test");
+        assertNotNull("Couldn't find doc.role.test tile.", def);
+        Attribute attribute = def.getAttribute("title");
+        assertNotNull("Couldn't Find title attribute.", attribute
+                .getValue());
+        assertEquals("Role 'myrole' expected", attribute.getRole(),
+                "myrole");
+
+        def = definitions.get("doc.listattribute.test");
+        assertNotNull("Couldn't find doc.listattribute.test tile.", def);
+        attribute = def.getAttribute("items");
+        assertNotNull("Couldn't Find items attribute.", attribute);
+        assertTrue("The class of the attribute is not right",
+                attribute instanceof ListAttribute);
+        assertTrue("The class of value of the attribute is not right",
+                attribute.getValue() instanceof List);
+    }
+
+
+    /**
+     * Tests the read method under normal conditions for the new features in 2.1
+     * version of the DTD.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testRead21Version() throws IOException {
+        URL configFile = this.getClass().getClassLoader().getResource(
+                "org/apache/tiles/config/tiles-defs-2.1.xml");
+        assertNotNull("Config file not found", configFile);
+
+        InputStream source = configFile.openStream();
+        Map<String, Definition> definitions = reader.read(source);
+
+        assertNotNull("Definitions not returned.", definitions);
+        Definition def = definitions.get("doc.cascaded.test");
+
+        assertNotNull("Couldn't find doc.role.test tile.", def);
+        Attribute attribute = def.getLocalAttribute("title");
+        assertNotNull("Couldn't Find title local attribute.", attribute);
+        attribute = def.getCascadedAttribute("title2");
+        assertNotNull("Couldn't Find title2 cascaded attribute.", attribute);
+        attribute = def.getLocalAttribute("items1");
+        assertNotNull("Couldn't Find items1 local attribute.", attribute);
+        attribute = def.getCascadedAttribute("items2");
+        assertNotNull("Couldn't Find items2 cascaded attribute.", attribute);
+
+        def = definitions.get("test.nesting.definitions");
+        assertNotNull("Couldn't find test.nesting.definitions tile.", def);
+        assertEquals("/layout.jsp", def.getTemplateAttribute().getValue());
+        assertEquals("template", def.getTemplateAttribute().getRenderer());
+        attribute = def.getAttribute("body");
+        assertNotNull("Couldn't Find body attribute.", attribute);
+        assertEquals("Attribute not of 'definition' type", "definition",
+                attribute.getRenderer());
+        assertNotNull("Attribute value null", attribute.getValue());
+        String defName = attribute.getValue().toString();
+        def = definitions.get(defName);
+        assertNotNull("Couldn't find " + defName + " tile.", def);
+
+        def = definitions.get("test.nesting.list.definitions");
+        assertNotNull("Couldn't find test.nesting.list.definitions tile.",
+                def);
+        attribute = def.getAttribute("list");
+        assertNotNull("Couldn't Find list attribute.", attribute);
+        assertTrue("Attribute not of valid type",
+                attribute instanceof ListAttribute);
+        ListAttribute listAttribute = (ListAttribute) attribute;
+        List<Attribute> list = listAttribute.getValue();
+        assertEquals("The list is not of correct size", 1, list.size());
+        attribute = list.get(0);
+        assertNotNull("Couldn't Find element attribute.", attribute);
+        assertEquals("Attribute not of 'definition' type", "definition",
+                attribute.getRenderer());
+        assertNotNull("Attribute value null", attribute.getValue());
+        defName = attribute.getValue().toString();
+        def = definitions.get(defName);
+        assertNotNull("Couldn't find " + defName + " tile.", def);
+
+        defName = "test.inherit.list.base";
+        def = definitions.get(defName);
+        assertNotNull("Couldn't find " + defName + " tile.", def);
+        defName = "test.inherit.list";
+        def = definitions.get(defName);
+        assertNotNull("Couldn't find " + defName + " tile.", def);
+        listAttribute = (ListAttribute) def.getAttribute("list");
+        assertEquals("This definition does not inherit its list attribute",
+                true, listAttribute.isInherit());
+        defName = "test.noinherit.list";
+        def = definitions.get(defName);
+        listAttribute = (ListAttribute) def.getAttribute("list");
+        assertEquals("This definition inherits its list attribute",
+                false, listAttribute.isInherit());
+
+        defName = "test.new.attributes";
+        def = definitions.get(defName);
+        assertNotNull("Couldn't find " + defName + " tile.", def);
+        Attribute templateAttribute = def.getTemplateAttribute();
+        assertEquals(templateAttribute.getExpressionObject().getExpression(),
+                "${my.expression}");
+        assertEquals("mytype", templateAttribute.getRenderer());
+        attribute = def.getAttribute("body");
+        assertNotNull("Couldn't Find body attribute.", attribute);
+        assertEquals("${my.attribute.expression}", attribute
+                .getExpressionObject().getExpression());
+    }
+
+    /**
+     * Tests read with bad input source.
+     */
+    @Test
+    public void testBadSource() {
+        try {
+            // Read definitions.
+            reader.read(new String("Bad Input"));
+            fail("Should've thrown an exception.");
+        } catch (DefinitionsFactoryException e) {
+            // correct.
+            if (log.isDebugEnabled()) {
+                log.debug("Exception caught, it is OK", e);
+            }
+        } catch (Exception e) {
+            fail("Exception reading configuration." + e);
+        }
+    }
+
+    /**
+     * Tests read with bad XML source.
+     */
+    @Test
+    public void testBadXml() {
+        try {
+            URL configFile = this.getClass().getClassLoader().getResource(
+                    "org/apache/tiles/config/malformed-defs.xml");
+            assertNotNull("Config file not found", configFile);
+
+            InputStream source = configFile.openStream();
+            reader.read(source);
+            fail("Should've thrown an exception.");
+        } catch (DefinitionsFactoryException e) {
+            // correct.
+            if (log.isDebugEnabled()) {
+                log.debug("Exception caught, it is OK", e);
+            }
+        } catch (Exception e) {
+            fail("Exception reading configuration." + e);
+        }
+    }
+
+    /**
+     * Tests the validating input parameter.
+     *
+     * This test case enables Digester's validating property then passes in a
+     * configuration file with invalid XML.
+     */
+    @Test
+    public void testValidatingParameter() {
+        // Testing with default (validation ON).
+        try {
+            URL configFile = this.getClass().getClassLoader().getResource(
+                    "org/apache/tiles/config/invalid-defs.xml");
+            assertNotNull("Config file not found", configFile);
+
+            InputStream source = configFile.openStream();
+            reader.setValidating(true);
+            reader.read(source);
+            fail("Should've thrown an exception.");
+        } catch (DefinitionsFactoryException e) {
+            // correct.
+            if (log.isDebugEnabled()) {
+                log.debug("Exception caught, it is OK", e);
+            }
+        } catch (Exception e) {
+            fail("Exception reading configuration." + e);
+        }
+
+        // Testing with validation OFF.
+        try {
+            setUp();
+            URL configFile = this.getClass().getClassLoader().getResource(
+                    "org/apache/tiles/config/invalid-defs.xml");
+            assertNotNull("Config file not found", configFile);
+
+            InputStream source = configFile.openStream();
+            reader.read(source);
+        } catch (DefinitionsFactoryException e) {
+            fail("Should not have thrown an exception." + e);
+        } catch (Exception e) {
+            fail("Exception reading configuration." + e);
+        }
+    }
+
+    /**
+     * Regression test for bug TILES-352.
+     *
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testRegressionTiles352() throws IOException {
+        URL configFile = this.getClass().getClassLoader().getResource(
+                "org/apache/tiles/config/defs_regression_TILES-352.xml");
+        assertNotNull("Config file not found", configFile);
+
+        InputStream source = configFile.openStream();
+        Map<String, Definition> name2defs = reader.read(source);
+        source.close();
+        Definition root = name2defs.get("root");
+        Attribute attribute = root.getAttribute("body");
+        Definition child = name2defs.get(attribute.getValue());
+        ListAttribute listAttribute = (ListAttribute) child.getAttribute("list");
+        List<Attribute> list = listAttribute.getValue();
+        assertEquals((list.get(0)).getValue(), "This is a value");
+    }
+
+    /**
+     * Tests {@link DigesterDefinitionsReader#read(Object)}.
+     */
+    @Test
+    public void testReadNoSource() {
+        assertNull(reader.read(null));
+    }
+
+    /**
+     * Tests {@link DigesterDefinitionsReader#addDefinition(Definition)}.
+     */
+    @Test(expected = DigesterDefinitionsReaderException.class)
+    public void testAddDefinitionNoName() {
+        Definition def = new Definition();
+        reader.addDefinition(def);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/AbstractPatternDefinitionResolverTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/AbstractPatternDefinitionResolverTest.java
new file mode 100644
index 0000000..10a39a8
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/AbstractPatternDefinitionResolverTest.java
@@ -0,0 +1,116 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.junit.Test;
+
+/**
+ * Tests {@link AbstractPatternDefinitionResolver}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AbstractPatternDefinitionResolverTest {
+
+    /**
+     * Test method for
+     * {@link BasicPatternDefinitionResolver#resolveDefinition(String, Object)}.
+     */
+    @Test
+    public void testResolveDefinition() {
+        final DefinitionPatternMatcher firstMatcher = createMock(DefinitionPatternMatcher.class);
+        final DefinitionPatternMatcher thirdMatcher = createMock(DefinitionPatternMatcher.class);
+
+        Definition firstDefinition = new Definition("first", (Attribute) null,
+                null);
+        Definition secondDefinition = new Definition("second",
+                (Attribute) null, null);
+        Definition thirdDefinition = new Definition("third", (Attribute) null,
+                null);
+
+        Definition firstTransformedDefinition = new Definition(
+                "firstTransformed", (Attribute) null, null);
+        Definition thirdTransformedDefinition = new Definition(
+                "thirdTransformed", (Attribute) null, null);
+
+        expect(firstMatcher.createDefinition("firstTransformed")).andReturn(
+                firstTransformedDefinition);
+        expect(firstMatcher.createDefinition("secondTransformed")).andReturn(
+                null);
+        expect(firstMatcher.createDefinition("thirdTransformed")).andReturn(
+                null);
+        expect(thirdMatcher.createDefinition("thirdTransformed")).andReturn(
+                thirdTransformedDefinition).times(2);
+        expect(thirdMatcher.createDefinition("firstTransformed")).andReturn(
+                null);
+        expect(thirdMatcher.createDefinition("secondTransformed")).andReturn(
+                null).times(2);
+
+        replay(firstMatcher, thirdMatcher);
+        PatternDefinitionResolver<Integer> resolver = new AbstractPatternDefinitionResolver<Integer>() {
+
+            @Override
+            protected Map<String, Definition> addDefinitionsAsPatternMatchers(
+                    List<DefinitionPatternMatcher> matchers,
+                    Map<String, Definition> defsMap) {
+                if (defsMap.containsKey("first")) {
+                    matchers.add(firstMatcher);
+                }
+                if (defsMap.containsKey("third")) {
+                    matchers.add(thirdMatcher);
+                }
+                Map<String, Definition> retValue = new HashMap<String, Definition>(defsMap);
+                retValue.remove("first");
+                retValue.remove("third");
+                return retValue;
+            }
+
+        };
+        Map<String, Definition> localeDefsMap = new LinkedHashMap<String, Definition>();
+        localeDefsMap.put("first", firstDefinition);
+        localeDefsMap.put("second", secondDefinition);
+        localeDefsMap.put("third", thirdDefinition);
+        resolver.storeDefinitionPatterns(localeDefsMap, 1);
+        localeDefsMap = new LinkedHashMap<String, Definition>();
+        localeDefsMap.put("third", thirdDefinition);
+        resolver.storeDefinitionPatterns(localeDefsMap, 2);
+        assertEquals(firstTransformedDefinition, resolver.resolveDefinition(
+                "firstTransformed", 1));
+        assertNull(resolver.resolveDefinition("secondTransformed", 1));
+        assertEquals(thirdTransformedDefinition, resolver.resolveDefinition(
+                "thirdTransformed", 1));
+        assertNull(resolver.resolveDefinition("firstTransformed", 2));
+        assertNull(resolver.resolveDefinition("secondTransformed", 2));
+        assertEquals(thirdTransformedDefinition, resolver.resolveDefinition(
+                "thirdTransformed", 2));
+        verify(firstMatcher, thirdMatcher);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/BasicPatternDefinitionResolverTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/BasicPatternDefinitionResolverTest.java
new file mode 100644
index 0000000..31627ec
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/BasicPatternDefinitionResolverTest.java
@@ -0,0 +1,84 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.junit.Test;
+
+/**
+ * Tests {@link BasicPatternDefinitionResolver}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class BasicPatternDefinitionResolverTest {
+
+    /**
+     * Test method for
+     * {@link BasicPatternDefinitionResolver#addDefinitionsAsPatternMatchers(java.util.List, Map)}.
+     */
+    @Test
+    public void testAddDefinitionsAsPatternMatchers() {
+        DefinitionPatternMatcherFactory factory = createMock(DefinitionPatternMatcherFactory.class);
+        PatternRecognizer recognizer = createMock(PatternRecognizer.class);
+        DefinitionPatternMatcher firstMatcher = createMock(DefinitionPatternMatcher.class);
+        DefinitionPatternMatcher thirdMatcher = createMock(DefinitionPatternMatcher.class);
+
+        expect(recognizer.isPatternRecognized("first")).andReturn(true);
+        expect(recognizer.isPatternRecognized("second")).andReturn(false);
+        expect(recognizer.isPatternRecognized("third")).andReturn(true);
+
+        Definition firstDefinition = new Definition("first", (Attribute) null,
+                null);
+        Definition secondDefinition = new Definition("second",
+                (Attribute) null, null);
+        Definition thirdDefinition = new Definition("third", (Attribute) null,
+                null);
+
+        expect(factory.createDefinitionPatternMatcher("first", firstDefinition))
+                .andReturn(firstMatcher);
+        expect(factory.createDefinitionPatternMatcher("third", thirdDefinition))
+                .andReturn(thirdMatcher);
+
+        replay(factory, recognizer, firstMatcher, thirdMatcher);
+        BasicPatternDefinitionResolver<Integer> resolver = new BasicPatternDefinitionResolver<Integer>(
+                factory, recognizer);
+        Map<String, Definition> localeDefsMap = new LinkedHashMap<String, Definition>();
+        localeDefsMap.put("first", firstDefinition);
+        localeDefsMap.put("second", secondDefinition);
+        localeDefsMap.put("third", thirdDefinition);
+        List<DefinitionPatternMatcher> matchers = new ArrayList<DefinitionPatternMatcher>();
+        resolver.addDefinitionsAsPatternMatchers(matchers, localeDefsMap);
+        assertEquals(2, matchers.size());
+        assertEquals(firstMatcher, matchers.get(0));
+        assertEquals(thirdMatcher, matchers.get(1));
+        verify(factory, recognizer, firstMatcher, thirdMatcher);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/PatternUtilTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/PatternUtilTest.java
new file mode 100644
index 0000000..66218db
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/PatternUtilTest.java
@@ -0,0 +1,199 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.Expression;
+import org.apache.tiles.ListAttribute;
+import org.junit.Test;
+
+/**
+ * Tests {@link PatternUtil}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class PatternUtilTest {
+
+    /**
+     * The size of the list in the main list attribute.
+     */
+    private static final int LIST_ATTRIBUTE_SIZE = 3;
+
+    /**
+     * Test method for
+     * {@link PatternUtil#replacePlaceholders(Definition, String, Object[])}.
+     */
+    @Test
+    public void testReplacePlaceholders() {
+        Map<String, Attribute> attributes = new HashMap<String, Attribute>();
+        attributes.put("attrib1", new Attribute("value{2}"));
+        attributes.put("attrib2", new Attribute("value{2}{3}"));
+        attributes.put("attrib3", new Attribute(null, Expression
+                .createExpression("expr{1}", "EL"), null, null));
+        Definition definition = new Definition("definitionName", new Attribute(
+                "template{1}"), attributes);
+        definition.setExtends("{2}ext");
+        definition.setPreparer("{3}prep");
+        Definition nudef = PatternUtil.replacePlaceholders(definition, "nudef",
+                "value0", "value1", "value2", "value3");
+        assertEquals("nudef", nudef.getName());
+        assertEquals("value2ext", nudef.getExtends());
+        assertEquals("value3prep", nudef.getPreparer());
+        Attribute attribute = nudef.getTemplateAttribute();
+        assertEquals("templatevalue1", attribute.getValue());
+        attribute = nudef.getAttribute("attrib1");
+        assertEquals("valuevalue2", attribute.getValue());
+        attribute = nudef.getAttribute("attrib2");
+        assertEquals("valuevalue2value3", attribute.getValue());
+        attribute = nudef.getAttribute("attrib3");
+        assertEquals("exprvalue1", attribute.getExpressionObject().getExpression());
+    }
+
+    /**
+     * Test method for
+     * {@link PatternUtil#replacePlaceholders(Definition, String, Object[])}.
+     */
+    @Test
+    public void testReplacePlaceholdersNullTemplate() {
+        Map<String, Attribute> attributes = new HashMap<String, Attribute>();
+        attributes.put("attrib1", new Attribute("value{2}"));
+        attributes.put("attrib2", new Attribute("value{2}{3}"));
+        Definition definition = new Definition("definitionName", (Attribute) null, attributes);
+        Definition nudef = PatternUtil.replacePlaceholders(definition, "nudef",
+                "value0", "value1", "value2", "value3");
+        assertEquals("nudef", nudef.getName());
+        assertNull(nudef.getTemplateAttribute());
+        Attribute attribute = nudef.getAttribute("attrib1");
+        assertEquals("valuevalue2", attribute.getValue());
+        attribute = nudef.getAttribute("attrib2");
+        assertEquals("valuevalue2value3", attribute.getValue());
+    }
+
+    /**
+     * Test method for
+     * {@link PatternUtil#replacePlaceholders(Definition, String, Object[])}.
+     */
+    @Test
+    public void testReplacePlaceholdersCascadedAttributes() {
+        Definition definition = new Definition("definitionName", new Attribute(
+                "template{1}"), null);
+        definition.putAttribute("attrib1", new Attribute("value{2}"), true);
+        definition.putAttribute("attrib2", new Attribute("value{2}{3}"), true);
+        Definition nudef = PatternUtil.replacePlaceholders(definition, "nudef",
+                "value0", "value1", "value2", "value3");
+        assertEquals("nudef", nudef.getName());
+        Attribute attribute = nudef.getTemplateAttribute();
+        assertEquals("templatevalue1", attribute.getValue());
+        attribute = nudef.getAttribute("attrib1");
+        assertEquals("valuevalue2", attribute.getValue());
+        attribute = nudef.getAttribute("attrib2");
+        assertEquals("valuevalue2value3", attribute.getValue());
+    }
+
+    /**
+     * Test method for
+     * {@link PatternUtil#replacePlaceholders(Definition, String, Object[])}.
+     */
+    @Test
+    public void testReplacePlaceholdersListAttribute() {
+        Map<String, Attribute> attributes = new HashMap<String, Attribute>();
+        ListAttribute listAttribute = new ListAttribute();
+        ListAttribute internalListAttribute = new ListAttribute();
+        listAttribute.setInherit(true);
+        attributes.put("myList", listAttribute);
+        listAttribute.add(new Attribute("value{2}"));
+        listAttribute.add(new Attribute("value{2}{3}"));
+        listAttribute.add(internalListAttribute);
+        internalListAttribute.add(new Attribute("secondvalue{2}"));
+        internalListAttribute.add(new Attribute("secondvalue{2}{3}"));
+        Definition definition = new Definition("definitionName", new Attribute(
+                "template{1}"), attributes);
+        Definition nudef = PatternUtil.replacePlaceholders(definition, "nudef",
+                "value0", "value1", "value2", "value3");
+        assertEquals("nudef", nudef.getName());
+        Attribute attribute = nudef.getTemplateAttribute();
+        assertEquals("templatevalue1", attribute.getValue());
+        ListAttribute nuListAttribute = (ListAttribute) nudef.getAttribute("myList");
+        assertTrue(nuListAttribute.isInherit());
+        List<Attribute> list = nuListAttribute.getValue();
+        assertEquals(LIST_ATTRIBUTE_SIZE, list.size());
+        attribute = list.get(0);
+        assertEquals("valuevalue2", attribute.getValue());
+        attribute = list.get(1);
+        assertEquals("valuevalue2value3", attribute.getValue());
+        ListAttribute evaluatedListAttribute = (ListAttribute) list.get(2);
+        assertFalse(evaluatedListAttribute.isInherit());
+        list = evaluatedListAttribute.getValue();
+        assertEquals(2, list.size());
+        attribute = list.get(0);
+        assertEquals("secondvaluevalue2", attribute.getValue());
+        attribute = list.get(1);
+        assertEquals("secondvaluevalue2value3", attribute.getValue());
+    }
+
+
+    /**
+     * Tests {@link PatternUtil#createExtractedMap(Map, java.util.Set)}.
+     */
+    @Test
+    public void testCreateExtractedMap() {
+        Map<Integer, String> map = new HashMap<Integer, String>();
+        map.put(0, "value0");
+        map.put(1, "value1");
+        map.put(2, "value2");
+        Set<Integer> set = new HashSet<Integer>();
+        set.add(1);
+        set.add(2);
+        Map<Integer, String> extractedMap = PatternUtil.createExtractedMap(map, set);
+        assertEquals(2, extractedMap.size());
+        assertEquals("value1", extractedMap.get(1));
+        assertEquals("value2", extractedMap.get(2));
+    }
+
+    /**
+     * Test method for
+     * {@link PatternUtil#replacePlaceholders(Definition, String, Object[])}.
+     * See TILES-502
+     */
+    @Test
+    public void testReplacePlaceholdersEL() {
+        Map<String, Attribute> attributes = new HashMap<String, Attribute>();
+        attributes.put("something", new Attribute("some-{1}-${requestScope.someVariable}.jsp"));
+        Definition definition = new Definition("definitionName", new Attribute(
+                "template"), attributes);
+        Definition nudef = PatternUtil.replacePlaceholders(definition, "nudef",
+                "value0", "value1", "value2", "value3");
+        assertEquals("nudef", nudef.getName());
+        Attribute attribute = nudef.getAttribute("something");
+        assertEquals("some-value1-${requestScope.someVariable}.jsp", attribute.getValue());
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/PrefixedPatternDefinitionResolverTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/PrefixedPatternDefinitionResolverTest.java
new file mode 100644
index 0000000..aa5f525
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/PrefixedPatternDefinitionResolverTest.java
@@ -0,0 +1,78 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.junit.Test;
+
+/**
+ * Tests {@link PrefixedPatternDefinitionResolver}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class PrefixedPatternDefinitionResolverTest {
+
+    /**
+     * Test method for {@link PrefixedPatternDefinitionResolver#addDefinitionsAsPatternMatchers(List, Map)}.
+     */
+    @Test
+    public void testAddDefinitionsAsPatternMatchers() {
+        DefinitionPatternMatcherFactory factory1 = createMock(DefinitionPatternMatcherFactory.class);
+        DefinitionPatternMatcherFactory factory2 = createMock(DefinitionPatternMatcherFactory.class);
+        DefinitionPatternMatcher matcher1 = createMock(DefinitionPatternMatcher.class);
+        DefinitionPatternMatcher matcher2 = createMock(DefinitionPatternMatcher.class);
+        Definition definition1 = new Definition("DF1:definition1", (Attribute) null, null);
+        Definition definition2 = new Definition("DF2:definition2", (Attribute) null, null);
+        Definition definition3 = new Definition("noLanguageHere", (Attribute) null, null);
+
+        expect(factory1.createDefinitionPatternMatcher("definition1", definition1)).andReturn(matcher1);
+        expect(factory2.createDefinitionPatternMatcher("definition2", definition2)).andReturn(matcher2);
+
+        replay(factory1, factory2, matcher1, matcher2);
+
+        PrefixedPatternDefinitionResolver<Integer> resolver = new PrefixedPatternDefinitionResolver<Integer>();
+        resolver.registerDefinitionPatternMatcherFactory("DF1", factory1);
+        resolver.registerDefinitionPatternMatcherFactory("DF2", factory2);
+        List<DefinitionPatternMatcher> matchers = new ArrayList<DefinitionPatternMatcher>();
+        Map<String, Definition> definitions = new LinkedHashMap<String, Definition>();
+        definitions.put("DF1:definition1", definition1);
+        definitions.put("DF2:definition2", definition2);
+        definitions.put("noLanguageHere", definition3);
+
+        resolver.addDefinitionsAsPatternMatchers(matchers, definitions);
+
+        assertEquals(2, matchers.size());
+        assertEquals(matcher1, matchers.get(0));
+        assertEquals(matcher2, matchers.get(1));
+
+        verify(factory1, factory2, matcher1, matcher2);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcherFactoryTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcherFactoryTest.java
new file mode 100644
index 0000000..bc21eb4
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcherFactoryTest.java
@@ -0,0 +1,60 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern.regexp;
+
+import static org.junit.Assert.*;
+
+import org.apache.tiles.Definition;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link RegexpDefinitionPatternMatcherFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class RegexpDefinitionPatternMatcherFactoryTest {
+
+    /**
+     * The object to test.
+     */
+    private RegexpDefinitionPatternMatcherFactory factory;
+
+    /**
+     * Sets up the object to test.
+     */
+    @Before
+    public void setUp() {
+        factory = new RegexpDefinitionPatternMatcherFactory();
+    }
+
+    /**
+     * Test method for
+     * {@link RegexpDefinitionPatternMatcherFactory#createDefinitionPatternMatcher(String, Definition)}
+     * .
+     */
+    @Test
+    public void testCreateDefinitionPatternMatcher() {
+        assertTrue(factory.createDefinitionPatternMatcher("myPattern",
+                new Definition()) instanceof RegexpDefinitionPatternMatcher);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcherTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcherTest.java
new file mode 100644
index 0000000..9bf0c14
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/regexp/RegexpDefinitionPatternMatcherTest.java
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern.regexp;
+
+import static org.junit.Assert.*;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.pattern.DefinitionPatternMatcher;
+import org.junit.Test;
+
+/**
+ * Tests {@link RegexpDefinitionPatternMatcher}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class RegexpDefinitionPatternMatcherTest {
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.definition.pattern.RegexpPatternDefinitionResolver
+     * #resolveDefinition(java.lang.String, java.lang.Object)}.
+     */
+    @Test
+    public void testResolveDefinition() {
+        Definition def = new Definition();
+        def.setName("testDef(.*)\\.message(.*)");
+        def.setTemplateAttribute(Attribute.createTemplateAttribute("/test{1}.jsp"));
+        def.putAttribute("body", new Attribute("message{2}"));
+        DefinitionPatternMatcher patternMatcher = new RegexpDefinitionPatternMatcher("testDef(.*)\\.message(.*)", def);
+        Definition result = patternMatcher.createDefinition("testDefOne.messageTwo");
+        assertNotNull(result);
+        assertEquals("testDefOne.messageTwo", result.getName());
+        assertEquals("/testOne.jsp", result.getTemplateAttribute().getValue());
+        assertEquals("messageTwo", result.getAttribute("body").getValue());
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcherFactoryTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcherFactoryTest.java
new file mode 100644
index 0000000..a8508f0
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcherFactoryTest.java
@@ -0,0 +1,70 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern.wildcard;
+
+import static org.junit.Assert.*;
+
+import org.apache.tiles.Definition;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link WildcardDefinitionPatternMatcherFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class WildcardDefinitionPatternMatcherFactoryTest {
+
+    /**
+     * The object to test.
+     */
+    private WildcardDefinitionPatternMatcherFactory factory;
+
+    /**
+     * Sets up the object to test.
+     */
+    @Before
+    public void setUp() {
+        factory = new WildcardDefinitionPatternMatcherFactory();
+    }
+
+    /**
+     * Test method for
+     * {@link WildcardDefinitionPatternMatcherFactory#createDefinitionPatternMatcher(String, Definition)}
+     * .
+     */
+    @Test
+    public void testCreateDefinitionPatternMatcher() {
+        assertTrue(factory.createDefinitionPatternMatcher("myPattern",
+                new Definition()) instanceof WildcardDefinitionPatternMatcher);
+    }
+
+    /**
+     * Test method for {@link WildcardDefinitionPatternMatcherFactory#isPatternRecognized(String)}.
+     */
+    @Test
+    public void testIsPatternRecognized() {
+        assertTrue(factory.isPatternRecognized("my*pattern"));
+        assertFalse(factory.isPatternRecognized("mypattern"));
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcherTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcherTest.java
new file mode 100644
index 0000000..380f2ef
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/definition/pattern/wildcard/WildcardDefinitionPatternMatcherTest.java
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.definition.pattern.wildcard;
+
+import static org.junit.Assert.*;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.pattern.DefinitionPatternMatcher;
+import org.apache.tiles.util.WildcardHelper;
+import org.junit.Test;
+
+/**
+ * Tests {@link WildcardDefinitionPatternMatcher}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class WildcardDefinitionPatternMatcherTest {
+
+    /**
+     * Test method for {@link WildcardDefinitionPatternMatcher#createDefinition(String)}.
+     */
+    @Test
+    public void testResolveDefinition() {
+        Definition def = new Definition();
+        def.setName("testDef*.message*");
+        def.setTemplateAttribute(Attribute.createTemplateAttribute("/test{1}.jsp"));
+        def.putAttribute("body", new Attribute("message{2}"));
+        DefinitionPatternMatcher patternMatcher = new WildcardDefinitionPatternMatcher(
+                "testDef*.message*", def, new WildcardHelper());
+        Definition result = patternMatcher.createDefinition("testDefOne.messageTwo");
+        assertNotNull(result);
+        assertEquals("testDefOne.messageTwo", result.getName());
+        assertEquals("/testOne.jsp", result.getTemplateAttribute().getValue());
+        assertEquals("messageTwo", result.getAttribute("body").getValue());
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/evaluator/BasicAttributeEvaluatorFactoryTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/evaluator/BasicAttributeEvaluatorFactoryTest.java
new file mode 100644
index 0000000..4733fd3
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/evaluator/BasicAttributeEvaluatorFactoryTest.java
@@ -0,0 +1,88 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.evaluator;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Expression;
+import org.junit.Test;
+
+/**
+ * Tests {@link BasicAttributeEvaluatorFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class BasicAttributeEvaluatorFactoryTest {
+
+    /**
+     * Test method for {@link BasicAttributeEvaluatorFactory#getAttributeEvaluator(String)}.
+     */
+    @Test
+    public void testGetAttributeEvaluatorString() {
+        AttributeEvaluator defaultEvaluator = createMock(AttributeEvaluator.class);
+        AttributeEvaluator evaluator1 = createMock(AttributeEvaluator.class);
+        AttributeEvaluator evaluator2 = createMock(AttributeEvaluator.class);
+        replay(defaultEvaluator, evaluator1, evaluator2);
+        BasicAttributeEvaluatorFactory factory = new BasicAttributeEvaluatorFactory(defaultEvaluator);
+        factory.registerAttributeEvaluator("LANG1", evaluator1);
+        factory.registerAttributeEvaluator("LANG2", evaluator2);
+        assertSame(evaluator1, factory.getAttributeEvaluator("LANG1"));
+        assertSame(evaluator2, factory.getAttributeEvaluator("LANG2"));
+        assertSame(defaultEvaluator, factory.getAttributeEvaluator("LANG3"));
+        verify(defaultEvaluator, evaluator1, evaluator2);
+    }
+
+    /**
+     * Test method for {@link BasicAttributeEvaluatorFactory#getAttributeEvaluator(Attribute)}.
+     */
+    @Test
+    public void testGetAttributeEvaluatorAttribute() {
+        AttributeEvaluator defaultEvaluator = createMock(AttributeEvaluator.class);
+        AttributeEvaluator evaluator1 = createMock(AttributeEvaluator.class);
+        AttributeEvaluator evaluator2 = createMock(AttributeEvaluator.class);
+        replay(defaultEvaluator, evaluator1, evaluator2);
+        BasicAttributeEvaluatorFactory factory = new BasicAttributeEvaluatorFactory(defaultEvaluator);
+        factory.registerAttributeEvaluator("LANG1", evaluator1);
+        factory.registerAttributeEvaluator("LANG2", evaluator2);
+        assertSame(evaluator1, factory
+                .getAttributeEvaluator(createExpressionAttribute("LANG1")));
+        assertSame(evaluator2, factory
+                .getAttributeEvaluator(createExpressionAttribute("LANG2")));
+        assertSame(defaultEvaluator, factory
+                .getAttributeEvaluator(createExpressionAttribute("LANG3")));
+        verify(defaultEvaluator, evaluator1, evaluator2);
+    }
+
+    /**
+     * Creates a sample attribute with an expression.
+     *
+     * @param language The expression language.
+     * @return The attribute.
+     */
+    private Attribute createExpressionAttribute(String language) {
+        return new Attribute(null, Expression.createExpression(
+                "myExpression", language), null, "string");
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/evaluator/EvaluatorExceptionTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/evaluator/EvaluatorExceptionTest.java
new file mode 100644
index 0000000..96cf391
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/evaluator/EvaluatorExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.evaluator;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link EvaluationException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class EvaluatorExceptionTest {
+
+    /**
+     * Test method for {@link EvaluationException#EvaluationException()}.
+     */
+    @Test
+    public void testEvaluationException() {
+        EvaluationException exception = new EvaluationException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link EvaluationException#EvaluationException(java.lang.String)}.
+     */
+    @Test
+    public void testEvaluationExceptionString() {
+        EvaluationException exception = new EvaluationException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link EvaluationException#EvaluationException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testEvaluationExceptionThrowable() {
+        Throwable cause = new Throwable();
+        EvaluationException exception = new EvaluationException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link EvaluationException#EvaluationException(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testEvaluationExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        EvaluationException exception = new EvaluationException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/evaluator/impl/DirectAttributeEvaluatorTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/evaluator/impl/DirectAttributeEvaluatorTest.java
new file mode 100644
index 0000000..4b4e830
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/evaluator/impl/DirectAttributeEvaluatorTest.java
@@ -0,0 +1,93 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.evaluator.impl;
+
+import static org.junit.Assert.*;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Expression;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link DirectAttributeEvaluator}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DirectAttributeEvaluatorTest {
+
+    /**
+     * The evaluator to test.
+     */
+    private DirectAttributeEvaluator evaluator;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        evaluator = new DirectAttributeEvaluator();
+    }
+
+    /**
+     * Tests
+     * {@link DirectAttributeEvaluator#evaluate(Attribute, org.apache.tiles.request.Request)}.
+     */
+    @Test
+    public void testEvaluate() {
+        String expression = "This is an expression";
+        Attribute attribute = new Attribute(null, Expression.createExpression(
+                expression, null), null, (String) null);
+        Object result = evaluator.evaluate(attribute, null);
+        assertEquals("The expression has not been evaluated correctly", result,
+                expression);
+        expression = "${attributeName}";
+        attribute.setExpressionObject(new Expression(expression));
+        result = evaluator.evaluate(attribute, null);
+        assertEquals("The expression has not been evaluated correctly", result,
+                expression);
+    }
+
+    /**
+     * Tests
+     * {@link DirectAttributeEvaluator#evaluate(Attribute, org.apache.tiles.request.Request)}.
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testEvaluateNullAttribute() {
+        evaluator.evaluate((Attribute) null, null);
+    }
+
+    /**
+     * Tests
+     * {@link DirectAttributeEvaluator#evaluate(String, org.apache.tiles.request.Request)}.
+     */
+    @Test
+    public void testEvaluateString() {
+        String expression = "This is an expression";
+        Object result = evaluator.evaluate(expression, null);
+        assertEquals("The expression has not been evaluated correctly", result,
+                expression);
+        expression = "${attributeName}";
+        result = evaluator.evaluate(expression, null);
+        assertEquals("The expression has not been evaluated correctly", result,
+                expression);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/factory/BasicTilesContainerFactoryTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/factory/BasicTilesContainerFactoryTest.java
new file mode 100644
index 0000000..9e4cac4
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/factory/BasicTilesContainerFactoryTest.java
@@ -0,0 +1,253 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.factory;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.definition.DefinitionsFactory;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory;
+import org.apache.tiles.definition.digester.DigesterDefinitionsReader;
+import org.apache.tiles.evaluator.AttributeEvaluatorFactory;
+import org.apache.tiles.evaluator.impl.DirectAttributeEvaluator;
+import org.apache.tiles.impl.BasicTilesContainer;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.locale.impl.DefaultLocaleResolver;
+import org.apache.tiles.preparer.factory.BasicPreparerFactory;
+import org.apache.tiles.preparer.factory.PreparerFactory;
+import org.apache.tiles.renderer.DefinitionRenderer;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.locale.URLApplicationResource;
+import org.apache.tiles.request.render.BasicRendererFactory;
+import org.apache.tiles.request.render.ChainedDelegateRenderer;
+import org.apache.tiles.request.render.DispatchRenderer;
+import org.apache.tiles.request.render.Renderer;
+import org.apache.tiles.request.render.RendererFactory;
+import org.apache.tiles.request.render.StringRenderer;
+import org.easymock.EasyMock;
+
+/**
+ * Tests {@link BasicTilesContainerFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class BasicTilesContainerFactoryTest extends TestCase {
+
+    /**
+     * The factory to test.
+     */
+    private BasicTilesContainerFactory factory;
+
+    /**
+     * The context object.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * The resource to load.
+     */
+    private ApplicationResource resource;
+
+    /** {@inheritDoc} */
+    @Override
+    protected void setUp() throws Exception {
+        applicationContext = EasyMock.createMock(ApplicationContext.class);
+        resource = new URLApplicationResource("/org/apache/tiles/config/tiles-defs.xml", getClass().getResource(
+                "/org/apache/tiles/config/tiles-defs.xml"));
+        EasyMock.expect(applicationContext.getResource("/WEB-INF/tiles.xml")).andReturn(resource);
+        EasyMock.replay(applicationContext);
+        factory = new BasicTilesContainerFactory();
+    }
+
+    /**
+     * Tests {@link BasicTilesContainerFactory#createContainer(ApplicationContext)}.
+     */
+    public void testCreateContainer() {
+        TilesContainer container = factory.createContainer(applicationContext);
+        assertTrue("The class of the container is not correct", container instanceof BasicTilesContainer);
+    }
+
+    /**
+     * Tests {@link BasicTilesContainerFactory#createDefinitionsFactory(
+     * ApplicationContext, LocaleResolver)}.
+     */
+    public void testCreateDefinitionsFactory() {
+        LocaleResolver resolver = factory.createLocaleResolver(applicationContext);
+        DefinitionsFactory defsFactory = factory.createDefinitionsFactory(applicationContext, resolver);
+        assertTrue("The class of the definitions factory is not correct",
+                defsFactory instanceof UnresolvingLocaleDefinitionsFactory);
+    }
+
+    /**
+     * Tests {@link BasicTilesContainerFactory#createLocaleResolver(
+     * ApplicationContext)}.
+     */
+    public void testCreateLocaleResolver() {
+        LocaleResolver localeResolver = factory.createLocaleResolver(applicationContext);
+        assertTrue("The class of the locale resolver is not correct", localeResolver instanceof DefaultLocaleResolver);
+    }
+
+    /**
+     * Tests {@link BasicTilesContainerFactory#createDefinitionsReader(
+     * ApplicationContext)}.
+     */
+    public void testCreateDefinitionsReader() {
+        DefinitionsReader reader = factory.createDefinitionsReader(applicationContext);
+        assertTrue("The class of the reader is not correct", reader instanceof DigesterDefinitionsReader);
+    }
+
+    /**
+     * Tests
+     * {@link BasicTilesContainerFactory#getSources(ApplicationContext)}.
+     */
+    public void testGetSources() {
+        List<ApplicationResource> resources = factory.getSources(applicationContext);
+        assertEquals("The urls list is not one-sized", 1, resources.size());
+        assertEquals("The URL is not correct", resource, resources.get(0));
+    }
+
+    /**
+     * Tests
+     * {@link BasicTilesContainerFactory#createAttributeEvaluatorFactory(
+     * ApplicationContext, LocaleResolver)}.
+     */
+    public void testCreateAttributeEvaluatorFactory() {
+        LocaleResolver resolver = factory.createLocaleResolver(applicationContext);
+        AttributeEvaluatorFactory attributeEvaluatorFactory = factory.createAttributeEvaluatorFactory(
+                applicationContext, resolver);
+        assertTrue("The class of the evaluator is not correct",
+                attributeEvaluatorFactory.getAttributeEvaluator((String) null) instanceof DirectAttributeEvaluator);
+    }
+
+    /**
+     * Tests
+     * {@link BasicTilesContainerFactory#createPreparerFactory(ApplicationContext)}.
+     */
+    public void testCreatePreparerFactory() {
+        PreparerFactory preparerFactory = factory.createPreparerFactory(applicationContext);
+        assertTrue("The class of the preparer factory is not correct", preparerFactory instanceof BasicPreparerFactory);
+    }
+
+    /**
+     * Tests {@link BasicTilesContainerFactory#createRendererFactory(
+     * ApplicationContext, TilesContainer, AttributeEvaluatorFactory)}.
+     */
+    public void testCreateRendererFactory() {
+        TilesContainer container = factory.createContainer(applicationContext);
+        LocaleResolver resolver = factory.createLocaleResolver(applicationContext);
+        AttributeEvaluatorFactory attributeEvaluatorFactory = factory.createAttributeEvaluatorFactory(
+                applicationContext, resolver);
+        RendererFactory rendererFactory = factory.createRendererFactory(applicationContext, container,
+                attributeEvaluatorFactory);
+        assertTrue("The class of the renderer factory is not correct", rendererFactory instanceof BasicRendererFactory);
+        Renderer renderer = rendererFactory.getRenderer("string");
+        assertNotNull("The string renderer is null", renderer);
+        assertTrue("The string renderer class is not correct", renderer instanceof StringRenderer);
+        renderer = rendererFactory.getRenderer("template");
+        assertNotNull("The template renderer is null", renderer);
+        assertTrue("The template renderer class is not correct", renderer instanceof DispatchRenderer);
+        renderer = rendererFactory.getRenderer("definition");
+        assertNotNull("The definition renderer is null", renderer);
+        assertTrue("The definition renderer class is not correct", renderer instanceof DefinitionRenderer);
+    }
+
+    /**
+     * Tests
+     * {@link BasicTilesContainerFactory#createDefaultAttributeRenderer(BasicRendererFactory,
+     * ApplicationContext, TilesContainer, AttributeEvaluatorFactory)}.
+     */
+    public void testCreateDefaultAttributeRenderer() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
+        BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
+        Renderer stringRenderer = createMock(Renderer.class);
+        Renderer templateRenderer = createMock(Renderer.class);
+        Renderer definitionRenderer = createMock(Renderer.class);
+
+        expect(rendererFactory.getRenderer("string")).andReturn(stringRenderer);
+        expect(rendererFactory.getRenderer("template")).andReturn(templateRenderer);
+        expect(rendererFactory.getRenderer("definition")).andReturn(definitionRenderer);
+
+        replay(container, attributeEvaluatorFactory, rendererFactory);
+        Renderer renderer = factory.createDefaultAttributeRenderer(rendererFactory, applicationContext, container,
+                attributeEvaluatorFactory);
+        assertTrue("The default renderer class is not correct", renderer instanceof ChainedDelegateRenderer);
+        verify(container, attributeEvaluatorFactory, rendererFactory);
+    }
+
+    /**
+     * Tests
+     * {@link BasicTilesContainerFactory#createStringAttributeRenderer(BasicRendererFactory,
+     * ApplicationContext, TilesContainer, AttributeEvaluatorFactory)}.
+     */
+    public void testCreateStringAttributeRenderer() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
+        BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
+
+        replay(container, attributeEvaluatorFactory, rendererFactory);
+        Renderer renderer = factory.createStringAttributeRenderer(rendererFactory, applicationContext, container,
+                attributeEvaluatorFactory);
+        assertTrue("The renderer class is not correct", renderer instanceof StringRenderer);
+        verify(container, attributeEvaluatorFactory, rendererFactory);
+    }
+
+    /**
+     * Tests
+     * {@link BasicTilesContainerFactory#createTemplateAttributeRenderer(BasicRendererFactory,
+     * ApplicationContext, TilesContainer, AttributeEvaluatorFactory)}.
+     */
+    public void testCreateTemplateAttributeRenderer() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
+        BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
+
+        replay(container, attributeEvaluatorFactory, rendererFactory);
+        Renderer renderer = factory.createTemplateAttributeRenderer(rendererFactory, applicationContext, container,
+                attributeEvaluatorFactory);
+        assertTrue("The renderer class is not correct", renderer instanceof DispatchRenderer);
+        verify(container, attributeEvaluatorFactory, rendererFactory);
+    }
+
+    /**
+     * Tests
+     * {@link BasicTilesContainerFactory#createDefinitionAttributeRenderer(BasicRendererFactory,
+     * ApplicationContext, TilesContainer, AttributeEvaluatorFactory)}.
+     */
+    public void testCreateDefinitionAttributeRenderer() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
+        BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
+
+        replay(container, attributeEvaluatorFactory, rendererFactory);
+        Renderer renderer = factory.createDefinitionAttributeRenderer(rendererFactory, applicationContext, container,
+                attributeEvaluatorFactory);
+        assertTrue("The renderer class is not correct", renderer instanceof DefinitionRenderer);
+        verify(container, attributeEvaluatorFactory, rendererFactory);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/factory/TilesContainerFactoryExceptionTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/factory/TilesContainerFactoryExceptionTest.java
new file mode 100644
index 0000000..751ffea
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/factory/TilesContainerFactoryExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.factory;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesContainerFactoryException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesContainerFactoryExceptionTest {
+
+    /**
+     * Test method for {@link TilesContainerFactoryException#TilesContainerFactoryException()}.
+     */
+    @Test
+    public void testTilesContainerFactoryException() {
+        TilesContainerFactoryException exception = new TilesContainerFactoryException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link TilesContainerFactoryException#TilesContainerFactoryException(java.lang.String)}.
+     */
+    @Test
+    public void testTilesContainerFactoryExceptionString() {
+        TilesContainerFactoryException exception = new TilesContainerFactoryException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link TilesContainerFactoryException#TilesContainerFactoryException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testTilesContainerFactoryExceptionThrowable() {
+        Throwable cause = new Throwable();
+        TilesContainerFactoryException exception = new TilesContainerFactoryException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link TilesContainerFactoryException#TilesContainerFactoryException(String, Throwable)}.
+     */
+    @Test
+    public void testTilesContainerFactoryExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        TilesContainerFactoryException exception = new TilesContainerFactoryException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/BasicTilesContainerTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/BasicTilesContainerTest.java
new file mode 100644
index 0000000..8c9f476
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/BasicTilesContainerTest.java
@@ -0,0 +1,149 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.impl;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.factory.BasicTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.locale.URLApplicationResource;
+import org.apache.tiles.request.render.CannotRenderException;
+import org.easymock.EasyMock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class BasicTilesContainerTest extends TestCase {
+
+    /**
+     * The logging object.
+     */
+    private final Logger log = LoggerFactory
+            .getLogger(BasicTilesContainerTest.class);
+
+    /**
+     * A sample integer value to check object rendering.
+     */
+    private static final int SAMPLE_INT = 15;
+
+    /**
+     * The container.
+     */
+    private BasicTilesContainer container;
+
+    /** {@inheritDoc} */
+    @Override
+    public void setUp() {
+        ApplicationContext context = EasyMock
+                .createMock(ApplicationContext.class);
+        URL url = getClass().getResource("/org/apache/tiles/factory/test-defs.xml");
+        URLApplicationResource resource = new URLApplicationResource("/WEB-INF/tiles.xml", url);
+
+        EasyMock.expect(context.getResource("/WEB-INF/tiles.xml"))
+                .andReturn(resource);
+        EasyMock.replay(context);
+        AbstractTilesContainerFactory factory = new BasicTilesContainerFactory();
+        container = (BasicTilesContainer) factory.createContainer(context);
+    }
+
+    /**
+     * Tests basic Tiles container initialization.
+     */
+    public void testInitialization() {
+        assertNotNull(container);
+        assertNotNull(container.getPreparerFactory());
+        assertNotNull(container.getDefinitionsFactory());
+    }
+
+    /**
+     * Tests that attributes of type "object" won't be rendered.
+     *
+     * @throws IOException If something goes wrong, but it's not a Tiles
+     * exception.
+     */
+    public void testObjectAttribute() throws IOException {
+        Attribute attribute = new Attribute();
+        Request request = EasyMock.createMock(Request.class);
+        EasyMock.replay(request);
+        boolean exceptionFound = false;
+
+        attribute.setValue(new Integer(SAMPLE_INT)); // A simple object
+        try {
+            container.render(attribute, request);
+        } catch (CannotRenderException e) {
+            log.debug("Intercepted a TilesException, it is correct", e);
+            exceptionFound = true;
+        }
+
+        assertTrue("An attribute of 'object' type cannot be rendered",
+                exceptionFound);
+    }
+
+    /**
+     * Tests is attributes are rendered correctly according to users roles.
+     *
+     * @throws IOException If a problem arises during rendering or writing in the writer.
+     */
+    public void testAttributeCredentials() throws IOException {
+        Request request = EasyMock.createMock(Request.class);
+        EasyMock.expect(request.isUserInRole("myrole")).andReturn(Boolean.TRUE);
+        StringWriter writer = new StringWriter();
+        EasyMock.expect(request.getWriter()).andReturn(writer);
+        EasyMock.replay(request);
+        Attribute attribute = new Attribute("This is the value", "myrole");
+        attribute.setRenderer("string");
+        container.render(attribute, request);
+        writer.close();
+        assertEquals("The attribute should have been rendered",
+                "This is the value", writer.toString());
+        EasyMock.reset(request);
+        request = EasyMock.createMock(Request.class);
+        EasyMock.expect(request.isUserInRole("myrole")).andReturn(Boolean.FALSE);
+        EasyMock.replay(request);
+        writer = new StringWriter();
+        container.render(attribute, request);
+        writer.close();
+        assertNotSame("The attribute should have not been rendered",
+                "This is the value", writer);
+    }
+
+    /**
+     * Tests {@link BasicTilesContainer#evaluate(Attribute, Request)}.
+     */
+    public void testEvaluate() {
+        Request request = EasyMock.createMock(Request.class);
+        EasyMock.replay(request);
+        Attribute attribute = new Attribute("This is the value");
+        Object value = container.evaluate(attribute, request);
+        assertEquals("The attribute has not been evaluated correctly",
+                "This is the value", value);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/BasicTilesContainerUnitTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/BasicTilesContainerUnitTest.java
new file mode 100644
index 0000000..941aeab
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/BasicTilesContainerUnitTest.java
@@ -0,0 +1,922 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.impl;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.Deque;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.BasicAttributeContext;
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.DefinitionsFactory;
+import org.apache.tiles.definition.NoSuchDefinitionException;
+import org.apache.tiles.evaluator.AttributeEvaluator;
+import org.apache.tiles.evaluator.AttributeEvaluatorFactory;
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.preparer.factory.NoSuchPreparerException;
+import org.apache.tiles.preparer.factory.PreparerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.render.CannotRenderException;
+import org.apache.tiles.request.render.NoSuchRendererException;
+import org.apache.tiles.request.render.Renderer;
+import org.apache.tiles.request.render.RendererFactory;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link BasicTilesContainer}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class BasicTilesContainerUnitTest {
+
+    /**
+     * Name used to store attribute context stack.
+     */
+    private static final String ATTRIBUTE_CONTEXT_STACK =
+        "org.apache.tiles.AttributeContext.STACK";
+
+    /**
+     * The application context.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * The definitions factory.
+     */
+    private DefinitionsFactory definitionsFactory;
+
+    /**
+     * The preparer factory.
+     */
+    private PreparerFactory preparerFactory;
+
+    /**
+     * The renderer factory.
+     */
+    private RendererFactory rendererFactory;
+
+    /**
+     * The evaluator factory.
+     */
+    private AttributeEvaluatorFactory attributeEvaluatorFactory;
+
+    /**
+     * The container to test.
+     */
+    private BasicTilesContainer container;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        applicationContext = createMock(ApplicationContext.class);
+        definitionsFactory = createMock(DefinitionsFactory.class);
+        preparerFactory = createMock(PreparerFactory.class);
+        rendererFactory = createMock(RendererFactory.class);
+        attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
+        container = new BasicTilesContainer();
+        container.setApplicationContext(applicationContext);
+        container.setAttributeEvaluatorFactory(attributeEvaluatorFactory);
+        container.setDefinitionsFactory(definitionsFactory);
+        container.setPreparerFactory(preparerFactory);
+        container.setRendererFactory(rendererFactory);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#startContext(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testStartContext() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+        expect(deque.isEmpty()).andReturn(false);
+        expect(deque.peek()).andReturn(attributeContext);
+        expect(attributeContext.getCascadedAttributeNames()).andReturn(null);
+        deque.push(isA(BasicAttributeContext.class));
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+        assertTrue(container.startContext(request) instanceof BasicAttributeContext);
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#endContext(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testEndContext() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+        expect(deque.pop()).andReturn(attributeContext);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+        container.endContext(request);
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#renderContext(Request)}.
+     * @throws IOException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRenderContext() throws IOException {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ViewPreparer preparer = createMock(ViewPreparer.class);
+        Attribute templateAttribute = createMock(Attribute.class);
+        Renderer renderer = createMock(Renderer.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+        expect(deque.isEmpty()).andReturn(false);
+        expect(deque.peek()).andReturn(attributeContext);
+        expect(attributeContext.getPreparer()).andReturn(null);
+        expect(attributeContext.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(templateAttribute.getRenderer()).andReturn("renderer");
+        expect(rendererFactory.getRenderer("renderer")).andReturn(renderer);
+        expect(attributeEvaluatorFactory.getAttributeEvaluator(templateAttribute)).andReturn(evaluator);
+        expect(evaluator.evaluate(templateAttribute, request)).andReturn("/mytemplate.jsp");
+        expect(templateAttribute.isPermitted(request)).andReturn(true);
+        renderer.render("/mytemplate.jsp", request);
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer, templateAttribute, renderer);
+        container.renderContext(request);
+        verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer, templateAttribute, renderer);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getApplicationContext()}.
+     */
+    @Test
+    public void testGetApplicationContext() {
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory);
+        assertEquals(applicationContext, container.getApplicationContext());
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getAttributeContext(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetAttributeContext() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+        expect(deque.isEmpty()).andReturn(false);
+        expect(deque.peek()).andReturn(attributeContext);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+        assertEquals(attributeContext, container.getAttributeContext(request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getAttributeContext(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetAttributeContextNew() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(request.getContext("request")).andReturn(requestScope).times(2);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque).times(2);
+        expect(deque.isEmpty()).andReturn(true);
+        deque.push(isA(BasicAttributeContext.class));
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+        assertTrue(container.getAttributeContext(request) instanceof BasicAttributeContext);
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getDefinitionsFactory()}.
+     */
+    @Test
+    public void testGetDefinitionsFactory() {
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory);
+        assertEquals(definitionsFactory, container.getDefinitionsFactory());
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getPreparerFactory()}.
+     */
+    @Test
+    public void testGetPreparerFactory() {
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory);
+        assertEquals(preparerFactory, container.getPreparerFactory());
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#prepare(java.lang.String, Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testPrepare() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ViewPreparer preparer = createMock(ViewPreparer.class);
+
+        expect(preparerFactory.getPreparer("preparer", request)).andReturn(preparer);
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+        expect(deque.isEmpty()).andReturn(false);
+        expect(deque.peek()).andReturn(attributeContext);
+        preparer.execute(request, attributeContext);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer);
+        container.prepare("preparer", request);
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#prepare(java.lang.String, Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test(expected = NoSuchPreparerException.class)
+    public void testPrepareException() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(preparerFactory.getPreparer("preparer", request)).andReturn(null);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+        try {
+            container.prepare("preparer", request);
+        } finally {
+            verify(applicationContext, attributeEvaluatorFactory,
+                    definitionsFactory, preparerFactory, rendererFactory,
+                    request, requestScope, deque, attributeContext);
+        }
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(Request, java.lang.String)}.
+     * @throws IOException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRenderStringRequest() throws IOException {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ViewPreparer preparer = createMock(ViewPreparer.class);
+        Renderer renderer = createMock(Renderer.class);
+        Definition definition = createMock(Definition.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+
+        Attribute templateAttribute = Attribute.createTemplateAttribute("/my/template.jsp");
+
+        expect(definitionsFactory.getDefinition("definition", request)).andReturn(definition);
+        expect(request.getContext("request")).andReturn(requestScope).times(3);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque).times(3);
+        expect(deque.isEmpty()).andReturn(false);
+        expect(deque.peek()).andReturn(attributeContext);
+        expect(attributeContext.getPreparer()).andReturn(null);
+        expect(attributeContext.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(attributeContext.getLocalAttributeNames()).andReturn(null);
+        expect(attributeContext.getCascadedAttributeNames()).andReturn(null);
+        expect(definition.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(rendererFactory.getRenderer("template")).andReturn(renderer);
+        deque.push(isA(BasicAttributeContext.class));
+        expect(attributeEvaluatorFactory.getAttributeEvaluator(templateAttribute)).andReturn(evaluator);
+        expect(evaluator.evaluate(templateAttribute, request)).andReturn("/my/template.jsp");
+        renderer.render("/my/template.jsp", request);
+        expect(deque.pop()).andReturn(null);
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer, renderer, definition);
+        container.render("definition", request);
+        verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer, renderer, definition);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(Request, java.lang.String)}.
+     */
+    @Test(expected = NoSuchDefinitionException.class)
+    public void testRenderStringRequestException() {
+        Request request = createMock(Request.class);
+
+        expect(definitionsFactory.getDefinition("definition", request)).andReturn(null);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request);
+        try {
+            container.render("definition", request);
+        } finally {
+            verify(applicationContext, attributeEvaluatorFactory,
+                    definitionsFactory, preparerFactory, rendererFactory);
+        }
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(Request, org.apache.tiles.Attribute)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testRenderAttributeRequest() throws IOException {
+        Request request = createMock(Request.class);
+        Attribute templateAttribute = createMock(Attribute.class);
+        Renderer renderer = createMock(Renderer.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+
+        expect(templateAttribute.getRenderer()).andReturn("renderer");
+        expect(rendererFactory.getRenderer("renderer")).andReturn(renderer);
+        expect(attributeEvaluatorFactory.getAttributeEvaluator(templateAttribute)).andReturn(evaluator);
+        expect(evaluator.evaluate(templateAttribute, request)).andReturn("/mytemplate.jsp");
+        expect(templateAttribute.isPermitted(request)).andReturn(true);
+        renderer.render("/mytemplate.jsp", request);
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                templateAttribute, renderer);
+        container.render(templateAttribute, request);
+        verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                templateAttribute, renderer);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(Request, org.apache.tiles.Attribute)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test(expected = CannotRenderException.class)
+    public void testRenderAttributeRequestException1() throws IOException {
+        Request request = createMock(Request.class);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request);
+        try {
+            container.render((Attribute) null, request);
+        } finally {
+            verify(applicationContext, attributeEvaluatorFactory,
+                    definitionsFactory, preparerFactory, rendererFactory,
+                    request);
+        }
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(Request, org.apache.tiles.Attribute)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test(expected = NoSuchRendererException.class)
+    public void testRenderAttributeRequestException2() throws IOException {
+        Request request = createMock(Request.class);
+        Attribute templateAttribute = createMock(Attribute.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+
+        expect(templateAttribute.getRenderer()).andReturn("renderer");
+        expect(templateAttribute.isPermitted(request)).andReturn(true);
+        expect(rendererFactory.getRenderer("renderer")).andThrow(new NoSuchRendererException());
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                templateAttribute);
+        try {
+            container.render(templateAttribute, request);
+        } finally {
+            verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                    definitionsFactory, preparerFactory, rendererFactory,
+                    request, templateAttribute);
+        }
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(Request, org.apache.tiles.Attribute)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test(expected = CannotRenderException.class)
+    public void testRenderAttributeRequestException3() throws IOException {
+        Request request = createMock(Request.class);
+        Attribute templateAttribute = createMock(Attribute.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+        Renderer renderer = createMock(Renderer.class);
+
+        expect(templateAttribute.getRenderer()).andReturn("renderer");
+        expect(templateAttribute.isPermitted(request)).andReturn(true);
+        expect(rendererFactory.getRenderer("renderer")).andReturn(renderer);
+        expect(attributeEvaluatorFactory.getAttributeEvaluator(templateAttribute)).andReturn(evaluator);
+        expect(evaluator.evaluate(templateAttribute, request)).andReturn(new Integer(1));
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                templateAttribute);
+        try {
+            container.render(templateAttribute, request);
+        } finally {
+            verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                    definitionsFactory, preparerFactory, rendererFactory,
+                    request, templateAttribute);
+        }
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(Request, org.apache.tiles.Attribute)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test(expected = NoSuchRendererException.class)
+    public void testRenderAttributeRequestException() throws IOException {
+        Request request = createMock(Request.class);
+        Attribute templateAttribute = createMock(Attribute.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+
+        expect(templateAttribute.getRenderer()).andReturn("renderer");
+        expect(templateAttribute.isPermitted(request)).andReturn(true);
+        expect(rendererFactory.getRenderer("renderer")).andThrow(new NoSuchRendererException());
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                templateAttribute);
+        try {
+            container.render(templateAttribute, request);
+        } finally {
+            verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                    definitionsFactory, preparerFactory, rendererFactory,
+                    request, templateAttribute);
+        }
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#evaluate(org.apache.tiles.Attribute, Request)}.
+     */
+    @Test
+    public void testEvaluate() {
+        Request request = createMock(Request.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+        Attribute templateAttribute = createMock(Attribute.class);
+
+        expect(attributeEvaluatorFactory.getAttributeEvaluator(templateAttribute)).andReturn(evaluator);
+        expect(evaluator.evaluate(templateAttribute, request)).andReturn(new Integer(1));
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                templateAttribute, evaluator);
+        assertEquals(new Integer(1), container.evaluate(templateAttribute, request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                templateAttribute, evaluator);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#isValidDefinition(java.lang.String, Request)}.
+     */
+    @Test
+    public void testIsValidDefinition() {
+        Request request = createMock(Request.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(definitionsFactory.getDefinition("definition", request)).andReturn(definition);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request, definition);
+        assertTrue(container.isValidDefinition("definition", request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request, definition);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#isValidDefinition(java.lang.String, Request)}.
+     */
+    @Test
+    public void testIsValidDefinitionNull() {
+        Request request = createMock(Request.class);
+
+        expect(definitionsFactory.getDefinition("definition", request)).andReturn(null);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request);
+        assertFalse(container.isValidDefinition("definition", request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#isValidDefinition(java.lang.String, Request)}.
+     */
+    @Test
+    public void testIsValidDefinitionException() {
+        Request request = createMock(Request.class);
+
+        expect(definitionsFactory.getDefinition("definition", request))
+                .andThrow(new NoSuchDefinitionException());
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request);
+        assertFalse(container.isValidDefinition("definition", request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getDefinition(java.lang.String, Request)}.
+     */
+    @Test
+    public void testGetDefinition() {
+        Request request = createMock(Request.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(definitionsFactory.getDefinition("definition", request)).andReturn(definition);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request, definition);
+        assertEquals(definition, container.getDefinition("definition", request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request, definition);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getContextStack(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetContextStack() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque);
+        assertEquals(deque, container.getContextStack(request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getContextStack(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetContextStackNew() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(null);
+        expect(requestScope.put(eq(ATTRIBUTE_CONTEXT_STACK), isA(LinkedList.class))).andReturn(null);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope);
+        assertTrue(container.getContextStack(request) instanceof LinkedList);
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#pushContext(org.apache.tiles.AttributeContext, Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testPushContext() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+        deque.push(attributeContext);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+        container.pushContext(attributeContext, request);
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#popContext(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testPopContext() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+        expect(deque.pop()).andReturn(attributeContext);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+        assertEquals(attributeContext, container.popContext(request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getContext(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetContext() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+        expect(deque.isEmpty()).andReturn(false);
+        expect(deque.peek()).andReturn(attributeContext);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+        assertEquals(attributeContext, container.getContext(request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#getContext(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetContextNull() {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque);
+        expect(deque.isEmpty()).andReturn(true);
+
+        replay(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque);
+        assertNull(container.getContext(request));
+        verify(applicationContext, attributeEvaluatorFactory,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(org.apache.tiles.Definition, Request)}.
+     * @throws IOException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRenderRequestDefinition() throws IOException {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ViewPreparer preparer = createMock(ViewPreparer.class);
+        Renderer renderer = createMock(Renderer.class);
+        Definition definition = createMock(Definition.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+
+        Attribute templateAttribute = Attribute.createTemplateAttribute("/my/template.jsp");
+
+        expect(request.getContext("request")).andReturn(requestScope).times(3);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque).times(3);
+        expect(deque.isEmpty()).andReturn(false);
+        expect(deque.peek()).andReturn(attributeContext);
+        expect(attributeContext.getPreparer()).andReturn(null);
+        expect(attributeContext.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(attributeContext.getLocalAttributeNames()).andReturn(null);
+        expect(attributeContext.getCascadedAttributeNames()).andReturn(null);
+        expect(definition.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(rendererFactory.getRenderer("template")).andReturn(renderer);
+        deque.push(isA(BasicAttributeContext.class));
+        expect(attributeEvaluatorFactory.getAttributeEvaluator(templateAttribute)).andReturn(evaluator);
+        expect(evaluator.evaluate(templateAttribute, request)).andReturn("/my/template.jsp");
+        renderer.render("/my/template.jsp", request);
+        expect(deque.pop()).andReturn(null);
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer, renderer, definition);
+        container.render(definition, request);
+        verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer, renderer, definition);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(org.apache.tiles.Definition, Request)}.
+     * @throws IOException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test(expected = CannotRenderException.class)
+    public void testRenderRequestDefinitionException() throws IOException {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ViewPreparer preparer = createMock(ViewPreparer.class);
+        Renderer renderer = createMock(Renderer.class);
+        Definition definition = createMock(Definition.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+
+        Attribute templateAttribute = Attribute.createTemplateAttribute("/my/template.jsp");
+
+        expect(request.getContext("request")).andReturn(requestScope).times(3);
+        expect(requestScope.get(ATTRIBUTE_CONTEXT_STACK)).andReturn(deque).times(3);
+        expect(deque.isEmpty()).andReturn(false);
+        expect(deque.peek()).andReturn(attributeContext);
+        expect(attributeContext.getPreparer()).andReturn(null);
+        expect(attributeContext.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(attributeContext.getLocalAttributeNames()).andReturn(null);
+        expect(attributeContext.getCascadedAttributeNames()).andReturn(null);
+        expect(definition.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(rendererFactory.getRenderer("template")).andReturn(renderer);
+        deque.push(isA(BasicAttributeContext.class));
+        expect(attributeEvaluatorFactory.getAttributeEvaluator(templateAttribute)).andReturn(evaluator);
+        expect(evaluator.evaluate(templateAttribute, request)).andReturn("/mytemplate.jsp");
+        renderer.render("/mytemplate.jsp", request);
+        expectLastCall().andThrow(new IOException());
+        expect(deque.pop()).andReturn(null);
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer, renderer, definition);
+        try {
+            container.render(definition, request);
+        } finally {
+            verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                    definitionsFactory, preparerFactory, rendererFactory,
+                    request, requestScope, deque, attributeContext, preparer,
+                    renderer, definition);
+        }
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(Request, org.apache.tiles.AttributeContext)}.
+     * @throws IOException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRenderRequestAttributeContext() throws IOException {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ViewPreparer preparer = createMock(ViewPreparer.class);
+        Attribute templateAttribute = createMock(Attribute.class);
+        Renderer renderer = createMock(Renderer.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+
+        expect(attributeContext.getPreparer()).andReturn(null);
+        expect(attributeContext.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(templateAttribute.getRenderer()).andReturn("renderer");
+        expect(rendererFactory.getRenderer("renderer")).andReturn(renderer);
+        expect(attributeEvaluatorFactory.getAttributeEvaluator(templateAttribute)).andReturn(evaluator);
+        expect(evaluator.evaluate(templateAttribute, request)).andReturn("/mytemplate.jsp");
+        expect(templateAttribute.isPermitted(request)).andReturn(true);
+        renderer.render("/mytemplate.jsp", request);
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer, templateAttribute, renderer);
+        container.render(request, attributeContext);
+        verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, preparer, templateAttribute, renderer);
+    }
+
+    /**
+     * Test method for {@link BasicTilesContainer#render(Request, org.apache.tiles.AttributeContext)}.
+     * @throws IOException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test(expected = CannotRenderException.class)
+    public void testRenderRequestAttributeContextException() throws IOException {
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = createMock(Map.class);
+        Deque<AttributeContext> deque = createMock(Deque.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Attribute templateAttribute = createMock(Attribute.class);
+        Renderer renderer = createMock(Renderer.class);
+        AttributeEvaluator evaluator = createMock(AttributeEvaluator.class);
+
+        expect(attributeContext.getPreparer()).andReturn("preparer").times(2);
+        expect(preparerFactory.getPreparer("preparer", request)).andReturn(null);
+        expect(attributeContext.getTemplateAttribute()).andReturn(templateAttribute);
+        expect(templateAttribute.getRenderer()).andReturn("renderer");
+        expect(rendererFactory.getRenderer("renderer")).andReturn(renderer);
+        expect(attributeEvaluatorFactory.getAttributeEvaluator(templateAttribute)).andReturn(evaluator);
+        expect(evaluator.evaluate(templateAttribute, request)).andReturn("/mytemplate.jsp");
+        expect(templateAttribute.isPermitted(request)).andReturn(true);
+        renderer.render("/mytemplate.jsp", request);
+        expectLastCall().andThrow(new IOException());
+
+        replay(applicationContext, attributeEvaluatorFactory, evaluator,
+                definitionsFactory, preparerFactory, rendererFactory, request,
+                requestScope, deque, attributeContext, templateAttribute, renderer);
+        try {
+            container.render(request, attributeContext);
+        } finally {
+            verify(applicationContext, attributeEvaluatorFactory, evaluator,
+                    definitionsFactory, preparerFactory, rendererFactory,
+                    request, requestScope, deque, attributeContext,
+                    templateAttribute, renderer);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/CannotRenderExceptionTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/CannotRenderExceptionTest.java
new file mode 100644
index 0000000..6e7c768
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/CannotRenderExceptionTest.java
@@ -0,0 +1,78 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.impl;
+
+import static org.junit.Assert.*;
+
+import org.apache.tiles.request.render.CannotRenderException;
+import org.junit.Test;
+
+/**
+ * Tests {@link CannotRenderException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CannotRenderExceptionTest {
+
+    /**
+     * Test method for {@link CannotRenderException#CannotRenderException()}.
+     */
+    @Test
+    public void testCannotRenderException() {
+        CannotRenderException exception = new CannotRenderException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link CannotRenderException#CannotRenderException(java.lang.String)}.
+     */
+    @Test
+    public void testCannotRenderExceptionString() {
+        CannotRenderException exception = new CannotRenderException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link CannotRenderException#CannotRenderException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testCannotRenderExceptionThrowable() {
+        Throwable cause = new Throwable();
+        CannotRenderException exception = new CannotRenderException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link CannotRenderException#CannotRenderException(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testCannotRenderExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        CannotRenderException exception = new CannotRenderException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/InvalidTemplateExceptionTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/InvalidTemplateExceptionTest.java
new file mode 100644
index 0000000..0910d12
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/InvalidTemplateExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.impl;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link InvalidTemplateException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class InvalidTemplateExceptionTest {
+
+    /**
+     * Test method for {@link InvalidTemplateException#InvalidTemplateException()}.
+     */
+    @Test
+    public void testInvalidTemplateException() {
+        InvalidTemplateException exception = new InvalidTemplateException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link InvalidTemplateException#InvalidTemplateException(java.lang.String)}.
+     */
+    @Test
+    public void testInvalidTemplateExceptionString() {
+        InvalidTemplateException exception = new InvalidTemplateException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link InvalidTemplateException#InvalidTemplateException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testInvalidTemplateExceptionThrowable() {
+        Throwable cause = new Throwable();
+        InvalidTemplateException exception = new InvalidTemplateException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link InvalidTemplateException#InvalidTemplateException(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testInvalidTemplateExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        InvalidTemplateException exception = new InvalidTemplateException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/mgmt/CachingTilesContainerTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/mgmt/CachingTilesContainerTest.java
new file mode 100644
index 0000000..befcfdb
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/impl/mgmt/CachingTilesContainerTest.java
@@ -0,0 +1,402 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.impl.mgmt;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Definition;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.definition.NoSuchDefinitionException;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link CachingTilesContainer}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CachingTilesContainerTest {
+
+    /**
+     * The default name of the attribute in which storing custom definitions.
+     */
+    private static final String DEFAULT_DEFINITIONS_ATTRIBUTE_NAME =
+        "org.apache.tiles.impl.mgmt.DefinitionManager.DEFINITIONS";
+
+    /**
+     * The wrapped Tiles container.
+     */
+    private TilesContainer wrapped;
+
+    /**
+     * The Tiles container to test.
+     */
+    private CachingTilesContainer container;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        wrapped = createMock(TilesContainer.class);
+        container = new CachingTilesContainer(wrapped);
+    }
+
+    /**
+     * Test method for
+     * {@link CachingTilesContainer#CachingTilesContainer(TilesContainer, String)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testCachingTilesContainerTilesContainerString() {
+        TilesContainer wrapped = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(request.getContext("request")).andReturn(scope);
+        expect(scope.get("myattribute")).andReturn(definitions);
+        expect(definitions.get("definition")).andReturn(definition);
+
+        replay(wrapped, request, definitions, scope, definition);
+        CachingTilesContainer container = new CachingTilesContainer(wrapped,
+                "myattribute");
+        assertSame(definition, container.getDefinition("definition", request));
+        verify(wrapped, request, definitions, scope, definition);
+    }
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.impl.mgmt.CachingTilesContainer#CachingTilesContainer(TilesContainer, String)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testCachingTilesContainer() {
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+        TilesContainer wrapped = createMock(TilesContainer.class);
+
+        expect(request.getContext("request")).andReturn(scope);
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                definitions);
+        expect(definitions.get("definition")).andReturn(definition);
+
+        replay(wrapped, request, definitions, scope, definition);
+        CachingTilesContainer container = new CachingTilesContainer(wrapped,
+                null);
+        assertSame(definition, container.getDefinition("definition", request));
+        verify(wrapped, request, definitions, scope, definition);
+    }
+
+    /**
+     * Test method for
+     * {@link CachingTilesContainer#getDefinition(String, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetDefinition() {
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(request.getContext("request")).andReturn(scope);
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                definitions);
+        expect(definitions.get("definition")).andReturn(definition);
+
+        replay(wrapped, request, definitions, scope, definition);
+        assertSame(definition, container.getDefinition("definition", request));
+        verify(wrapped, request, definitions, scope, definition);
+    }
+
+    /**
+     * Test method for
+     * {@link CachingTilesContainer#getDefinition(String, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetDefinitionContainer() {
+        Request request = createMock(Request.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(request.getContext("request")).andReturn(scope);
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                null);
+        expect(wrapped.getDefinition("definition", request)).andReturn(
+                definition);
+
+        replay(wrapped, request, scope, definition);
+        assertSame(definition, container.getDefinition("definition", request));
+        verify(wrapped, request, scope, definition);
+    }
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.impl.mgmt.CachingTilesContainer#isValidDefinition(String, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testIsValidDefinition() {
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(request.getContext("request")).andReturn(scope);
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                definitions);
+        expect(definitions.get("definition")).andReturn(definition);
+
+        replay(wrapped, request, definitions, scope, definition);
+        assertTrue(container.isValidDefinition("definition", request));
+        verify(wrapped, request, definitions, scope, definition);
+    }
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.impl.mgmt.CachingTilesContainer#isValidDefinition(String, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testIsValidDefinitionContainer() {
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+
+        expect(request.getContext("request")).andReturn(scope);
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                definitions);
+        expect(definitions.get("definition")).andReturn(null);
+        expect(wrapped.isValidDefinition("definition", request)).andReturn(true);
+
+        replay(wrapped, request, definitions, scope);
+        assertTrue(container.isValidDefinition("definition", request));
+        verify(wrapped, request, definitions, scope);
+    }
+
+    /**
+     * Test method for
+     * {@link CachingTilesContainer#register(Definition, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRegister() {
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(request.getContext("request")).andReturn(scope);
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                definitions);
+        expect(definition.getName()).andReturn(null);
+        expect(definitions.containsKey("$anonymousMutableDefinition1"))
+                .andReturn(false);
+        definition.setName("$anonymousMutableDefinition1");
+        expect(definition.isExtending()).andReturn(true);
+        // trick to test resolve definition separately.
+        expect(definition.isExtending()).andReturn(false);
+        expect(definition.getName()).andReturn("$anonymousMutableDefinition1");
+        expect(definitions.put("$anonymousMutableDefinition1", definition))
+                .andReturn(null);
+
+        replay(wrapped, request, definitions, scope, definition);
+        container.register(definition, request);
+        verify(wrapped, request, definitions, scope, definition);
+    }
+
+    /**
+     * Test method for
+     * {@link CachingTilesContainer#register(Definition, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRegisterInheritance() {
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+        Definition parent = createMock(Definition.class);
+        Definition grandparent = createMock(Definition.class);
+
+        expect(request.getContext("request")).andReturn(scope).anyTimes();
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                definitions).anyTimes();
+        expect(definition.getName()).andReturn(null);
+        expect(definitions.containsKey("$anonymousMutableDefinition1"))
+                .andReturn(false);
+        definition.setName("$anonymousMutableDefinition1");
+        expect(definition.isExtending()).andReturn(true);
+        // trick to test resolve definition separately.
+        expect(definition.isExtending()).andReturn(true);
+        expect(definition.getExtends()).andReturn("parent");
+        expect(definitions.get("parent")).andReturn(parent);
+        expect(parent.isExtending()).andReturn(true);
+        expect(parent.getExtends()).andReturn("grandparent");
+        expect(definition.getName()).andReturn("$anonymousMutableDefinition1");
+        expect(definitions.get("grandparent")).andReturn(null);
+        expect(wrapped.getDefinition("grandparent", request)).andReturn(
+                grandparent);
+        parent.inherit(grandparent);
+        definition.inherit(parent);
+        expect(definitions.put("$anonymousMutableDefinition1", definition))
+                .andReturn(null);
+
+        replay(wrapped, request, definitions, scope, definition, parent,
+                grandparent);
+        container.register(definition, request);
+        verify(wrapped, request, definitions, scope, definition, parent,
+                grandparent);
+    }
+
+    /**
+     * Test method for
+     * {@link CachingTilesContainer#register(Definition, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test(expected = NoSuchDefinitionException.class)
+    public void testRegisterInheritanceFail() {
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(request.getContext("request")).andReturn(scope).anyTimes();
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                definitions).anyTimes();
+        expect(definition.getName()).andReturn(null);
+        expect(definitions.containsKey("$anonymousMutableDefinition1"))
+                .andReturn(false);
+        definition.setName("$anonymousMutableDefinition1");
+        expect(definition.isExtending()).andReturn(true);
+        // trick to test resolve definition separately.
+        expect(definition.isExtending()).andReturn(true);
+        expect(definition.getExtends()).andReturn("parent");
+        expect(definitions.get("parent")).andReturn(null);
+        expect(wrapped.getDefinition("parent", request)).andReturn(null);
+        expect(definition.getName()).andReturn("$anonymousMutableDefinition1");
+
+        replay(wrapped, request, definitions, scope, definition);
+        try {
+            container.register(definition, request);
+        } finally {
+            verify(wrapped, request, definitions, scope, definition);
+        }
+    }
+
+    /**
+     * Test method for
+     * {@link CachingTilesContainer#register(Definition, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRegisterCreateDefinitions() {
+        Request request = createMock(Request.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(request.getContext("request")).andReturn(scope).anyTimes();
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                null);
+        expect(scope.put(eq(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME), isA(HashMap.class))).andReturn(null);
+        expect(definition.getName()).andReturn(null);
+        definition.setName("$anonymousMutableDefinition1");
+        expect(definition.isExtending()).andReturn(true);
+        // trick to test resolve definition separately.
+        expect(definition.isExtending()).andReturn(false);
+        expect(definition.getName()).andReturn("$anonymousMutableDefinition1");
+
+        replay(wrapped, request, scope, definition);
+        container.register(definition, request);
+        verify(wrapped, request, scope, definition);
+    }
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.impl.mgmt.CachingTilesContainer#render(String, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRender() {
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+        Definition definition = createMock(Definition.class);
+
+        expect(request.getContext("request")).andReturn(scope);
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                definitions);
+        expect(definitions.get("definition")).andReturn(definition);
+        container.render(definition, request);
+
+        replay(wrapped, request, definitions, scope, definition);
+        container.render("definition", request);
+        verify(wrapped, request, definitions, scope, definition);
+    }
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.impl.mgmt.CachingTilesContainer#render(String, Request)}
+     * .
+     */
+    @SuppressWarnings("unchecked")
+    @Test(expected = NoSuchDefinitionException.class)
+    public void testRenderFail() {
+        Request request = createMock(Request.class);
+        Map<String, Definition> definitions = createMock(Map.class);
+        Map<String, Object> scope = createMock(Map.class);
+
+        expect(request.getContext("request")).andReturn(scope);
+        expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn(
+                definitions);
+        expect(definitions.get("definition")).andReturn(null);
+        expect(wrapped.getDefinition("definition", request)).andReturn(null);
+
+        replay(wrapped, request, definitions, scope);
+        try {
+            container.render("definition", request);
+        } finally {
+            verify(wrapped, request, definitions, scope);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/locale/impl/DefaultLocaleResolverTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/locale/impl/DefaultLocaleResolverTest.java
new file mode 100644
index 0000000..d7933ee
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/locale/impl/DefaultLocaleResolverTest.java
@@ -0,0 +1,59 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.locale.impl;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.tiles.request.Request;
+import org.junit.Test;
+
+/**
+ * Tests {@link DefaultLocaleResolver}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefaultLocaleResolverTest {
+
+    /**
+     * Test method for {@link DefaultLocaleResolver#resolveLocale(Request)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testResolveLocale() {
+        Request request = createMock(Request.class);
+        Map<String, Object> sessionScope = createMock(Map.class);
+        Locale locale = Locale.ITALY;
+
+        expect(request.getContext("session")).andReturn(sessionScope);
+        expect(sessionScope.get(DefaultLocaleResolver.LOCALE_KEY)).andReturn(null);
+        expect(request.getRequestLocale()).andReturn(locale);
+
+        replay(request, sessionScope);
+        DefaultLocaleResolver resolver = new DefaultLocaleResolver();
+        assertSame(locale, resolver.resolveLocale(request));
+        verify(request, sessionScope);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/preparer/factory/BasicPreparerFactoryTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/preparer/factory/BasicPreparerFactoryTest.java
new file mode 100644
index 0000000..e03cd85
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/preparer/factory/BasicPreparerFactoryTest.java
@@ -0,0 +1,73 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.preparer.factory;
+
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.request.Request;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests the basic preparer factory.
+ *
+ * @version $Rev$ $Date$
+ */
+public class BasicPreparerFactoryTest extends TestCase {
+
+    /**
+     * The preparer factory.
+     */
+    private BasicPreparerFactory factory;
+
+    /** {@inheritDoc} */
+    @Override
+    public void setUp() {
+        factory = new BasicPreparerFactory();
+    }
+
+    /**
+     * Tests getting a preparer.
+     */
+    public void testGetPreparer() {
+        String name = MockViewPreparer.class.getName();
+        ViewPreparer p = factory.getPreparer(name, null);
+        assertNotNull(p);
+        assertTrue(p instanceof MockViewPreparer);
+
+        name = "org.doesnotexist.Class";
+        p = factory.getPreparer(name, null);
+        assertNull(p);
+    }
+
+    /**
+     * Mock view preparer.
+     *
+     * @version $Rev$ $Date$
+     */
+    public static class MockViewPreparer implements ViewPreparer {
+
+        /** {@inheritDoc} */
+        public void execute(Request tilesContext,
+                            AttributeContext attributeContext) {
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/preparer/factory/NoSuchPreparerExceptionTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/preparer/factory/NoSuchPreparerExceptionTest.java
new file mode 100644
index 0000000..44825b9
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/preparer/factory/NoSuchPreparerExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.preparer.factory;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link NoSuchPreparerException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class NoSuchPreparerExceptionTest {
+
+    /**
+     * Test method for {@link NoSuchPreparerException#NoSuchPreparerException()}.
+     */
+    @Test
+    public void testNoSuchPreparerException() {
+        NoSuchPreparerException exception = new NoSuchPreparerException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link NoSuchPreparerException#NoSuchPreparerException(java.lang.String)}.
+     */
+    @Test
+    public void testNoSuchPreparerExceptionString() {
+        NoSuchPreparerException exception = new NoSuchPreparerException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link NoSuchPreparerException#NoSuchPreparerException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testNoSuchPreparerExceptionThrowable() {
+        Throwable cause = new Throwable();
+        NoSuchPreparerException exception = new NoSuchPreparerException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link NoSuchPreparerException#NoSuchPreparerException(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testNoSuchPreparerExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        NoSuchPreparerException exception = new NoSuchPreparerException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/renderer/DefinitionRendererTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/renderer/DefinitionRendererTest.java
new file mode 100644
index 0000000..6bc1134
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/renderer/DefinitionRendererTest.java
@@ -0,0 +1,104 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.renderer;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.render.CannotRenderException;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link DefinitionRenderer}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefinitionRendererTest {
+
+    /**
+     * The renderer.
+     */
+    private DefinitionRenderer renderer;
+
+    /**
+     * The container.
+     */
+    private TilesContainer container;
+
+    /** {@inheritDoc} */
+    @Before
+    public void setUp() {
+        container = createMock(TilesContainer.class);
+        renderer = new DefinitionRenderer(container);
+    }
+
+    /**
+     * Tests
+     * {@link DefinitionRenderer#render(String, Request)}.
+     *
+     * @throws IOException If something goes wrong during rendition.
+     */
+    @Test
+    public void testWrite() throws IOException {
+        Request requestContext = createMock(Request.class);
+        container.render("my.definition", requestContext);
+        replay(requestContext, container);
+        renderer.render("my.definition", requestContext);
+        verify(requestContext, container);
+    }
+
+    /**
+     * Tests
+     * {@link DefinitionRenderer#render(String, Request)}.
+     *
+     * @throws IOException If something goes wrong during rendition.
+     */
+    @Test(expected = CannotRenderException.class)
+    public void testRenderException() throws IOException {
+        Request requestContext = createMock(Request.class);
+        replay(requestContext, container);
+        try {
+            renderer.render(null, requestContext);
+        } finally {
+            verify(requestContext, container);
+        }
+    }
+
+    /**
+     * Tests
+     * {@link DefinitionRenderer#isRenderable(String, Request)}
+     * .
+     */
+    @Test
+    public void testIsRenderable() {
+        Request requestContext = createMock(Request.class);
+        expect(container.isValidDefinition("my.definition", requestContext)).andReturn(Boolean.TRUE);
+        replay(requestContext, container);
+        assertTrue(renderer.isRenderable("my.definition", requestContext));
+        assertFalse(renderer.isRenderable(null, requestContext));
+        verify(requestContext, container);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/startup/AbstractTilesInitializerTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/startup/AbstractTilesInitializerTest.java
new file mode 100644
index 0000000..361ff45
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/startup/AbstractTilesInitializerTest.java
@@ -0,0 +1,129 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.startup;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.Map;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.request.ApplicationAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link AbstractTilesInitializer}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AbstractTilesInitializerTest {
+
+    /**
+     * A mock Tiles container factory.
+     */
+    private AbstractTilesContainerFactory containerFactory;
+
+    /**
+     * The object to test.
+     */
+    private AbstractTilesInitializer initializer;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        containerFactory = createMock(AbstractTilesContainerFactory.class);
+        initializer = new AbstractTilesInitializer() {
+
+            @Override
+            protected AbstractTilesContainerFactory createContainerFactory(
+                    ApplicationContext context) {
+                return containerFactory;
+            }
+        };
+    }
+
+    /**
+     * Test method for {@link AbstractTilesInitializer#initialize(ApplicationContext)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testInitialize() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> scope = createMock(Map.class);
+
+        expect(containerFactory.createContainer(context)).andReturn(container);
+        expect(context.getApplicationScope()).andReturn(scope).anyTimes();
+        expect(scope.put(ApplicationAccess.APPLICATION_CONTEXT_ATTRIBUTE,
+                context)).andReturn(null);
+        expect(scope.put(TilesAccess.CONTAINER_ATTRIBUTE, container)).andReturn(null);
+        expect(scope.remove(TilesAccess.CONTAINER_ATTRIBUTE)).andReturn(container);
+
+        replay(containerFactory, context, container, scope);
+        initializer.initialize(context);
+        initializer.destroy();
+        verify(containerFactory, context, container, scope);
+    }
+
+    /**
+     * Test method for {@link AbstractTilesInitializer#createTilesApplicationContext(ApplicationContext)}.
+     */
+    @Test
+    public void testCreateTilesApplicationContext() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+        replay(containerFactory, context);
+        assertEquals(context, initializer.createTilesApplicationContext(context));
+        verify(containerFactory, context);
+    }
+
+    /**
+     * Test method for {@link AbstractTilesInitializer#getContainerKey(ApplicationContext)}.
+     */
+    @Test
+    public void testGetContainerKey() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+        replay(containerFactory, context);
+        assertNull(initializer.getContainerKey(context));
+        verify(containerFactory, context);
+    }
+
+    /**
+     * Test method for {@link AbstractTilesInitializer#createContainer(ApplicationContext)}.
+     */
+    @Test
+    public void testCreateContainer() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+
+        expect(containerFactory.createContainer(context)).andReturn(container);
+
+        replay(containerFactory, context, container);
+        assertEquals(container, initializer.createContainer(context));
+        verify(containerFactory, context, container);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/startup/DefaultTilesInitializerTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/startup/DefaultTilesInitializerTest.java
new file mode 100644
index 0000000..73ea134
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/startup/DefaultTilesInitializerTest.java
@@ -0,0 +1,50 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.startup;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import org.apache.tiles.factory.BasicTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.junit.Test;
+
+/**
+ * Tests {@link DefaultTilesInitializer}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefaultTilesInitializerTest {
+
+    /**
+     * Test method for {@link DefaultTilesInitializer#createContainerFactory(ApplicationContext)}.
+     */
+    @Test
+    public void testCreateContainerFactory() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+
+        replay(context);
+        DefaultTilesInitializer initializer = new DefaultTilesInitializer();
+        assertTrue(initializer.createContainerFactory(context) instanceof BasicTilesContainerFactory);
+        verify(context);
+    }
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/util/CombinedBeanInfoTest.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/util/CombinedBeanInfoTest.java
new file mode 100644
index 0000000..59ea879
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/util/CombinedBeanInfoTest.java
@@ -0,0 +1,106 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.util;
+
+import static org.junit.Assert.*;
+
+import java.beans.FeatureDescriptor;
+import java.beans.PropertyDescriptor;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.reflect.ClassUtil;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link CombinedBeanInfo}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CombinedBeanInfoTest {
+
+    /**
+     * The bean info to test.
+     */
+    private CombinedBeanInfo beanInfo;
+
+    /**
+     * The property descriptors.
+     */
+    private List<FeatureDescriptor> descriptors;
+
+    /**
+     * The map of property descriptors for request.
+     */
+    private Map<String, PropertyDescriptor> requestMap;
+
+    /**
+     * The map of property descriptors for application.
+     */
+    private Map<String, PropertyDescriptor> applicationMap;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        beanInfo = new CombinedBeanInfo(Request.class, ApplicationContext.class);
+        requestMap = new LinkedHashMap<String, PropertyDescriptor>();
+        ClassUtil.collectBeanInfo(Request.class, requestMap);
+        applicationMap = new LinkedHashMap<String, PropertyDescriptor>();
+        ClassUtil.collectBeanInfo(ApplicationContext.class, applicationMap);
+        descriptors = new ArrayList<FeatureDescriptor>();
+        descriptors.addAll(requestMap.values());
+        descriptors.addAll(applicationMap.values());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.util.CombinedBeanInfo#getDescriptors()}.
+     */
+    @Test
+    public void testGetDescriptors() {
+        assertEquals(descriptors, beanInfo.getDescriptors());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.util.CombinedBeanInfo#getMappedDescriptors(java.lang.Class)}.
+     */
+    @Test
+    public void testGetMappedDescriptors() {
+        assertEquals(requestMap, beanInfo.getMappedDescriptors(Request.class));
+        assertEquals(applicationMap, beanInfo.getMappedDescriptors(ApplicationContext.class));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.util.CombinedBeanInfo#getProperties(java.lang.Class)}.
+     */
+    @Test
+    public void testGetProperties() {
+        assertEquals(requestMap.keySet(), beanInfo.getProperties(Request.class));
+        assertEquals(applicationMap.keySet(), beanInfo.getProperties(ApplicationContext.class));
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/util/RollingVectorEnumeration.java b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/util/RollingVectorEnumeration.java
new file mode 100644
index 0000000..e06b33b
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/java/org/apache/tiles/util/RollingVectorEnumeration.java
@@ -0,0 +1,76 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.util;
+
+import java.util.Enumeration;
+import java.util.Vector;
+
+/**
+ * It represents an vector-based enumeration when, when it has finished
+ * enumerating items, it starts from the beginning.
+ *
+ * @param <E> The type of the element of this enumeration.
+ * @version $Rev$ $Date$
+ */
+public class RollingVectorEnumeration<E> implements Enumeration<E> {
+
+    /**
+     * The vector.
+     */
+    private Vector<E> vector;
+
+    /**
+     * The elements.
+     */
+    private Enumeration<E> elements;
+
+    /**
+     * Constructor.
+     *
+     * @param vector The vector.
+     */
+    public RollingVectorEnumeration(Vector<E> vector) {
+        this.vector = vector;
+        elements = vector.elements();
+    }
+
+    /** {@inheritDoc} */
+    public boolean hasMoreElements() {
+        if (elements == null) {
+            elements = vector.elements();
+            return false;
+        }
+        return elements.hasMoreElements();
+    }
+
+    /** {@inheritDoc} */
+    public E nextElement() {
+        E retValue = elements.nextElement();
+
+        if (!elements.hasMoreElements()) {
+            elements = null;
+        }
+
+        return retValue;
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs-tiles-513.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs-tiles-513.xml
new file mode 100644
index 0000000..698d5d1
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs-tiles-513.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+
+<!-- Definitions for Tiles documentation -->
+
+<tiles-definitions>
+  <!-- Authentication Layout -->
+  <definition name="test.anonymous.base" template="/layout.jsp">
+    <put-attribute name="header">
+      <definition template="/header.jsp" />
+    </put-attribute>
+    <put-attribute name="menu">
+      <definition template="/localnav.jsp" />
+    </put-attribute>
+    <put-attribute name="footer">
+      <definition template="/footer.jsp" />
+    </put-attribute>
+  </definition>
+
+  <!-- index page -->
+  <definition name="test.anonymous" extends="test.anonymous.base">
+    <put-attribute name="title" value="page.title.security.login" />
+    <put-attribute name="body" value="/body.jsp" />
+  </definition>
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs-wildcard.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs-wildcard.xml
new file mode 100644
index 0000000..6590b7e
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs-wildcard.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="test.def3" template="/test.jsp">
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+  <definition name="test.def*.sub*" template="/test{1}.jsp">
+      <put-attribute name="country" value="default"/>
+      <put-attribute name="title"  value="Tiles Library Documentation" />
+      <put-attribute name="header" value="/common/header{2}.jsp" />
+      <put-attribute name="menu"   value="doc.menu.main" />
+      <put-attribute name="footer" value="/common/footer.jsp" />
+      <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+  <definition name="test.def*.noAttribute" template="/test{1}.jsp" />
+
+  <!-- Never used on purpose, if there is the TILES-416 the test will fail -->
+  <definition name="test.def*" template="/test{1}.jsp">
+      <put-attribute name="country" value="default"/>
+      <put-attribute name="title"  value="Tiles Library Documentation" />
+      <put-attribute name="header" value="/common/header-sub.jsp" />
+      <put-attribute name="menu"   value="doc.menu.main" />
+      <put-attribute name="footer" value="/common/footer.jsp" />
+      <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+  <definition name="test.extended.def*.sub*" extends="test.def{1}.sub{2}">
+      <put-attribute name="title"  value="Overridden Title" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1.xml
new file mode 100644
index 0000000..6cde50d
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- This definition will remain the same for all locales -->
+  <definition name="test.common" template="/test.jsp">
+      <put-attribute name="country" value="none"/>
+    <put-attribute name="title"  value="Common Definition" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+  <!-- Doc index page description  -->
+  <definition name="test.def1" template="/test.jsp">
+          <put-attribute name="country" value="default"/>
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+  <!-- This definition will be extended -->
+  <definition name="test.def.toextend" template="/test.jsp">
+    <put-attribute name="country" value="default"/>
+    <put-attribute name="title"  value="Definition to be extended" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+  <!-- This definition will be overridden -->
+  <definition name="test.def.overridden" template="/test.jsp">
+    <put-attribute name="country" value="default"/>
+    <put-attribute name="title"  value="Definition to be overridden" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1_en_US.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1_en_US.xml
new file mode 100644
index 0000000..9bb423d
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1_en_US.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="test.def1" template="/test.jsp">
+          <put-attribute name="country" value="US"/>
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1_fr.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1_fr.xml
new file mode 100644
index 0000000..798a76e
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1_fr.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="test.def1" template="/test.jsp">
+          <put-attribute name="country" value="France"/>
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+  <definition name="test.common.french" template="/test.jsp">
+          <put-attribute name="country" value="France"/>
+    <put-attribute name="title"  value="Common Definition for French" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+  <definition name="test.def.overridden" extends="test.def.toextend">
+    <put-attribute name="country" value="France"/>
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1_fr_CA.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1_fr_CA.xml
new file mode 100644
index 0000000..1a74e50
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs1_fr_CA.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="test.def1" template="/test.jsp">
+          <put-attribute name="country" value="Canada"/>
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs2.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs2.xml
new file mode 100644
index 0000000..b16912b
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs2.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="test.def2" template="/test.jsp">
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs3.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs3.xml
new file mode 100644
index 0000000..9a964a5
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs3.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="test.def3" template="/test.jsp">
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs_regression_TILES-352.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs_regression_TILES-352.xml
new file mode 100644
index 0000000..2f17015
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/defs_regression_TILES-352.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+ <!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+ <!-- Definitions to check regression from TILES-252    -->
+
+<tiles-definitions>
+ <definition name="root">
+  <put-attribute name="body">
+   <definition template="/my/template.jsp">
+    <put-list-attribute name="list">
+     <add-attribute value="This is a value" type="string" />
+    </put-list-attribute>
+   </definition>
+  </put-attribute>
+ </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/invalid-defs.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/invalid-defs.xml
new file mode 100644
index 0000000..28d05b0
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/invalid-defs.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Dorked up XML tag.  -->
+  <definitionasdfad name="doc.mainLayout" template="/layout/classicLayout.jsp">
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definitionasdfad>
+
+</tiles-definitions>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/malformed-defs.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/malformed-defs.xml
new file mode 100644
index 0000000..9175bd9
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/malformed-defs.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="doc.mainLayout" template="/layout/classicLayout.jsp">
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/temp-defs.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/temp-defs.xml
new file mode 100644
index 0000000..5d5e6d4
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/temp-defs.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="test.def1" template="/test.jsp">
+          <put-attribute name="country" value="default"/>
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/tiles-defs-2.1.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/tiles-defs-2.1.xml
new file mode 100644
index 0000000..3a602e3
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/tiles-defs-2.1.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="doc.cascaded.test" template="/layout/classicLayout.jsp">
+    <put-attribute name="title" value="Test title" cascade="false" />
+    <put-attribute name="title2" value="Test title two" cascade="true" />
+    <put-list-attribute name="items1" cascade="false">
+        <add-attribute value="value1" type="string" />
+    </put-list-attribute>
+    <put-list-attribute name="items2" cascade="true">
+        <add-attribute value="value2" type="string" />
+    </put-list-attribute>
+  </definition>
+
+  <definition name="test.nesting.definitions" template="/layout.jsp">
+      <put-attribute name="body">
+          <definition template="/layout.jsp">
+              <put-attribute name="title"  value="This is a nested definition."/>
+          </definition>
+      </put-attribute>
+  </definition>
+
+  <definition name="test.nesting.list.definitions" template="/layout.jsp">
+      <put-list-attribute name="list">
+          <add-attribute>
+              <definition template="/layout.jsp">
+                  <put-attribute name="title"  value="This is a nested definition."/>
+              </definition>
+          </add-attribute>
+      </put-list-attribute>
+  </definition>
+
+  <definition name="test.inherit.list.base" template="/layout.jsp">
+      <put-list-attribute name="list">
+          <add-attribute value="first" />
+      </put-list-attribute>
+  </definition>
+
+  <definition name="test.inherit.list" extends="test.inherit.list.base">
+      <put-list-attribute name="list" inherit="true">
+          <add-attribute value="second" />
+      </put-list-attribute>
+  </definition>
+
+  <definition name="test.noinherit.list" extends="test.inherit.list.base">
+      <put-list-attribute name="list">
+          <add-attribute value="second" />
+      </put-list-attribute>
+  </definition>
+
+  <definition name="test.new.attributes" templateExpression="${my.expression}"
+          templateType="mytype" >
+      <put-attribute name="body" expression="${my.attribute.expression}" />
+  </definition>
+
+  <definition name="test.inherit.othertype.base" template="/layout.ftl" templateType="freemarker">
+      <put-attribute name="body" value="/jsp/body.jsp" />
+  </definition>
+
+  <definition name="test.inherit.othertype" extends="test.inherit.othertype.base">
+  </definition>
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/tiles-defs-2.1_it.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/tiles-defs-2.1_it.xml
new file mode 100644
index 0000000..af9a227
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/tiles-defs-2.1_it.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="test.dummy" template="/dummy_layout.jsp">
+      <put-attribute name="body" expression="/dummy_body.jsp" />
+  </definition>
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/tiles-defs.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/tiles-defs.xml
new file mode 100644
index 0000000..daa42a5
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/config/tiles-defs.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="doc.mainLayout" template="/layout/classicLayout.jsp">
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+      <put-attribute name="bean"   value="This is an object" type="object" />
+  </definition>
+
+  <!-- =======================================================  -->
+  <!-- Main page body definitions  									-->
+  <!-- =======================================================  -->
+
+  <definition name="doc.portal.body" template="/layout/columnsLayout.jsp">
+    <put-attribute name="numCols" value="2" />
+    <put-list-attribute name="list0" >
+      <add-attribute value="/doc/portal/welcome.jsp" />
+      <add-attribute value="/doc/portal/features.jsp" />
+      <!--<add-attribute value="/doc/portal/todo.jsp" /> -->
+      <add-attribute value="/doc/portal/documentation.jsp" />
+    </put-list-attribute>
+    <put-list-attribute name="list1" >
+      <add-attribute value="/doc/portal/news.jsp" />
+      <add-attribute value="/doc/portal/download.jsp" />
+      <add-attribute value="/doc/portal/tilesCompsTemplates.jsp" />
+      <add-attribute value="/doc/portal/strutsIntegration.jsp" />
+      <add-attribute value="/doc/portal/comments.jsp" />
+      <add-attribute value="/doc/portal/revisions.jsp" />
+    </put-list-attribute>
+  </definition>
+
+  <!-- =======================================================  -->
+  <!-- Menus definitions  									-->
+  <!-- =======================================================  -->
+
+  <!-- Menu bar definition -->
+<definition name="doc.menu.main" template="/layout/vboxLayout.jsp" >
+  <put-list-attribute name="componentsList" >
+    <add-attribute value="doc.menu.links" />
+    <add-attribute value="doc.menu.taglib.references" />
+    <add-attribute value="doc.menu.printer.friendly" />
+    <add-attribute value="doc.menu.old.documents" />
+  </put-list-attribute>
+</definition>
+
+  <!-- Documentation menu definition v1.1-->
+<definition name="doc.menu.links" template="/layouts/menu.jsp" >
+  <put-attribute name="title" value="Documentation" />
+    <put-list-attribute name="items" >
+      <item value="Home"           link="/index.jsp"  />
+      <item value="Live Examples (new)" link="/examples/index.jsp"  />
+      <!--
+    <item> <value>Commented Examples</value>
+        <link>/examples/index.jsp</link>
+      <classtype>org.apache.tiles.beans.SimpleMenuItem</classtype>
+    </item>
+    -->
+      <item value="Quick overview" link="/doc/quickOverview.jsp"  />
+      <!--
+      <item value="Tutorial"       link="/doc/tutorial.jsp"  />
+      -->
+      <item value="Tutorial Live Examples" link="/tutorial/index.jsp" />
+      <item value="Download"       link="/doc/download.jsp" />
+      <item value="Installation"   link="/doc/installation.jsp" />
+      <item value="User Guide"	   link="/doc/userGuide.jsp" />
+      <item value="Javadoc"        link="/api/index.html" />
+      <item value="Struts Home"    link="http://www.apache.org"   icon="/images/struts-power.gif"
+      classtype="org.apache.tiles.beans.SimpleMenuItem" />
+    </put-list-attribute>
+</definition>
+
+  <!-- Printer friendly menu definition -->
+<definition name="doc.menu.printer.friendly" template="/layouts/menu.jsp" >
+  <put-attribute name="title" value="Printer Versions" />
+  <put-list-attribute name="items" >
+    <item value="Quick Overview"     link="/test/testAll.jsp" />
+    <item value="Tutorial"           link="/doc/tutorialBody.html" />
+    <item value="User Guide"         link="/doc/userGuideBody.html" />
+    <item value="Overview (old)"  	 link="/doc/overviewBody.html" />
+  </put-list-attribute>
+</definition>
+
+  <!-- Taglib menu definition -->
+<definition name="doc.menu.taglib.references" template="/layouts/menu.jsp" >
+  <put-attribute name="title" value="Tag Library Reference" />
+    <put-list-attribute name="items" >
+      <item value="Tiles Tags"     link="/doc/tilesTags.jsp" />
+      <!-- <item value="Extension Tags (old)"   link="/doc/extensionsTags.jsp" /> -->
+    </put-list-attribute>
+</definition>
+
+  <!-- Oldies menu definition -->
+<definition name="doc.menu.old.documents" template="/layouts/menu.jsp" >
+  <put-attribute name="title" value="Old Documents" />
+  <put-list-attribute name="items" >
+    <item value="Overview (old)"     link="/doc/overview.jsp" />
+  </put-list-attribute>
+</definition>
+
+<definition name="doc.role.test" template="/layout/classicLayout.jsp">
+  <put-attribute name="title" value="Test title" role="myrole" />
+</definition>
+
+<definition name="doc.listattribute.test" template="/layout/classicLayout.jsp">
+  <put-list-attribute name="items" />
+</definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/factory/test-defs-key-one.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/factory/test-defs-key-one.xml
new file mode 100644
index 0000000..1eff6b4
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/factory/test-defs-key-one.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<tiles-definitions>
+  <definition name="test.def.one" template="/test.jsp">
+          <put-attribute name="country" value="default"/>
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/factory/test-defs-key-two.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/factory/test-defs-key-two.xml
new file mode 100644
index 0000000..7c20675
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/factory/test-defs-key-two.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<tiles-definitions>
+  <definition name="test.def.two" template="/test.jsp">
+          <put-attribute name="country" value="default"/>
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/factory/test-defs.xml b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/factory/test-defs.xml
new file mode 100644
index 0000000..5e7cd10
--- /dev/null
+++ b/TILES_3_0_X/tiles-core/src/test/resources/org/apache/tiles/factory/test-defs.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<tiles-definitions>
+  <definition name="test.def1" template="/test.jsp">
+          <put-attribute name="country" value="default"/>
+    <put-attribute name="title"  value="Tiles Library Documentation" />
+    <put-attribute name="header" value="/common/header.jsp" />
+    <put-attribute name="menu"   value="doc.menu.main" />
+    <put-attribute name="footer" value="/common/footer.jsp" />
+    <put-attribute name="body"   value="doc.portal.body" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-el/pom.xml b/TILES_3_0_X/tiles-el/pom.xml
new file mode 100644
index 0000000..3b86c1d
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/pom.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0"?>
+  <!--
+    /* * $Id$ * *
+    Licensed to the Apache Software Foundation (ASF) under one * or more
+    contributor license agreements. See the NOTICE file * distributed
+    with this work for additional information * regarding copyright
+    ownership. The ASF licenses this file * to you under the Apache
+    License, Version 2.0 (the * "License"); you may not use this file
+    except in compliance * with the License. You may obtain a copy of
+    the License at * * http://www.apache.org/licenses/LICENSE-2.0 * *
+    Unless required by applicable law or agreed to in writing, *
+    software distributed under the License is distributed on an * "AS
+    IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either
+    express or implied. See the License for the * specific language
+    governing permissions and limitations * under the License. */
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>tiles-el</artifactId>
+  <packaging>jar</packaging>
+  <name>Tiles - EL support</name>
+  <description>Tiles EL (Expression Language) support: Classes and tag libraries to use EL as an expression language in attribute expressions.	</description>
+
+  <properties>
+    <tiles.osgi.symbolicName>org.apache.tiles.el</tiles.osgi.symbolicName>
+  </properties>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <excludes>
+          <exclude>LICENSE.txt</exclude>
+          <exclude>NOTICE.txt</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>LICENSE.txt</include>
+          <include>NOTICE.txt</include>
+        </includes>
+        <targetPath>META-INF</targetPath>
+      </resource>
+    </resources>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+      <plugin> 
+        <groupId>org.apache.felix</groupId> 
+        <artifactId>maven-bundle-plugin</artifactId> 
+        <configuration> 
+          <instructions> 
+            <Import-Package> 
+              org.apache.el; resolution:=optional, 
+              * 
+            </Import-Package> 
+          </instructions> 
+        </configuration> 
+      </plugin>
+    </plugins>
+
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymockclassextension</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.el</groupId>
+      <artifactId>el-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>jasper-el</artifactId>
+      <version>6.0.20</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.tomcat</groupId>
+          <artifactId>el-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ELAttributeEvaluator.java b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ELAttributeEvaluator.java
new file mode 100644
index 0000000..0e6b068
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ELAttributeEvaluator.java
@@ -0,0 +1,104 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import javax.el.ELResolver;
+import javax.el.ExpressionFactory;
+import javax.el.ValueExpression;
+
+import org.apache.tiles.evaluator.AbstractAttributeEvaluator;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+
+/**
+ * Evaluates string expression with typical EL syntax.<br>
+ * You can use normal EL syntax, knowing that the root objects are
+ * {@link Request}, {@link ApplicationContext} and beans
+ * contained in request, session and application scope.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public class ELAttributeEvaluator extends AbstractAttributeEvaluator {
+
+    /**
+     * Initialization parameter to decide the implementation of
+     * {@link ExpressionFactoryFactory}.
+     *
+     * @since 2.2.1
+     */
+    public static final String EXPRESSION_FACTORY_FACTORY_INIT_PARAM =
+        "org.apache.tiles.evaluator.el.ExpressionFactoryFactory";
+
+    /**
+     * The EL expression factory.
+     *
+     * @since 2.2.1
+     */
+    protected ExpressionFactory expressionFactory;
+
+    /**
+     * The EL resolver to use.
+     *
+     * @since 2.2.1
+     */
+    protected ELResolver resolver;
+
+    /**
+     * Constructor.
+     *
+     * @since 2.2.1
+     */
+    public ELAttributeEvaluator() {
+    }
+
+    /**
+     * Sets the expression factory to use.
+     *
+     * @param expressionFactory The expression factory.
+     * @since 2.2.1
+     */
+    public void setExpressionFactory(ExpressionFactory expressionFactory) {
+        this.expressionFactory = expressionFactory;
+    }
+
+    /**
+     * Sets the EL resolver to use.
+     *
+     * @param resolver The EL resolver.
+     * @since 2.2.1
+     */
+    public void setResolver(ELResolver resolver) {
+        this.resolver = resolver;
+    }
+
+    /** {@inheritDoc} */
+    public Object evaluate(String expression, Request request) {
+        ELContextImpl context = new ELContextImpl(resolver);
+        context.putContext(Request.class, request);
+        context.putContext(ApplicationContext.class,
+                request.getApplicationContext());
+        ValueExpression valueExpression = expressionFactory
+                .createValueExpression(context, expression, Object.class);
+
+        return valueExpression.getValue(context);
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ELContextImpl.java b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ELContextImpl.java
new file mode 100644
index 0000000..2c51569
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ELContextImpl.java
@@ -0,0 +1,147 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.el;
+
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.el.ELContext;
+import javax.el.ELResolver;
+import javax.el.FunctionMapper;
+import javax.el.ValueExpression;
+import javax.el.VariableMapper;
+
+/**
+ * Implementation of ELContext.<br>
+ * Copied from Apache Tomcat 6.0.16 source code.
+ *
+ * @since 2.2.1
+ */
+public class ELContextImpl extends ELContext {
+
+    /**
+     * A null function mapper.
+     */
+    private static final FunctionMapper NULL_FUNCTION_MAPPER = new FunctionMapper() {
+        @Override
+        public Method resolveFunction(String prefix, String localName) {
+            return null;
+        }
+    };
+
+    /**
+     * Default implementation for the variable mapper.
+     */
+    private static final class VariableMapperImpl extends VariableMapper {
+
+        /**
+         * The mapped variables.
+         */
+        private Map<String, ValueExpression> vars;
+
+        /** {@inheritDoc} */
+        @Override
+        public ValueExpression resolveVariable(String variable) {
+            if (vars == null) {
+                return null;
+            }
+            return vars.get(variable);
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        public ValueExpression setVariable(String variable,
+                ValueExpression expression) {
+            if (vars == null) {
+                vars = new HashMap<String, ValueExpression>();
+            }
+            return vars.put(variable, expression);
+        }
+
+    }
+
+    /**
+     * The EL resolver to use.
+     */
+    private final ELResolver resolver;
+
+    /**
+     * The function mapper to use.
+     */
+    private FunctionMapper functionMapper = NULL_FUNCTION_MAPPER;
+
+    /**
+     * The variable mapper to use.
+     */
+    private VariableMapper variableMapper;
+
+    /**
+     * Constructor.
+     *
+     * @param resolver The resolver to use.
+     */
+    public ELContextImpl(ELResolver resolver) {
+        this.resolver = resolver;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public ELResolver getELResolver() {
+        return this.resolver;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public FunctionMapper getFunctionMapper() {
+        return this.functionMapper;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public VariableMapper getVariableMapper() {
+        if (this.variableMapper == null) {
+            this.variableMapper = new VariableMapperImpl();
+        }
+        return this.variableMapper;
+    }
+
+    /**
+     * Sets the function mapper to use.
+     *
+     * @param functionMapper The function mapper.
+     * @since 2.2.1
+     */
+    public void setFunctionMapper(FunctionMapper functionMapper) {
+        this.functionMapper = functionMapper;
+    }
+
+    /**
+     * Sets the variable mapper to use.
+     *
+     * @param variableMapper The variable mapper.
+     * @since 2.2.1
+     */
+    public void setVariableMapper(VariableMapper variableMapper) {
+        this.variableMapper = variableMapper;
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ExpressionFactoryFactory.java b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ExpressionFactoryFactory.java
new file mode 100644
index 0000000..ce600ad
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ExpressionFactoryFactory.java
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.el;
+
+import javax.el.ExpressionFactory;
+
+/**
+ * Interface to define a factory of {@link ExpressionFactory}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public interface ExpressionFactoryFactory {
+
+    /**
+     * Returns the expression factory to use.
+     *
+     * @return The expression factory.
+     * @since 2.2.1
+     */
+    ExpressionFactory getExpressionFactory();
+}
diff --git a/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/JspExpressionFactoryFactory.java b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/JspExpressionFactoryFactory.java
new file mode 100644
index 0000000..b663a3c
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/JspExpressionFactoryFactory.java
@@ -0,0 +1,64 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.el;
+
+import javax.el.ExpressionFactory;
+import javax.servlet.ServletContext;
+import javax.servlet.jsp.JspFactory;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationContextAware;
+
+/**
+ * Uses the JSP 2.1 {@link ExpressionFactory} to be used in Tiles.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public class JspExpressionFactoryFactory implements ExpressionFactoryFactory,
+        ApplicationContextAware {
+
+    /**
+     * The servlet context.
+     *
+     * @since 2.2.1
+     */
+    protected ServletContext servletContext;
+
+    /** {@inheritDoc} */
+    public void setApplicationContext(ApplicationContext applicationContext) {
+        Object context = applicationContext.getContext();
+        if (context instanceof ServletContext) {
+            this.servletContext = (ServletContext) context;
+        } else {
+            throw new IllegalArgumentException(
+                    "The application context does not hold an instance of "
+                    + "ServletContext, consider using JuelExpressionFactoryFactory");
+        }
+    }
+
+    /** {@inheritDoc} */
+    public ExpressionFactory getExpressionFactory() {
+        return JspFactory.getDefaultFactory().getJspApplicationContext(
+                servletContext).getExpressionFactory();
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ScopeELResolver.java b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ScopeELResolver.java
new file mode 100644
index 0000000..578cd97
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/ScopeELResolver.java
@@ -0,0 +1,138 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.el.ELContext;
+import javax.el.ELResolver;
+
+import org.apache.tiles.request.Request;
+
+/**
+ * Resolves beans in request, session and application scope.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public class ScopeELResolver extends ELResolver {
+
+    /**
+     * The length of the suffix: "Scope".
+     */
+    private static final int SUFFIX_LENGTH = 5;
+
+    /** {@inheritDoc} */
+    @Override
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
+        // only resolve at the root of the context
+        if (base != null) {
+            return null;
+        }
+
+        return Map.class;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
+            Object base) {
+        if (base != null) {
+            List<FeatureDescriptor> retValue = Collections.emptyList();
+            return retValue.iterator();
+        }
+
+        List<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>();
+
+        Request request = (Request) context
+                .getContext(Request.class);
+        for (String scope : request.getAvailableScopes()) {
+            FeatureDescriptor descriptor = new FeatureDescriptor();
+            descriptor.setDisplayName(scope + "Scope");
+            descriptor.setExpert(false);
+            descriptor.setHidden(false);
+            descriptor.setName(scope + "Scope");
+            descriptor.setPreferred(true);
+            descriptor.setShortDescription("");
+            descriptor.setValue("type", Map.class);
+            descriptor.setValue("resolvableAtDesignTime", Boolean.FALSE);
+            list.add(descriptor);
+        }
+
+        return list.iterator();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Class<?> getType(ELContext context, Object base, Object property) {
+        if (base != null || property == null || !(property instanceof String)
+                || !((String) property).endsWith("Scope")) {
+            return null;
+        }
+
+        return Map.class;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Object getValue(ELContext context, Object base, Object property) {
+        if (base != null) {
+            return null;
+        }
+
+        Object retValue = null;
+        String propertyString = (String) property;
+        if (property instanceof String && propertyString.endsWith("Scope")) {
+            Request request = (Request) context
+                    .getContext(Request.class);
+            retValue = request.getContext(propertyString.substring(0,
+                    propertyString.length() - SUFFIX_LENGTH));
+        }
+
+        if (retValue != null) {
+            context.setPropertyResolved(true);
+        }
+
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isReadOnly(ELContext context, Object base, Object property) {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void setValue(ELContext context, Object base, Object property,
+            Object value) {
+        // Does nothing for the moment.
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/TilesContextBeanELResolver.java b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/TilesContextBeanELResolver.java
new file mode 100644
index 0000000..1cd3e1b
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/TilesContextBeanELResolver.java
@@ -0,0 +1,184 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.el.ELContext;
+import javax.el.ELResolver;
+
+import org.apache.tiles.request.Request;
+
+/**
+ * Resolves beans in request, session and application scope.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public class TilesContextBeanELResolver extends ELResolver {
+
+    /** {@inheritDoc} */
+    @Override
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
+        // only resolve at the root of the context
+        if (base != null) {
+            return null;
+        }
+
+        return String.class;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
+            Object base) {
+        List<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>();
+
+        Request request = (Request) context
+                .getContext(Request.class);
+        for (String scope : request.getAvailableScopes()) {
+            collectBeanInfo(request.getContext(scope), list);
+        }
+        return list.iterator();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Class<?> getType(ELContext context, Object base, Object property) {
+        if (base != null) {
+            return null;
+        }
+
+        Object obj = findObjectByProperty(context, property);
+        if (obj != null) {
+            context.setPropertyResolved(true);
+            return obj.getClass();
+        }
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Object getValue(ELContext context, Object base, Object property) {
+        if (base != null) {
+            return null;
+        }
+
+        Object retValue = findObjectByProperty(context, property);
+
+        if (retValue != null) {
+            context.setPropertyResolved(true);
+        }
+
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isReadOnly(ELContext context, Object base, Object property) {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void setValue(ELContext context, Object base, Object property,
+            Object value) {
+        // Does nothing for the moment.
+    }
+
+    /**
+     * Collects bean infos from a map's values and filling a list.
+     *
+     * @param map The map containing the bean to be inspected.
+     * @param list The list to fill.
+     * @since 2.2.1
+     */
+    protected void collectBeanInfo(Map<String, ? extends Object> map,
+            List<FeatureDescriptor> list) {
+        if (map == null || map.isEmpty()) {
+            return;
+        }
+
+        for (Map.Entry<String, ? extends Object> entry : map.entrySet()) {
+            FeatureDescriptor descriptor = new FeatureDescriptor();
+            descriptor.setDisplayName(entry.getKey());
+            descriptor.setExpert(false);
+            descriptor.setHidden(false);
+            descriptor.setName(entry.getKey());
+            descriptor.setPreferred(true);
+            descriptor.setShortDescription("");
+            descriptor.setValue("type", String.class);
+            descriptor.setValue("resolvableAtDesignTime", Boolean.FALSE);
+            list.add(descriptor);
+        }
+    }
+
+    /**
+     * Finds an object in request, session or application scope, in this order.
+     *
+     * @param context The context to use.
+     * @param property The property used as an attribute name.
+     * @return The found bean, if it exists, or <code>null</code> otherwise.
+     * @since 2.2.1
+     */
+    protected Object findObjectByProperty(ELContext context, Object property) {
+        Object retValue = null;
+
+        Request request = (Request) context
+                .getContext(Request.class);
+
+        String prop = property.toString();
+
+        String[] scopes = request.getAvailableScopes().toArray(new String[0]);
+        int i = 0;
+        do {
+            retValue = getObject(request.getContext(scopes[i]), prop);
+            i++;
+        } while (retValue == null && i < scopes.length);
+
+        return retValue;
+    }
+
+    /**
+     * Returns an object from a map in a null-safe manner.
+     *
+     * @param map The map to use.
+     * @param property The property to use as a key.
+     * @return The object, if present, or <code>null</code> otherwise.
+     * @since 2.2.1
+     */
+    protected Object getObject(Map<String, ? extends Object> map,
+            String property) {
+        Object retValue = null;
+        if (map != null) {
+            retValue = map.get(property);
+        }
+        return retValue;
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/TilesContextELResolver.java b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/TilesContextELResolver.java
new file mode 100644
index 0000000..d3b59ca
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/TilesContextELResolver.java
@@ -0,0 +1,155 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import java.beans.FeatureDescriptor;
+import java.util.Iterator;
+
+import javax.el.ELContext;
+import javax.el.ELResolver;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.util.CombinedBeanInfo;
+
+/**
+ * Resolves properties of {@link Request} and
+ * {@link ApplicationContext}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public class TilesContextELResolver extends ELResolver {
+
+    /**
+     * Internal bean resolver to resolve beans in any context.
+     */
+    private ELResolver beanElResolver;
+
+    /**
+     * Constructor.
+     *
+     * @param beanElResolver The used bean resolver.
+     */
+    public TilesContextELResolver(ELResolver beanElResolver) {
+        this.beanElResolver = beanElResolver;
+    }
+
+    /**
+     * The beaninfos about {@link Request} and {@link ApplicationContext}.
+     */
+    private CombinedBeanInfo requestBeanInfo = new CombinedBeanInfo(
+            Request.class, ApplicationContext.class);
+
+    /** {@inheritDoc} */
+    @Override
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
+        // only resolve at the root of the context
+        if (base != null) {
+            return null;
+        }
+
+        return String.class;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
+            Object base) {
+        // only resolve at the root of the context
+        if (base != null) {
+            return null;
+        }
+
+        return requestBeanInfo.getDescriptors().iterator();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Class<?> getType(ELContext context, Object base, Object property) {
+        // only resolve at the root of the context
+        if (base != null) {
+            return null;
+        }
+
+        Class<?> retValue = null;
+        if (requestBeanInfo.getProperties(Request.class).contains(property)) {
+            Request request = (Request) context
+                    .getContext(Request.class);
+            retValue = beanElResolver.getType(context, request, property);
+        } else if (requestBeanInfo.getProperties(ApplicationContext.class).contains(property)) {
+            ApplicationContext applicationContext = (ApplicationContext) context
+                    .getContext(ApplicationContext.class);
+            retValue = beanElResolver.getType(context, applicationContext, property);
+        }
+
+        if (retValue != null) {
+            context.setPropertyResolved(true);
+        }
+
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Object getValue(ELContext context, Object base, Object property) {
+        // only resolve at the root of the context
+        if (base != null) {
+            return null;
+        }
+
+        Object retValue = null;
+
+        if (requestBeanInfo.getProperties(Request.class).contains(property)) {
+            Request request = (Request) context
+                    .getContext(Request.class);
+            retValue = beanElResolver.getValue(context, request, property);
+        } else if (requestBeanInfo.getProperties(ApplicationContext.class)
+                .contains(property)) {
+            ApplicationContext applicationContext = (ApplicationContext) context
+                    .getContext(ApplicationContext.class);
+            retValue = beanElResolver.getValue(context, applicationContext, property);
+        }
+
+        if (retValue != null) {
+            context.setPropertyResolved(true);
+        }
+
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isReadOnly(ELContext context, Object base, Object property) {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void setValue(ELContext context, Object base, Object property,
+            Object value) {
+        // Does nothing for the moment.
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/package-info.java b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/package-info.java
new file mode 100644
index 0000000..01731df
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/main/java/org/apache/tiles/el/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Attribute evaluator classes that can perform EL evaluation for attributes.
+ */
+package org.apache.tiles.el;
diff --git a/TILES_3_0_X/tiles-el/src/site/site.xml b/TILES_3_0_X/tiles-el/src/site/site.xml
new file mode 100644
index 0000000..6a9ce8c
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - EL Support">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/ELAttributeEvaluatorTest.java b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/ELAttributeEvaluatorTest.java
new file mode 100644
index 0000000..82a4745
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/ELAttributeEvaluatorTest.java
@@ -0,0 +1,195 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.el.ArrayELResolver;
+import javax.el.BeanELResolver;
+import javax.el.CompositeELResolver;
+import javax.el.ELResolver;
+import javax.el.ListELResolver;
+import javax.el.MapELResolver;
+import javax.el.ResourceBundleELResolver;
+
+import junit.framework.TestCase;
+
+import org.apache.el.ExpressionFactoryImpl;
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Expression;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.easymock.EasyMock;
+
+/**
+ * Tests {@link ELAttributeEvaluator}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ELAttributeEvaluatorTest extends TestCase {
+
+    /**
+     * The evaluator to test.
+     */
+    private ELAttributeEvaluator evaluator;
+
+    /**
+     * The request object to use.
+     */
+    private Request request;
+
+    /** {@inheritDoc} */
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        evaluator = new ELAttributeEvaluator();
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put("object1", "value");
+        sessionScope.put("object2", new Integer(1));
+        applicationScope.put("object3", new Float(2.0));
+        requestScope.put("paulaBean", new PaulaBean());
+        request = EasyMock.createMock(Request.class);
+        EasyMock.expect(request.getContext("request")).andReturn(requestScope)
+                .anyTimes();
+        EasyMock.expect(request.getContext("session")).andReturn(sessionScope)
+                .anyTimes();
+        EasyMock.expect(request.getContext("application")).andReturn(
+                applicationScope).anyTimes();
+        EasyMock.expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[] { "request", "session", "application" })).anyTimes();
+        ApplicationContext applicationContext = EasyMock
+                .createMock(ApplicationContext.class);
+        EasyMock.expect(request.getApplicationContext()).andReturn(
+                applicationContext).anyTimes();
+        EasyMock.replay(request, applicationContext);
+
+        evaluator.setExpressionFactory(new ExpressionFactoryImpl());
+        ELResolver elResolver = new CompositeELResolver() {
+            {
+                BeanELResolver beanElResolver = new BeanELResolver(false);
+                add(new ScopeELResolver());
+                add(new TilesContextELResolver(beanElResolver));
+                add(new TilesContextBeanELResolver());
+                add(new ArrayELResolver(false));
+                add(new ListELResolver(false));
+                add(new MapELResolver(false));
+                add(new ResourceBundleELResolver());
+                add(beanElResolver);
+            }
+        };
+        evaluator.setResolver(elResolver);
+    }
+
+    /**
+     * Tests
+     * {@link ELAttributeEvaluator#evaluate(Attribute, Request)}.
+     */
+    public void testEvaluate() {
+        Attribute attribute = new Attribute();
+        attribute.setExpressionObject(new Expression("${requestScope.object1}"));
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                attribute, request));
+        attribute.setExpressionObject(new Expression("${sessionScope.object2}"));
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("${applicationScope.object3}"));
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("${object1}"));
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                attribute, request));
+        attribute.setExpressionObject(new Expression("${object2}"));
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("${object3}"));
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("${paulaBean.paula}"));
+        assertEquals("The value is not correct", "Brillant", evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("String literal"));
+        assertEquals("The value is not correct", "String literal", evaluator
+                .evaluate(attribute, request));
+        attribute.setValue(new Integer(2));
+        assertEquals("The value is not correct", new Integer(2), evaluator
+                .evaluate(attribute, request));
+        attribute.setValue("${object1}");
+        assertEquals("The value has been evaluated", "${object1}", evaluator
+                .evaluate(attribute, request));
+    }
+
+    /**
+     * Tests
+     * {@link ELAttributeEvaluator#evaluate(String, Request)}.
+     */
+    public void testEvaluateString() {
+        String expression = "${requestScope.object1}";
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                expression, request));
+        expression = "${sessionScope.object2}";
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(expression, request));
+        expression = "${applicationScope.object3}";
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(expression, request));
+        expression = "${object1}";
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                expression, request));
+        expression = "${object2}";
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(expression, request));
+        expression = "${object3}";
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(expression, request));
+        expression = "${paulaBean.paula}";
+        assertEquals("The value is not correct", "Brillant", evaluator
+                .evaluate(expression, request));
+        expression = "String literal";
+        assertEquals("The value is not correct", expression, evaluator
+                .evaluate(expression, request));
+    }
+
+    /**
+     * This is The Brillant Paula Bean (sic) just like it was posted to:
+     * http://thedailywtf.com/Articles/The_Brillant_Paula_Bean.aspx
+     * I hope that there is no copyright on it.
+     */
+    public static class PaulaBean {
+
+        /**
+         * Paula is brillant, really.
+         */
+        private String paula = "Brillant";
+
+        /**
+         * Returns brillant.
+         *
+         * @return "Brillant".
+         */
+        public String getPaula() {
+            return paula;
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/ELContextImplTest.java b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/ELContextImplTest.java
new file mode 100644
index 0000000..520398b
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/ELContextImplTest.java
@@ -0,0 +1,121 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import javax.el.ELResolver;
+import javax.el.FunctionMapper;
+import javax.el.ValueExpression;
+import javax.el.VariableMapper;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link ELContextImpl}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ELContextImplTest {
+
+    /**
+     * The EL context to test.
+     */
+    private ELContextImpl context;
+
+    /**
+     * The EL resolver.
+     */
+    private ELResolver resolver;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        resolver = createMock(ELResolver.class);
+        context = new ELContextImpl(resolver);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.el.ELContextImpl#getELResolver()}.
+     */
+    @Test
+    public void testGetELResolver() {
+        replay(resolver);
+        assertEquals(resolver, context.getELResolver());
+        verify(resolver);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.el.ELContextImpl#setFunctionMapper(javax.el.FunctionMapper)}.
+     */
+    @Test
+    public void testSetFunctionMapper() {
+        FunctionMapper functionMapper = createMock(FunctionMapper.class);
+
+        replay(resolver, functionMapper);
+        context.setFunctionMapper(functionMapper);
+        assertEquals(functionMapper, context.getFunctionMapper());
+        verify(resolver, functionMapper);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.el.ELContextImpl#setVariableMapper(javax.el.VariableMapper)}.
+     */
+    @Test
+    public void testSetVariableMapper() {
+        VariableMapper variableMapper = createMock(VariableMapper.class);
+
+        replay(resolver, variableMapper);
+        context.setVariableMapper(variableMapper);
+        assertEquals(variableMapper, context.getVariableMapper());
+        verify(resolver, variableMapper);
+    }
+
+    /**
+     * Tests {@link ELContextImpl#getFunctionMapper()}.
+     */
+    @Test
+    public void testNullFunctionMapper() {
+        replay(resolver);
+        FunctionMapper functionMapper = context.getFunctionMapper();
+        assertNull(functionMapper.resolveFunction("whatever", "it_IT"));
+        verify(resolver);
+    }
+
+    /**
+     * Tests {@link ELContextImpl#getVariableMapper()}.
+     */
+    @Test
+    public void testVariableMapperImpl() {
+        ValueExpression expression = createMock(ValueExpression.class);
+
+        replay(resolver, expression);
+        VariableMapper variableMapper = context.getVariableMapper();
+        assertNull(variableMapper.resolveVariable("whatever"));
+        variableMapper.setVariable("var", expression);
+        assertEquals(expression, variableMapper.resolveVariable("var"));
+        verify(resolver, expression);
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/JspExpressionFactoryFactoryTest.java b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/JspExpressionFactoryFactoryTest.java
new file mode 100644
index 0000000..65acdd2
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/JspExpressionFactoryFactoryTest.java
@@ -0,0 +1,85 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import javax.el.ExpressionFactory;
+import javax.servlet.ServletContext;
+import javax.servlet.jsp.JspApplicationContext;
+import javax.servlet.jsp.JspFactory;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.junit.Test;
+
+/**
+ * Tests {@link JspExpressionFactoryFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class JspExpressionFactoryFactoryTest {
+
+    /**
+     * Test method for {@link org.apache.tiles.el.JspExpressionFactoryFactory#getExpressionFactory()}.
+     */
+    @Test
+    public void testGetExpressionFactory() {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ServletContext servletContext = createMock(ServletContext.class);
+        JspFactory jspFactory = createMock(JspFactory.class);
+        JspApplicationContext jspApplicationContext = createMock(JspApplicationContext.class);
+        ExpressionFactory expressionFactory = createMock(ExpressionFactory.class);
+
+        expect(applicationContext.getContext()).andReturn(servletContext);
+        expect(jspFactory.getJspApplicationContext(servletContext)).andReturn(jspApplicationContext);
+        expect(jspApplicationContext.getExpressionFactory()).andReturn(expressionFactory);
+
+        replay(applicationContext, servletContext, jspFactory,
+                jspApplicationContext, expressionFactory);
+        JspFactory.setDefaultFactory(jspFactory);
+        JspExpressionFactoryFactory factory = new JspExpressionFactoryFactory();
+        factory.setApplicationContext(applicationContext);
+        assertEquals(expressionFactory, factory.getExpressionFactory());
+        verify(applicationContext, servletContext, jspFactory,
+                jspApplicationContext, expressionFactory);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.el.JspExpressionFactoryFactory#getExpressionFactory()}.
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testSetApplicationContextIllegal() {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Integer servletContext = new Integer(1);
+
+        expect(applicationContext.getContext()).andReturn(servletContext);
+
+        replay(applicationContext);
+        try {
+            JspExpressionFactoryFactory factory = new JspExpressionFactoryFactory();
+            factory.setApplicationContext(applicationContext);
+        } finally {
+            verify(applicationContext);
+        }
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/ScopeELResolverTest.java b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/ScopeELResolverTest.java
new file mode 100644
index 0000000..4a3ca12
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/ScopeELResolverTest.java
@@ -0,0 +1,173 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.beans.FeatureDescriptor;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.el.ELContext;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * Tests {@link ScopeELResolver}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ScopeELResolverTest {
+
+    /**
+     * The resolver to test.
+     */
+    private ScopeELResolver resolver;
+
+    /** {@inheritDoc} */
+    @Before
+    public void setUp() {
+        resolver = new ScopeELResolver();
+    }
+
+    /**
+     * Tests {@link ScopeELResolver#getCommonPropertyType(ELContext, Object)}.
+     */
+    @Test
+    public void testGetCommonPropertyType() {
+        ELContext elContext = createMock(ELContext.class);
+
+        replay(elContext);
+        assertNull(resolver.getCommonPropertyType(elContext, new Integer(1)));
+        assertEquals(Map.class, resolver.getCommonPropertyType(elContext, null));
+        verify(elContext);
+    }
+
+    /**
+     * Tests {@link ScopeELResolver#getFeatureDescriptors(ELContext, Object)}.
+     */
+    @Test
+    public void testGetFeatureDescriptors() {
+        ELContext elContext = createMock(ELContext.class);
+        Request request = createMock(Request.class);
+
+        expect(elContext.getContext(Request.class)).andReturn(request);
+        expect(request.getAvailableScopes()).andReturn(Arrays.asList(new String[] {"one", "two"}));
+
+        replay(elContext, request);
+        assertFalse(resolver.getFeatureDescriptors(elContext, new Integer(1)).hasNext());
+        Iterator<FeatureDescriptor> descriptors = resolver.getFeatureDescriptors(elContext, null);
+        FeatureDescriptor descriptor = descriptors.next();
+        assertEquals("oneScope", descriptor.getName());
+        descriptor = descriptors.next();
+        assertEquals("twoScope", descriptor.getName());
+        assertFalse(descriptors.hasNext());
+        verify(elContext, request);
+    }
+
+    /**
+     * Test method for
+     * {@link ScopeELResolver#getType(javax.el.ELContext, java.lang.Object, java.lang.Object)}.
+     */
+    @Test
+    public void testGetType() {
+        Request request = createMock(Request.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ELContext context = new ELContextImpl(resolver);
+        replay(request, applicationContext);
+        context.putContext(Request.class, request);
+        context.putContext(ApplicationContext.class, applicationContext);
+        assertNull(resolver.getType(context, new Integer(1), "whatever"));
+        assertEquals("The requestScope object is not a map.", Map.class,
+                resolver.getType(context, null, "requestScope"));
+        assertEquals("The sessionScope object is not a map.", Map.class,
+                resolver.getType(context, null, "sessionScope"));
+        assertEquals("The applicationScope object is not a map.", Map.class,
+                resolver.getType(context, null, "applicationScope"));
+    }
+
+    /**
+     * Test method for
+     * {@link ScopeELResolver#getValue(javax.el.ELContext, java.lang.Object, java.lang.Object)}.
+     */
+    @Test
+    public void testGetValue() {
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put("objectKey", "objectValue");
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        sessionScope.put("sessionObjectKey", "sessionObjectValue");
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        applicationScope.put("applicationObjectKey", "applicationObjectValue");
+        Request request = createMock(Request.class);
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(request.getContext("session")).andReturn(sessionScope);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        expect(request.getContext("application")).andReturn(applicationScope);
+        ELContext context = new ELContextImpl(resolver);
+        replay(request, applicationContext);
+        context.putContext(Request.class, request);
+        context.putContext(ApplicationContext.class, applicationContext);
+        assertNull(resolver.getValue(context, new Integer(1), "whatever"));
+        assertEquals("The requestScope map does not correspond", requestScope,
+                resolver.getValue(context, null, "requestScope"));
+        assertEquals("The sessionScope map does not correspond", sessionScope,
+                resolver.getValue(context, null, "sessionScope"));
+        assertEquals("The applicationScope map does not correspond",
+                applicationScope, resolver.getValue(context, null,
+                        "applicationScope"));
+    }
+
+    /**
+     * Tests {@link ScopeELResolver#isReadOnly(ELContext, Object, Object)}.
+     */
+    @Test
+    public void testIsReadOnly() {
+        ELContext elContext = createMock(ELContext.class);
+
+        replay(elContext);
+        assertTrue(resolver.isReadOnly(elContext, null, "whatever"));
+        verify(elContext);
+    }
+
+    /**
+     * Tests {@link ScopeELResolver#isReadOnly(ELContext, Object, Object)}.
+     */
+    @Test(expected=NullPointerException.class)
+    public void testIsReadOnlyNPE() {
+        resolver.isReadOnly(null, null, "whatever");
+    }
+
+    /**
+     * Tests {@link ScopeELResolver#setValue(ELContext, Object, Object, Object)}.
+     */
+    @Test
+    public void testSetValue() {
+        // Just to complete code coverage!
+        resolver.setValue(null, null, null, null);
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/TilesContextBeanELResolverTest.java b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/TilesContextBeanELResolverTest.java
new file mode 100644
index 0000000..b282528
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/TilesContextBeanELResolverTest.java
@@ -0,0 +1,299 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.el.ELContext;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesContextBeanELResolver}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesContextBeanELResolverTest {
+
+    /**
+     * The resolver to test.
+     */
+    private TilesContextBeanELResolver resolver;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        resolver = new TilesContextBeanELResolver();
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextBeanELResolver#getCommonPropertyType(javax.el.ELContext, java.lang.Object)}.
+     */
+    @Test
+    public void testGetCommonPropertyType() {
+        Class<?> clazz = resolver.getCommonPropertyType(null, null);
+        assertEquals("The class is not correct", String.class, clazz);
+        clazz = resolver.getCommonPropertyType(null, "Base object");
+        assertNull("The class for non root objects must be null", clazz);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextBeanELResolver#getFeatureDescriptors(javax.el.ELContext, java.lang.Object)}.
+     */
+    @Test
+    public void testGetFeatureDescriptors() {
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put("object1", "value");
+        sessionScope.put("object2", new Integer(1));
+        applicationScope.put("object3", new Float(2.0));
+        Request request = createMock(Request.class);
+        expect(request.getContext("request")).andReturn(requestScope)
+                .anyTimes();
+        expect(request.getContext("session")).andReturn(sessionScope)
+                .anyTimes();
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        expect(request.getContext("application")).andReturn(
+                applicationScope).anyTimes();
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[] { "request", "session", "application" }))
+                .anyTimes();
+        replay(request, applicationContext);
+
+        ELContext context = new ELContextImpl(resolver);
+        context.putContext(Request.class, request);
+        context.putContext(ApplicationContext.class, applicationContext);
+
+        List<FeatureDescriptor> expected = new ArrayList<FeatureDescriptor>();
+        resolver.collectBeanInfo(requestScope, expected);
+        resolver.collectBeanInfo(sessionScope, expected);
+        resolver.collectBeanInfo(applicationScope, expected);
+        Iterator<FeatureDescriptor> featureIt = resolver.getFeatureDescriptors(
+                context, null);
+        Iterator<FeatureDescriptor> expectedIt = expected.iterator();
+        while (featureIt.hasNext() && expectedIt.hasNext()) {
+            FeatureDescriptor expectedDescriptor = expectedIt.next();
+            FeatureDescriptor descriptor = featureIt.next();
+            assertEquals("The feature is not the same", expectedDescriptor
+                    .getDisplayName(), descriptor.getDisplayName());
+            assertEquals("The feature is not the same", expectedDescriptor
+                    .getName(), descriptor.getName());
+            assertEquals("The feature is not the same", expectedDescriptor
+                    .getShortDescription(), descriptor.getShortDescription());
+            assertEquals("The feature is not the same", expectedDescriptor
+                    .getValue("type"), descriptor.getValue("type"));
+            assertEquals("The feature is not the same", expectedDescriptor
+                    .getValue("resolvableAtDesignTime"), descriptor
+                    .getValue("resolvableAtDesignTime"));
+            assertEquals("The feature is not the same", expectedDescriptor
+                    .isExpert(), descriptor.isExpert());
+            assertEquals("The feature is not the same", expectedDescriptor
+                    .isHidden(), descriptor.isHidden());
+            assertEquals("The feature is not the same", expectedDescriptor
+                    .isPreferred(), descriptor.isPreferred());
+        }
+        assertTrue("The feature descriptors are not of the same size",
+                !featureIt.hasNext() && !expectedIt.hasNext());
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextBeanELResolver#getType(javax.el.ELContext, java.lang.Object, java.lang.Object)}.
+     */
+    @Test
+    public void testGetType() {
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put("object1", "value");
+        sessionScope.put("object2", new Integer(1));
+        applicationScope.put("object3", new Float(2.0));
+        Request request = createMock(Request.class);
+        expect(request.getContext("request")).andReturn(requestScope)
+                .anyTimes();
+        expect(request.getContext("session")).andReturn(sessionScope)
+                .anyTimes();
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        expect(request.getContext("application")).andReturn(
+                applicationScope).anyTimes();
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[] { "request", "session", "application" }))
+                .anyTimes();
+        replay(request, applicationContext);
+
+        ELContext context = new ELContextImpl(resolver);
+        context.putContext(Request.class, request);
+        context.putContext(ApplicationContext.class, applicationContext);
+
+        assertEquals("The type is not correct", String.class, resolver.getType(
+                context, null, "object1"));
+        assertEquals("The type is not correct", Integer.class, resolver.getType(
+                context, null, "object2"));
+        assertEquals("The type is not correct", Float.class, resolver.getType(
+                context, null, "object3"));
+        assertNull(resolver.getType(context, new Integer(1), "whatever"));
+        assertNull(resolver.getType(context, null, "object4"));
+        verify(request, applicationContext);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextBeanELResolver#getValue(javax.el.ELContext, java.lang.Object, java.lang.Object)}.
+     */
+    @Test
+    public void testGetValue() {
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put("object1", "value");
+        sessionScope.put("object2", new Integer(1));
+        applicationScope.put("object3", new Float(2.0));
+        Request request = createMock(Request.class);
+        expect(request.getContext("request")).andReturn(requestScope)
+                .anyTimes();
+        expect(request.getContext("session")).andReturn(sessionScope)
+                .anyTimes();
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        expect(request.getContext("application")).andReturn(
+                applicationScope).anyTimes();
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[] { "request", "session", "application" }))
+                .anyTimes();
+        replay(request, applicationContext);
+
+        ELContext context = new ELContextImpl(resolver);
+        context.putContext(Request.class, request);
+        context.putContext(ApplicationContext.class, applicationContext);
+
+        assertEquals("The value is not correct", "value", resolver.getValue(
+                context, null, "object1"));
+        assertEquals("The value is not correct", new Integer(1), resolver
+                .getValue(context, null, "object2"));
+        assertEquals("The value is not correct", new Float(2.0), resolver
+                .getValue(context, null, "object3"));
+        assertNull(resolver.getValue(context, new Integer(1), "whatever"));
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextBeanELResolver#isReadOnly(javax.el.ELContext, java.lang.Object, java.lang.Object)}.
+     */
+    @Test
+    public void testIsReadOnlyELContextObjectObject() {
+        ELContext context = new ELContextImpl(resolver);
+        assertTrue("The value is not read only", resolver.isReadOnly(context,
+                null, null));
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextBeanELResolver#isReadOnly(javax.el.ELContext, java.lang.Object, java.lang.Object)}.
+     */
+    @Test(expected = NullPointerException.class)
+    public void testIsReadOnlyNPE() {
+        resolver.isReadOnly(null, null, null);
+    }
+
+    /**
+     * Tests {@link TilesContextBeanELResolver#setValue(ELContext, Object, Object, Object)}.
+     */
+    @Test
+    public void testSetValue() {
+        // Just to complete code coverage!
+        resolver.setValue(null, null, null, null);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextBeanELResolver#findObjectByProperty(javax.el.ELContext, java.lang.Object)}.
+     */
+    @Test
+    public void testFindObjectByProperty() {
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put("object1", "value");
+        sessionScope.put("object2", new Integer(1));
+        applicationScope.put("object3", new Float(2.0));
+        Request request = createMock(Request.class);
+        expect(request.getContext("request")).andReturn(requestScope)
+                .anyTimes();
+        expect(request.getContext("session")).andReturn(sessionScope)
+                .anyTimes();
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        expect(request.getContext("application")).andReturn(
+                applicationScope).anyTimes();
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[] { "request", "session", "application" }))
+                .anyTimes();
+        replay(request, applicationContext);
+
+        ELContext context = new ELContextImpl(resolver);
+        context.putContext(Request.class, request);
+        context.putContext(ApplicationContext.class, applicationContext);
+
+        assertEquals("The value is not correct", "value", resolver
+                .findObjectByProperty(context, "object1"));
+        assertEquals("The value is not correct", new Integer(1), resolver
+                .findObjectByProperty(context, "object2"));
+        assertEquals("The value is not correct", new Float(2.0), resolver
+                .findObjectByProperty(context, "object3"));
+    }
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.el.TilesContextBeanELResolver#getObject(java.util.Map, java.lang.String)}.
+     */
+    @Test
+    public void testGetObject() {
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("object1", "value");
+        assertEquals("The value is not correct", "value", resolver.getObject(
+                map, "object1"));
+        assertNull("The value is not null", resolver.getObject(map, "object2"));
+        assertNull("The value is not null", resolver.getObject(null, "object1"));
+    }
+
+    /**
+     * Tests {@link TilesContextBeanELResolver#collectBeanInfo(Map, List)}.
+     */
+    @Test
+    public void testCollectBeanInfoEmpty() {
+        resolver.collectBeanInfo(null, null);
+    }
+}
diff --git a/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/TilesContextELResolverTest.java b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/TilesContextELResolverTest.java
new file mode 100644
index 0000000..e781b97
--- /dev/null
+++ b/TILES_3_0_X/tiles-el/src/test/java/org/apache/tiles/el/TilesContextELResolverTest.java
@@ -0,0 +1,188 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.el;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.beans.FeatureDescriptor;
+import java.beans.PropertyDescriptor;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import javax.el.ELContext;
+import javax.el.ELResolver;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.reflect.ClassUtil;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesContextELResolver}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesContextELResolverTest {
+
+    /**
+     * The bean resolver.
+     */
+    private ELResolver beanElResolver;
+
+    /**
+     * The resolver to test.
+     */
+    private TilesContextELResolver resolver;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        beanElResolver = createMock(ELResolver.class);
+        resolver = new TilesContextELResolver(beanElResolver);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextELResolver#getCommonPropertyType(javax.el.ELContext, java.lang.Object)}.
+     */
+    @Test
+    public void testGetCommonPropertyTypeELContextObject() {
+        replay(beanElResolver);
+        Class<?> clazz = resolver.getCommonPropertyType(null, null);
+        assertEquals("The class is not correct", String.class, clazz);
+        clazz = resolver.getCommonPropertyType(null, "Base object");
+        assertNull("The class for non root objects must be null", clazz);
+        verify(beanElResolver);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextELResolver#getFeatureDescriptors(javax.el.ELContext, java.lang.Object)}.
+     */
+    @Test
+    public void testGetFeatureDescriptorsELContextObject() {
+        replay(beanElResolver);
+        assertNull(resolver.getFeatureDescriptors(null, new Integer(1)));
+        Map<String, PropertyDescriptor> expected = new LinkedHashMap<String, PropertyDescriptor>();
+        ClassUtil.collectBeanInfo(Request.class, expected);
+        ClassUtil.collectBeanInfo(ApplicationContext.class, expected);
+        Iterator<FeatureDescriptor> featureIt = resolver.getFeatureDescriptors(
+                null, null);
+        Iterator<? extends FeatureDescriptor> expectedIt = expected.values().iterator();
+        while (featureIt.hasNext() && expectedIt.hasNext()) {
+            assertEquals("The feature is not the same", expectedIt.next(),
+                    featureIt.next());
+        }
+        assertTrue("The feature descriptors are not of the same size",
+                !featureIt.hasNext() && !expectedIt.hasNext());
+        verify(beanElResolver);
+    }
+
+    /**
+     * Tests {@link TilesContextBeanELResolver#getType(ELContext, Object, Object)}.
+     */
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @Test
+    public void testGetType() {
+        ELContext elContext = createMock(ELContext.class);
+        Request request = createMock(Request.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        expect(elContext.getContext(Request.class)).andReturn(request);
+        expect(elContext.getContext(ApplicationContext.class)).andReturn(applicationContext);
+        expect(beanElResolver.getType(elContext, request, "responseCommitted")).andReturn((Class) Boolean.class);
+        expect(beanElResolver.getType(elContext, applicationContext, "initParams")).andReturn((Class) Map.class);
+        elContext.setPropertyResolved(true);
+        expectLastCall().times(2);
+
+        replay(beanElResolver, elContext, request, applicationContext);
+        assertNull(resolver.getType(elContext, new Integer(1), "whatever"));
+        assertEquals(Boolean.class, resolver.getType(elContext, null, "responseCommitted"));
+        assertEquals(Map.class, resolver.getType(elContext, null, "initParams"));
+        verify(beanElResolver, elContext, request, applicationContext);
+    }
+
+    /**
+     * Tests {@link TilesContextBeanELResolver#getValue(ELContext, Object, Object)}.
+     */
+    @Test
+    public void testGetValue() {
+        ELContext elContext = createMock(ELContext.class);
+        Request request = createMock(Request.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        @SuppressWarnings("rawtypes")
+        Map map = createMock(Map.class);
+
+        expect(elContext.getContext(Request.class)).andReturn(request);
+        expect(elContext.getContext(ApplicationContext.class)).andReturn(applicationContext);
+        expect(beanElResolver.getValue(elContext, request, "responseCommitted")).andReturn(true);
+        expect(beanElResolver.getValue(elContext, applicationContext, "initParams")).andReturn(map);
+        elContext.setPropertyResolved(true);
+        expectLastCall().times(2);
+
+        replay(beanElResolver, elContext, request, applicationContext, map);
+        assertNull(resolver.getValue(elContext, new Integer(1), "whatever"));
+        assertEquals(true, resolver.getValue(elContext, null, "responseCommitted"));
+        assertEquals(map, resolver.getValue(elContext, null, "initParams"));
+        verify(beanElResolver, elContext, request, applicationContext, map);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextELResolver#isReadOnly(javax.el.ELContext, java.lang.Object, java.lang.Object)}.
+     */
+    @Test
+    public void testIsReadOnly() {
+        replay(beanElResolver);
+        ELContext context = new ELContextImpl(resolver);
+        assertTrue("The value is not read only", resolver.isReadOnly(context,
+                null, null));
+        verify(beanElResolver);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextELResolver#isReadOnly(javax.el.ELContext, java.lang.Object, java.lang.Object)}.
+     */
+    @Test(expected = NullPointerException.class)
+    public void testIsReadOnlyNPE() {
+        replay(beanElResolver);
+        try {
+            resolver.isReadOnly(null, null, null);
+        } finally {
+            verify(beanElResolver);
+        }
+    }
+
+    /**
+     * Tests {@link TilesContextELResolver#setValue(ELContext, Object, Object, Object)}.
+     */
+    @Test
+    public void testSetValue() {
+        // Just to complete code coverage!
+        resolver.setValue(null, null, null, null);
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/pom.xml b/TILES_3_0_X/tiles-extras/pom.xml
new file mode 100644
index 0000000..c99e4d4
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/pom.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>tiles-extras</artifactId>
+  <packaging>jar</packaging>
+  <name>Tiles - Extras</name>
+  <description>Extras for Tiles, including non-standard, non-generic, non-identifiable components that may be useful for Tiles users.
+  </description>
+
+  <properties>
+  	<tiles.osgi.symbolicName>org.apache.tiles.extras</tiles.osgi.symbolicName>
+  </properties>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <excludes>
+          <exclude>LICENSE.txt</exclude>
+          <exclude>NOTICE.txt</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>LICENSE.txt</include>
+          <include>NOTICE.txt</include>
+        </includes>
+        <targetPath>META-INF</targetPath>
+      </resource>
+    </resources>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-request-servlet-wildcard</artifactId>
+      <version>${tiles.request.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-request-mustache</artifactId>
+      <version>${tiles.request.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-jsp</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-freemarker</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-velocity</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-el</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-mvel</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-ognl</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-compat</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymockclassextension</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.java b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.java
new file mode 100644
index 0000000..6831ce2
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.java
@@ -0,0 +1,296 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.complete;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Locale;
+import java.util.regex.Pattern;
+
+import javax.el.ArrayELResolver;
+import javax.el.BeanELResolver;
+import javax.el.CompositeELResolver;
+import javax.el.ELResolver;
+import javax.el.ListELResolver;
+import javax.el.MapELResolver;
+import javax.el.ResourceBundleELResolver;
+
+import ognl.OgnlException;
+import ognl.OgnlRuntime;
+import ognl.PropertyAccessor;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.compat.definition.digester.CompatibilityDigesterDefinitionsReader;
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.definition.DefinitionsReader;
+import org.apache.tiles.definition.pattern.DefinitionPatternMatcherFactory;
+import org.apache.tiles.definition.pattern.PatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.PrefixedPatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.regexp.RegexpDefinitionPatternMatcherFactory;
+import org.apache.tiles.definition.pattern.wildcard.WildcardDefinitionPatternMatcherFactory;
+import org.apache.tiles.el.ELAttributeEvaluator;
+import org.apache.tiles.el.JspExpressionFactoryFactory;
+import org.apache.tiles.el.ScopeELResolver;
+import org.apache.tiles.el.TilesContextBeanELResolver;
+import org.apache.tiles.el.TilesContextELResolver;
+import org.apache.tiles.evaluator.AttributeEvaluatorFactory;
+import org.apache.tiles.evaluator.BasicAttributeEvaluatorFactory;
+import org.apache.tiles.factory.BasicTilesContainerFactory;
+import org.apache.tiles.factory.TilesContainerFactoryException;
+import org.apache.tiles.freemarker.TilesSharedVariableFactory;
+import org.apache.tiles.impl.mgmt.CachingTilesContainer;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.mvel.MVELAttributeEvaluator;
+import org.apache.tiles.mvel.ScopeVariableResolverFactory;
+import org.apache.tiles.mvel.TilesContextBeanVariableResolverFactory;
+import org.apache.tiles.mvel.TilesContextVariableResolverFactory;
+import org.apache.tiles.ognl.AnyScopePropertyAccessor;
+import org.apache.tiles.ognl.DelegatePropertyAccessor;
+import org.apache.tiles.ognl.NestedObjectDelegatePropertyAccessor;
+import org.apache.tiles.ognl.OGNLAttributeEvaluator;
+import org.apache.tiles.ognl.PropertyAccessorDelegateFactory;
+import org.apache.tiles.ognl.ScopePropertyAccessor;
+import org.apache.tiles.ognl.TilesApplicationContextNestedObjectExtractor;
+import org.apache.tiles.ognl.TilesContextPropertyAccessorDelegateFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.freemarker.render.FreemarkerRenderer;
+import org.apache.tiles.request.freemarker.render.FreemarkerRendererBuilder;
+import org.apache.tiles.request.freemarker.servlet.SharedVariableLoaderFreemarkerServlet;
+import org.apache.tiles.request.mustache.MustacheRenderer;
+import org.apache.tiles.request.render.BasicRendererFactory;
+import org.apache.tiles.request.render.ChainedDelegateRenderer;
+import org.apache.tiles.request.render.Renderer;
+import org.apache.tiles.request.servlet.ServletUtil;
+import org.apache.tiles.request.velocity.render.VelocityRenderer;
+import org.apache.tiles.request.velocity.render.VelocityRendererBuilder;
+import org.mvel2.integration.VariableResolverFactory;
+
+/**
+ * Tiles container factory that:
+ * <ul>
+ * <li>create supporting objects for Velocity and FreeMarker;</li>
+ * <li>create renderers for Velocity, FreeMarker, and Mustache templates;</li>
+ * <li>allows using EL, MVEL and OGNL as attribute expressions;</li>
+ * <li>allows using Wildcards and Regular Expressions in definition names;</li>
+ * <li>loads Tiles 1.x definition files;</li>
+ * <li>loads all the definition files that have the "tiles*.xml" pattern under
+ * <code>/WEB-INF</code> directory (and subdirectories) and under
+ * <code>META-INF</code> directories (and subdirectories) in every jar.</li>
+ * </ul>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class CompleteAutoloadTilesContainerFactory extends BasicTilesContainerFactory {
+
+    /**
+     * The freemarker renderer name.
+     */
+    private static final String FREEMARKER_RENDERER_NAME = "freemarker";
+
+    /**
+     * The velocity renderer name.
+     */
+    private static final String VELOCITY_RENDERER_NAME = "velocity";
+
+    /**
+     * The mustache renderer name.
+     */
+    private static final String MUSTACHE_RENDERER_NAME = "mustache";
+
+    /** {@inheritDoc} */
+    @Override
+    public TilesContainer createDecoratedContainer(TilesContainer originalContainer,
+            ApplicationContext applicationContext) {
+        return new CachingTilesContainer(originalContainer);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void registerAttributeRenderers(
+            final BasicRendererFactory rendererFactory,
+            final ApplicationContext applicationContext,
+            final TilesContainer container,
+            final AttributeEvaluatorFactory attributeEvaluatorFactory) {
+        super.registerAttributeRenderers(rendererFactory, applicationContext, container, attributeEvaluatorFactory);
+
+        FreemarkerRenderer freemarkerRenderer = FreemarkerRendererBuilder
+                .createInstance()
+                .setApplicationContext(applicationContext)
+                .setParameter("TemplatePath", "/")
+                .setParameter("NoCache", "true")
+                .setParameter("ContentType", "text/html")
+                .setParameter("template_update_delay", "0")
+                .setParameter("default_encoding", "ISO-8859-1")
+                .setParameter("number_format", "0.##########")
+                .setParameter(SharedVariableLoaderFreemarkerServlet.CUSTOM_SHARED_VARIABLE_FACTORIES_INIT_PARAM,
+                        "tiles," + TilesSharedVariableFactory.class.getName()).build();
+        rendererFactory.registerRenderer(FREEMARKER_RENDERER_NAME, freemarkerRenderer);
+
+        VelocityRenderer velocityRenderer = VelocityRendererBuilder.createInstance()
+                .setApplicationContext(applicationContext).build();
+        rendererFactory.registerRenderer(VELOCITY_RENDERER_NAME, velocityRenderer);
+
+        MustacheRenderer mustacheRenderer = new MustacheRenderer();
+        mustacheRenderer.setAcceptPattern(Pattern.compile(".+\\.mustache"));
+        rendererFactory.registerRenderer(MUSTACHE_RENDERER_NAME, mustacheRenderer);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected Renderer createDefaultAttributeRenderer(BasicRendererFactory rendererFactory,
+            ApplicationContext applicationContext, TilesContainer container,
+            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+
+        ChainedDelegateRenderer retValue = new ChainedDelegateRenderer();
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(DEFINITION_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(VELOCITY_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(FREEMARKER_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(MUSTACHE_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(TEMPLATE_RENDERER_NAME));
+        retValue.addAttributeRenderer(rendererFactory.getRenderer(STRING_RENDERER_NAME));
+        return retValue;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected AttributeEvaluatorFactory createAttributeEvaluatorFactory(ApplicationContext applicationContext,
+            LocaleResolver resolver) {
+        BasicAttributeEvaluatorFactory attributeEvaluatorFactory = new BasicAttributeEvaluatorFactory(
+                createELEvaluator(applicationContext));
+        attributeEvaluatorFactory.registerAttributeEvaluator("MVEL", createMVELEvaluator());
+        attributeEvaluatorFactory.registerAttributeEvaluator("OGNL", createOGNLEvaluator());
+
+        return attributeEvaluatorFactory;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected <T> PatternDefinitionResolver<T> createPatternDefinitionResolver(Class<T> customizationKeyClass) {
+        DefinitionPatternMatcherFactory wildcardFactory = new WildcardDefinitionPatternMatcherFactory();
+        DefinitionPatternMatcherFactory regexpFactory = new RegexpDefinitionPatternMatcherFactory();
+        PrefixedPatternDefinitionResolver<T> resolver = new PrefixedPatternDefinitionResolver<T>();
+        resolver.registerDefinitionPatternMatcherFactory("WILDCARD", wildcardFactory);
+        resolver.registerDefinitionPatternMatcherFactory("REGEXP", regexpFactory);
+        return resolver;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected List<ApplicationResource> getSources(ApplicationContext applicationContext) {
+        Collection<ApplicationResource> webINFSet = applicationContext.getResources("/WEB-INF/**/tiles*.xml");
+        Collection<ApplicationResource> metaINFSet = applicationContext
+                .getResources("classpath*:META-INF/**/tiles*.xml");
+
+        List<ApplicationResource> filteredResources = new ArrayList<ApplicationResource>();
+        if (webINFSet != null) {
+            for (ApplicationResource resource : webINFSet) {
+                if (Locale.ROOT.equals(resource.getLocale())) {
+                    filteredResources.add(resource);
+                }
+            }
+        }
+        if (metaINFSet != null) {
+            for (ApplicationResource resource : metaINFSet) {
+                if (Locale.ROOT.equals(resource.getLocale())) {
+                    filteredResources.add(resource);
+                }
+            }
+        }
+        return filteredResources;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected DefinitionsReader createDefinitionsReader(ApplicationContext applicationContext) {
+        return new CompatibilityDigesterDefinitionsReader();
+    }
+
+    /**
+     * Creates the EL evaluator.
+     *
+     * @param applicationContext The Tiles application context.
+     * @return The EL evaluator.
+     */
+    private ELAttributeEvaluator createELEvaluator(ApplicationContext applicationContext) {
+        ELAttributeEvaluator evaluator = new ELAttributeEvaluator();
+        JspExpressionFactoryFactory efFactory = new JspExpressionFactoryFactory();
+        efFactory.setApplicationContext(applicationContext);
+        evaluator.setExpressionFactory(efFactory.getExpressionFactory());
+        ELResolver elResolver = new CompositeELResolver() {
+            {
+                BeanELResolver beanElResolver = new BeanELResolver(false);
+                add(new ScopeELResolver());
+                add(new TilesContextELResolver(beanElResolver));
+                add(new TilesContextBeanELResolver());
+                add(new ArrayELResolver(false));
+                add(new ListELResolver(false));
+                add(new MapELResolver(false));
+                add(new ResourceBundleELResolver());
+                add(beanElResolver);
+            }
+        };
+        evaluator.setResolver(elResolver);
+        return evaluator;
+    }
+
+    /**
+     * Creates the MVEL evaluator.
+     *
+     * @return The MVEL evaluator.
+     */
+    private MVELAttributeEvaluator createMVELEvaluator() {
+        TilesRequestContextHolder requestHolder = new TilesRequestContextHolder();
+        VariableResolverFactory variableResolverFactory = new ScopeVariableResolverFactory(requestHolder);
+        variableResolverFactory.setNextFactory(new TilesContextVariableResolverFactory(requestHolder));
+        variableResolverFactory.setNextFactory(new TilesContextBeanVariableResolverFactory(requestHolder));
+        MVELAttributeEvaluator mvelEvaluator = new MVELAttributeEvaluator(requestHolder, variableResolverFactory);
+        return mvelEvaluator;
+    }
+
+    /**
+     * Creates the OGNL evaluator.
+     *
+     * @return The OGNL evaluator.
+     */
+    private OGNLAttributeEvaluator createOGNLEvaluator() {
+        try {
+            PropertyAccessor objectPropertyAccessor = OgnlRuntime.getPropertyAccessor(Object.class);
+            PropertyAccessor applicationContextPropertyAccessor = new NestedObjectDelegatePropertyAccessor<Request>(
+                    new TilesApplicationContextNestedObjectExtractor(), objectPropertyAccessor);
+            PropertyAccessor anyScopePropertyAccessor = new AnyScopePropertyAccessor();
+            PropertyAccessor scopePropertyAccessor = new ScopePropertyAccessor();
+            PropertyAccessorDelegateFactory<Request> factory = new TilesContextPropertyAccessorDelegateFactory(
+                    objectPropertyAccessor, applicationContextPropertyAccessor, anyScopePropertyAccessor,
+                    scopePropertyAccessor);
+            PropertyAccessor tilesRequestAccessor = new DelegatePropertyAccessor<Request>(factory);
+            OgnlRuntime.setPropertyAccessor(Request.class, tilesRequestAccessor);
+            return new OGNLAttributeEvaluator();
+        } catch (OgnlException e) {
+            throw new TilesContainerFactoryException("Cannot initialize OGNL evaluator", e);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesInitializer.java b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesInitializer.java
new file mode 100644
index 0000000..8cb4328
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesInitializer.java
@@ -0,0 +1,56 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.complete;
+
+import javax.servlet.ServletContext;
+
+import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.servlet.wildcard.WildcardServletApplicationContext;
+import org.apache.tiles.startup.AbstractTilesInitializer;
+
+/**
+ * This initializer uses {@link WildcardServletApplicationContext} to
+ * retrieve resources using Ant-style patterns and creates a
+ * {@link CompleteAutoloadTilesContainerFactory} to load all new features of
+ * Tiles at once.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class CompleteAutoloadTilesInitializer extends AbstractTilesInitializer {
+
+    /** {@inheritDoc} */
+    @Override
+    protected ApplicationContext createTilesApplicationContext(
+            ApplicationContext preliminaryContext) {
+        return new WildcardServletApplicationContext(
+                (ServletContext) preliminaryContext.getContext());
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected AbstractTilesContainerFactory createContainerFactory(
+            ApplicationContext context) {
+        return new CompleteAutoloadTilesContainerFactory();
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesListener.java b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesListener.java
new file mode 100644
index 0000000..8d500ef
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesListener.java
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.complete;
+
+import org.apache.tiles.startup.TilesInitializer;
+import org.apache.tiles.web.startup.AbstractTilesListener;
+
+/**
+ * Tiles listener that executes {@link CompleteAutoloadTilesInitializer}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class CompleteAutoloadTilesListener extends AbstractTilesListener {
+
+    /** {@inheritDoc} */
+    @Override
+    protected TilesInitializer createTilesInitializer() {
+        return new CompleteAutoloadTilesInitializer();
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/package-info.java b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/package-info.java
new file mode 100644
index 0000000..ee7db14
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/complete/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * These classes allow to start up Tiles with all features on.
+ */
+package org.apache.tiles.extras.complete;
diff --git a/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesInitializer.java b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesInitializer.java
new file mode 100644
index 0000000..adf4f18
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesInitializer.java
@@ -0,0 +1,111 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.module;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import javax.servlet.ServletContext;
+
+import org.apache.tiles.definition.DefinitionsFactoryException;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.reflect.ClassUtil;
+import org.apache.tiles.request.servlet.wildcard.WildcardServletApplicationContext;
+import org.apache.tiles.startup.TilesInitializer;
+
+/**
+ * Loads Tiles modules, initializes them and destroy them at the end.<br>
+ * It loads all META-INF/MANIFEST.MF files, checks for the "Tiles-Initializer"
+ * property that must contain a valid class name of a {@link TilesInitializer}.
+ * After that, initializes all found initializers, one by one. When the
+ * {@link #destroy()} method is called, all the initializers are then destroyed.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public class ModularTilesInitializer implements TilesInitializer {
+
+    /**
+     * The initializers to use.
+     */
+    private List<TilesInitializer> initializers;
+
+    /** {@inheritDoc} */
+    public void initialize(ApplicationContext preliminaryContext) {
+        ApplicationContext applicationContext = new WildcardServletApplicationContext(
+                (ServletContext) preliminaryContext.getContext());
+        loadInitializers(applicationContext);
+
+        for (TilesInitializer initializer : initializers) {
+            initializer.initialize(preliminaryContext);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void destroy() {
+        for (TilesInitializer initializer : initializers) {
+            initializer.destroy();
+        }
+    }
+
+    /**
+     * Load all the initializers from manifest files.
+     *
+     * @param applicationContext The application context.
+     */
+    private void loadInitializers(ApplicationContext applicationContext) {
+        initializers = new ArrayList<TilesInitializer>();
+        try {
+            Collection<ApplicationResource> resources = applicationContext
+                    .getResources("classpath*:META-INF/MANIFEST.MF");
+            ApplicationResource mainResource = applicationContext.getResource("/META-INF/MANIFEST.MF");
+            if (mainResource != null) {
+                resources.add(mainResource);
+            }
+            for (ApplicationResource resource : resources) {
+                InputStream stream = resource.getInputStream();
+                try {
+                    Manifest manifest = new Manifest(stream);
+                    Attributes attributes = manifest.getMainAttributes();
+                    if (attributes != null) {
+                        String initializerName = attributes.getValue("Tiles-Initializer");
+                        if (initializerName != null) {
+                            TilesInitializer initializer = (TilesInitializer) ClassUtil
+                                    .instantiate(initializerName);
+                            initializers.add(initializer);
+                        }
+                    }
+                } finally {
+                    stream.close();
+                }
+            }
+        } catch (IOException e) {
+            throw new DefinitionsFactoryException("Error getting manifest files", e);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java
new file mode 100644
index 0000000..9881e9c
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.module;
+
+import org.apache.tiles.startup.TilesInitializer;
+import org.apache.tiles.web.startup.AbstractTilesListener;
+
+/**
+ * Tiles listener that executes {@link ModularTilesInitializer}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public class ModularTilesListener extends AbstractTilesListener {
+
+    /** {@inheritDoc} */
+    @Override
+    protected TilesInitializer createTilesInitializer() {
+        return new ModularTilesInitializer();
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/module/package-info.java b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/module/package-info.java
new file mode 100644
index 0000000..fc44b2b
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/module/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * These classes allow to initialize independent module of Tiles.
+ */
+package org.apache.tiles.extras.module;
diff --git a/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/renderer/OptionsRenderer.java b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/renderer/OptionsRenderer.java
new file mode 100644
index 0000000..77aac7a
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/renderer/OptionsRenderer.java
@@ -0,0 +1,188 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.extras.renderer;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.render.Renderer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Provides a custom "options" syntax for attributes.
+ * The first option that can be rendered is.
+ * Comes from <a href="http://tech.finn.no/the-ultimate-view/">The Ultimate View</a> article.<p/>
+ *
+ * Actual rendering is delegated to the TypeDetectingRenderer that's supplied in the constructor.<p/>
+ *
+ * For example:
+ * "/WEB-INF/tiles/fragments/${options[myoptions]}/content.jsp"
+ * given the myptions list-attribute is defined like:
+ * <pre>
+        &lt;put-list-attribute name="myoptions">
+            &lt;add-list-attribute>
+                &lt;add-attribute value="car"/>
+                &lt;add-attribute value="vechile"/>
+                &lt;add-attribute value="advert"/>
+            &lt;/add-list-attribute>
+        &lt;/put-list-attribute>
+   </pre>
+ * will look for content.jsp <br/>
+ * first in "/WEB-INF/tiles/fragments/car/" then <br/>
+ * second in "/WEB-INF/tiles/fragments/vechile/" and <br/>
+ * last in "/WEB-INF/tiles/fragments/advert".
+ * <p/>
+ * <p/>
+ * Currently only supports one occurrance of such an "option" pattern in the attribute's value.
+ *
+ * Limitation: "looking" for templates is implemented using applicationContext.getResource(..)
+ * therefore the option values in the options list need to be visible as applicationResources.
+ *
+ */
+public final class OptionsRenderer implements Renderer {
+
+    private static final Pattern OPTIONS_PATTERN
+            = Pattern.compile(Pattern.quote("{options[") + "(.+)" + Pattern.quote("]}"));
+
+    private static final Logger LOG = LoggerFactory.getLogger(OptionsRenderer.class);
+
+    private final ApplicationContext applicationContext;
+    private final Renderer renderer;
+
+    public OptionsRenderer(final ApplicationContext applicationContext, final Renderer renderer) {
+        this.applicationContext = applicationContext;
+        this.renderer = renderer;
+    }
+
+    @Override
+    public boolean isRenderable(final String path, final Request request) {
+        return renderer.isRenderable(path, request);
+    }
+
+    @Override
+    public void render(final String path, final Request request) throws IOException {
+
+        Matcher matcher =  OPTIONS_PATTERN.matcher((String) path);
+
+        if (null != matcher && matcher.find()) {
+            boolean done = false;
+            String match = matcher.group(1);
+            ListAttribute fallbacks = (ListAttribute) TilesAccess
+                    .getCurrentContainer(request)
+                    .getAttributeContext(request)
+                    .getAttribute(match);
+
+            if (null == fallbacks) {
+                throw new IllegalStateException("A matching list-attribute name=\"" + match + "\" must be defined.");
+            } else if (fallbacks.getValue().isEmpty()) {
+                throw new IllegalStateException(
+                        "list-attribute name=\"" + match + "\" must have minimum one attribute");
+            }
+
+            for (Attribute option : (List<Attribute>) fallbacks.getValue()) {
+                String template = path.replaceFirst(Pattern.quote(matcher.group()), (String) option.getValue());
+                done = renderAttempt(template, request);
+                if (done) { break; }
+            }
+            if (!done) {
+              throw new IOException("None of the options existed for " + path);
+            }
+        } else {
+            renderer.render(path, request);
+        }
+    }
+
+    private boolean renderAttempt(final String template, final Request request) throws IOException {
+        boolean result = false;
+        if (!Cache.isTemplateMissing(template)) {
+            try {
+                if (null != applicationContext.getResource(template)) { // can throw FileNotFoundException !
+                    renderer.render(template, request); // can throw FileNotFoundException !
+                    result = true;
+                    Cache.setIfAbsentTemplateFound(template, true);
+                }
+            } catch (FileNotFoundException ex) {
+                if (ex.getMessage().contains(template)) {
+                    // expected outcome. continue loop.
+                    LOG.trace(ex.getMessage());
+                } else {
+                    // comes from an inner templateAttribute.render(..) so throw on
+                    throw ex;
+                }
+            } catch (IOException ex) { //xxx ???
+                throw ex;
+            }
+            Cache.setIfAbsentTemplateFound(template, false);
+        }
+        return result;
+    }
+
+    private static final class Cache {
+
+        /** It takes CACHE_LIFE milliseconds for any hot deployments to register.
+         */
+        private static final ConcurrentMap<String,Boolean> TEMPLATE_EXISTS
+                = new ConcurrentHashMap<String,Boolean>();
+
+        private static volatile long cacheLastCleaned = System.currentTimeMillis();
+
+        private static final String CACHE_LIFE_PROPERTY = Cache.class.getName() + ".ttl_ms";
+
+        /** Cache TTL be customised by a system property like
+         *  -Dorg.apache.tiles.extras.renderer.OptionsRenderer.Cache.ttl_ms=0
+         *
+         * The default is 5 minutes.
+         * Setting it to zero disables all caching.
+         */
+        private static final long CACHE_LIFE = null != Long.getLong(CACHE_LIFE_PROPERTY)
+                ? Long.getLong(CACHE_LIFE_PROPERTY)
+                : 1000 * 60 * 5;
+
+        static boolean isTemplateMissing(final String template) {
+            if (0 < CACHE_LIFE && System.currentTimeMillis() > cacheLastCleaned + CACHE_LIFE) {
+                cacheLastCleaned = System.currentTimeMillis();
+                TEMPLATE_EXISTS.clear();
+                return false;
+            } else {
+                return TEMPLATE_EXISTS.containsKey(template) && !TEMPLATE_EXISTS.get(template);
+            }
+        }
+
+        static void setIfAbsentTemplateFound(final String template, final boolean found) {
+            if (0 < CACHE_LIFE && !TEMPLATE_EXISTS.containsKey(template)) {
+                TEMPLATE_EXISTS.putIfAbsent(template, found);
+            }
+        }
+
+        private Cache() {}
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/renderer/package-info.java b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/renderer/package-info.java
new file mode 100644
index 0000000..f41d8f6
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/java/org/apache/tiles/extras/renderer/package-info.java
@@ -0,0 +1,27 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Provides a custom "options" syntax for attributes.
+ * The first option from a list that can be rendered is.
+ *
+ * Comes from <a href="http://tech.finn.no/the-ultimate-view/">The Ultimate View</a> article.
+ */
+package org.apache.tiles.extras.renderer;
diff --git a/TILES_3_0_X/tiles-extras/src/main/resources/LICENSE.txt b/TILES_3_0_X/tiles-extras/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/tiles-extras/src/main/resources/NOTICE.txt b/TILES_3_0_X/tiles-extras/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..1f13ff8
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/main/resources/NOTICE.txt
@@ -0,0 +1,6 @@
+   Apache Tiles
+   Copyright 1999-2009 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/TILES_3_0_X/tiles-extras/src/site/site.xml b/TILES_3_0_X/tiles-extras/src/site/site.xml
new file mode 100644
index 0000000..6b8e578
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Extras">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java
new file mode 100644
index 0000000..b03a517
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java
@@ -0,0 +1,333 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.complete;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.el.ExpressionFactory;
+import javax.servlet.ServletContext;
+import javax.servlet.jsp.JspApplicationContext;
+import javax.servlet.jsp.JspFactory;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.compat.definition.digester.CompatibilityDigesterDefinitionsReader;
+import org.apache.tiles.definition.pattern.PatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.PrefixedPatternDefinitionResolver;
+import org.apache.tiles.evaluator.AttributeEvaluatorFactory;
+import org.apache.tiles.evaluator.BasicAttributeEvaluatorFactory;
+import org.apache.tiles.impl.mgmt.CachingTilesContainer;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.renderer.DefinitionRenderer;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.freemarker.render.FreemarkerRenderer;
+import org.apache.tiles.request.mustache.MustacheRenderer;
+import org.apache.tiles.request.render.BasicRendererFactory;
+import org.apache.tiles.request.render.ChainedDelegateRenderer;
+import org.apache.tiles.request.render.DispatchRenderer;
+import org.apache.tiles.request.render.Renderer;
+import org.apache.tiles.request.render.StringRenderer;
+import org.apache.tiles.request.servlet.ServletApplicationContext;
+import org.apache.tiles.request.velocity.render.VelocityRenderer;
+import org.apache.velocity.tools.view.VelocityView;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link CompleteAutoloadTilesContainerFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CompleteAutoloadTilesContainerFactoryTest {
+
+    /**
+     * The object to test.
+     */
+    private CompleteAutoloadTilesContainerFactory factory;
+
+    /**
+     * Initializes the object.
+     */
+    @Before
+    public void setUp() {
+        factory = new CompleteAutoloadTilesContainerFactory();
+    }
+
+    /**
+     * Test method for
+     * {@link CompleteAutoloadTilesContainerFactory#createDecoratedContainer(TilesContainer, ApplicationContext)
+     * .
+     */
+    @Test
+    public void testCreateDecoratedContainer() {
+        ApplicationContext applicationContext = createMock(ServletApplicationContext.class);
+        TilesContainer wrapped = createMock(TilesContainer.class);
+
+        replay(applicationContext, wrapped);
+        assertSame(wrapped,
+                ((CachingTilesContainer) factory.createDecoratedContainer(wrapped, applicationContext))
+                        .getWrappedContainer());
+        verify(applicationContext, wrapped);
+    }
+
+    /**
+     * Test method for
+     * {@link CompleteAutoloadTilesContainerFactory
+     * #registerAttributeRenderers(BasicRendererFactory, ApplicationContext,
+     * TilesContainer, evaluator.AttributeEvaluatorFactory)}
+     * .
+     */
+    @SuppressWarnings("deprecation")
+    @Test
+    public void testRegisterAttributeRenderers() {
+        BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
+        ServletApplicationContext applicationContext = createMock(ServletApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
+        ServletContext servletContext = createMock(ServletContext.class);
+
+        rendererFactory.registerRenderer(eq("string"), isA(StringRenderer.class));
+        rendererFactory.registerRenderer(eq("template"), isA(DispatchRenderer.class));
+        rendererFactory.registerRenderer(eq("definition"), isA(DefinitionRenderer.class));
+        rendererFactory.registerRenderer(eq("freemarker"), isA(FreemarkerRenderer.class));
+        rendererFactory.registerRenderer(eq("velocity"), isA(VelocityRenderer.class));
+        rendererFactory.registerRenderer(eq("mustache"), isA(MustacheRenderer.class));
+
+        expect(applicationContext.getContext()).andReturn(servletContext).anyTimes();
+        expect(servletContext.getInitParameter(VelocityView.PROPERTIES_KEY)).andReturn(null);
+        expect(servletContext.getInitParameter(VelocityView.TOOLS_KEY)).andReturn(null);
+        expect(servletContext.getAttribute(VelocityView.TOOLS_KEY)).andReturn(null);
+        expect(servletContext.getResourceAsStream("/WEB-INF/velocity.properties")).andReturn(
+                getClass().getResourceAsStream("/velocity.properties"));
+        expect(servletContext.getResourceAsStream("/WEB-INF/VM_global_library.vm")).andReturn(
+                getClass().getResourceAsStream("/VM_global_library.vm"));
+        expect(servletContext.getResourceAsStream("/WEB-INF/tools.xml")).andReturn(
+                getClass().getResourceAsStream("/tools.xml"));
+        expect(servletContext.getResourceAsStream(VelocityView.DEPRECATED_USER_TOOLS_PATH)).andReturn(null);
+        servletContext.log((String) anyObject());
+        expectLastCall().anyTimes();
+        expect(servletContext.getRealPath("/")).andReturn(null);
+
+        replay(rendererFactory, applicationContext, container, attributeEvaluatorFactory, servletContext);
+        factory.registerAttributeRenderers(rendererFactory, applicationContext, container, attributeEvaluatorFactory);
+        verify(rendererFactory, applicationContext, container, attributeEvaluatorFactory, servletContext);
+    }
+
+    /**
+     * Tests
+     * {@link CompleteAutoloadTilesContainerFactory#createDefaultAttributeRenderer(BasicRendererFactory,
+     * ApplicationContext, TilesContainer, AttributeEvaluatorFactory)}.
+     */
+    @Test
+    public void testCreateDefaultAttributeRenderer() {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
+        BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
+        Renderer stringRenderer = createMock(Renderer.class);
+        Renderer templateRenderer = createMock(Renderer.class);
+        Renderer definitionRenderer = createMock(Renderer.class);
+        Renderer velocityRenderer = createMock(Renderer.class);
+        Renderer freemarkerRenderer = createMock(Renderer.class);
+        Renderer mustacheRenderer = createMock(Renderer.class);
+
+        expect(rendererFactory.getRenderer("string")).andReturn(stringRenderer);
+        expect(rendererFactory.getRenderer("template")).andReturn(templateRenderer);
+        expect(rendererFactory.getRenderer("definition")).andReturn(definitionRenderer);
+        expect(rendererFactory.getRenderer("velocity")).andReturn(velocityRenderer);
+        expect(rendererFactory.getRenderer("freemarker")).andReturn(freemarkerRenderer);
+        expect(rendererFactory.getRenderer("mustache")).andReturn(mustacheRenderer);
+
+        replay(container, attributeEvaluatorFactory, rendererFactory, applicationContext);
+        Renderer renderer = factory.createDefaultAttributeRenderer(rendererFactory, applicationContext, container,
+                attributeEvaluatorFactory);
+        assertTrue("The default renderer class is not correct", renderer instanceof ChainedDelegateRenderer);
+        verify(container, attributeEvaluatorFactory, rendererFactory, applicationContext);
+    }
+
+    /**
+     * Test method for
+     * {@link CompleteAutoloadTilesContainerFactory
+     * #createAttributeEvaluatorFactory(ApplicationContext, locale.LocaleResolver)}
+     * .
+     */
+    @Test
+    public void testCreateAttributeEvaluatorFactory() {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        LocaleResolver resolver = createMock(LocaleResolver.class);
+        ServletContext servletContext = createMock(ServletContext.class);
+        JspFactory jspFactory = createMock(JspFactory.class);
+        JspApplicationContext jspApplicationContext = createMock(JspApplicationContext.class);
+        ExpressionFactory expressionFactory = createMock(ExpressionFactory.class);
+
+        expect(applicationContext.getContext()).andReturn(servletContext);
+        expect(jspFactory.getJspApplicationContext(servletContext)).andReturn(jspApplicationContext);
+        expect(jspApplicationContext.getExpressionFactory()).andReturn(expressionFactory);
+
+        replay(applicationContext, resolver, servletContext, jspFactory, jspApplicationContext, expressionFactory);
+        JspFactory.setDefaultFactory(jspFactory);
+        AttributeEvaluatorFactory attributeEvaluatorFactory = factory.createAttributeEvaluatorFactory(
+                applicationContext, resolver);
+        assertTrue(attributeEvaluatorFactory instanceof BasicAttributeEvaluatorFactory);
+        assertNotNull(attributeEvaluatorFactory.getAttributeEvaluator("EL"));
+        assertNotNull(attributeEvaluatorFactory.getAttributeEvaluator("MVEL"));
+        assertNotNull(attributeEvaluatorFactory.getAttributeEvaluator("OGNL"));
+        verify(applicationContext, resolver, servletContext, jspFactory, jspApplicationContext, expressionFactory);
+    }
+
+    /**
+     * Test method for
+     * {@link CompleteAutoloadTilesContainerFactory#createPatternDefinitionResolver(Class)}
+     * .
+     */
+    @Test
+    public void testCreatePatternDefinitionResolver() {
+        PatternDefinitionResolver<Integer> resolver = factory.createPatternDefinitionResolver(Integer.class);
+        assertTrue(resolver instanceof PrefixedPatternDefinitionResolver);
+        Definition definitionWildcard = new Definition("WILDCARD:blah*", (Attribute) null, null);
+        Definition definitionRegexp = new Definition("REGEXP:what(.*)", (Attribute) null, null);
+        Map<String, Definition> definitionMap = new HashMap<String, Definition>();
+        definitionMap.put("WILDCARD:blah*", definitionWildcard);
+        definitionMap.put("REGEXP:what(.*)", definitionRegexp);
+        resolver.storeDefinitionPatterns(definitionMap, 1);
+        Definition result = resolver.resolveDefinition("blahX", 1);
+        assertEquals("blahX", result.getName());
+        result = resolver.resolveDefinition("whatX", 1);
+        assertEquals("whatX", result.getName());
+    }
+
+    /**
+     * Test method for
+     * {@link CompleteAutoloadTilesContainerFactory#getSources(ApplicationContext)}
+     * .
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testGetSources() throws IOException {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        ApplicationResource resource1 = createMock(ApplicationResource.class);
+        expect(resource1.getLocale()).andReturn(Locale.ROOT);
+        ApplicationResource resource2 = createMock(ApplicationResource.class);
+        expect(resource2.getLocale()).andReturn(Locale.ITALY);
+        ApplicationResource resource3 = createMock(ApplicationResource.class);
+        expect(resource3.getLocale()).andReturn(Locale.ROOT);
+
+        Collection<ApplicationResource> resourceSet1 = new HashSet<ApplicationResource>();
+        resourceSet1.add(resource1);
+        resourceSet1.add(resource2);
+
+        Collection<ApplicationResource> resourceSet2 = new HashSet<ApplicationResource>();
+        resourceSet2.add(resource3);
+
+        expect(applicationContext.getResources("/WEB-INF/**/tiles*.xml")).andReturn(resourceSet1);
+        expect(applicationContext.getResources("classpath*:META-INF/**/tiles*.xml")).andReturn(resourceSet2);
+
+        replay(applicationContext, resource1, resource2, resource3);
+        List<ApplicationResource> urls = factory.getSources(applicationContext);
+        assertEquals(2, urls.size());
+        assertTrue(urls.contains(resource1));
+        assertTrue(urls.contains(resource3));
+        verify(applicationContext, resource1, resource2, resource3);
+    }
+
+    /**
+     * Regression test for TILES-484 issue.
+     *
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testTILES484first() throws IOException {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        ApplicationResource resource = createMock(ApplicationResource.class);
+        expect(resource.getLocale()).andReturn(Locale.ROOT);
+
+        Collection<ApplicationResource> resourceSet = new HashSet<ApplicationResource>();
+        resourceSet.add(resource);
+
+        expect(applicationContext.getResources("/WEB-INF/**/tiles*.xml")).andReturn(null);
+        expect(applicationContext.getResources("classpath*:META-INF/**/tiles*.xml")).andReturn(resourceSet);
+
+        replay(applicationContext, resource);
+        List<ApplicationResource> resources = factory.getSources(applicationContext);
+        assertEquals(1, resources.size());
+        assertTrue(resources.contains(resource));
+        verify(applicationContext, resource);
+    }
+
+    /**
+     * Regression test for TILES-484 issue.
+     *
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testTILES484second() throws IOException {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        ApplicationResource resource1 = createMock(ApplicationResource.class);
+        expect(resource1.getLocale()).andReturn(Locale.ROOT);
+        ApplicationResource resource2 = createMock(ApplicationResource.class);
+        expect(resource2.getLocale()).andReturn(Locale.ITALY);
+
+        Collection<ApplicationResource> resourceSet = new HashSet<ApplicationResource>();
+        resourceSet.add(resource1);
+        resourceSet.add(resource2);
+
+        expect(applicationContext.getResources("/WEB-INF/**/tiles*.xml")).andReturn(resourceSet);
+        expect(applicationContext.getResources("classpath*:META-INF/**/tiles*.xml")).andReturn(null);
+
+        replay(applicationContext, resource1, resource2);
+        List<ApplicationResource> resources = factory.getSources(applicationContext);
+        assertEquals(1, resources.size());
+        assertTrue(resources.contains(resource1));
+        verify(applicationContext, resource1, resource2);
+    }
+
+    /**
+     * Test method for
+     * {@link CompleteAutoloadTilesContainerFactory
+     * #createDefinitionsReader(ApplicationContext)}
+     * .
+     */
+    @Test
+    public void testCreateDefinitionsReader() {
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        replay(applicationContext);
+        assertTrue(factory.createDefinitionsReader(applicationContext) instanceof CompatibilityDigesterDefinitionsReader);
+        verify(applicationContext);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesInitializerTest.java b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesInitializerTest.java
new file mode 100644
index 0000000..a09566a
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesInitializerTest.java
@@ -0,0 +1,81 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.complete;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import javax.servlet.ServletContext;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.servlet.wildcard.WildcardServletApplicationContext;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author antonio
+ *
+ * @version $Rev$ $Date$
+ */
+public class CompleteAutoloadTilesInitializerTest {
+
+    /**
+     * The object to test.
+     */
+    private CompleteAutoloadTilesInitializer initializer;
+
+    /**
+     * Sets up the object to test.
+     */
+    @Before
+    public void setUp() {
+        initializer = new CompleteAutoloadTilesInitializer();
+    }
+
+    /**
+     * Test method for {@link CompleteAutoloadTilesInitializer#createTilesApplicationContext(ApplicationContext)}.
+     */
+    @Test
+    public void testCreateTilesApplicationContext() {
+        ApplicationContext preliminaryContext = createMock(ApplicationContext.class);
+        ServletContext servletContext = createMock(ServletContext.class);
+
+        expect(preliminaryContext.getContext()).andReturn(servletContext);
+
+        replay(preliminaryContext, servletContext);
+        assertTrue(initializer
+                .createTilesApplicationContext(preliminaryContext) instanceof WildcardServletApplicationContext);
+        verify(preliminaryContext, servletContext);
+    }
+
+    /**
+     * Test method for {@link CompleteAutoloadTilesInitializer#createContainerFactory(ApplicationContext)}.
+     */
+    @Test
+    public void testCreateContainerFactory() {
+        ApplicationContext context = createMock(ApplicationContext.class);
+
+        replay(context);
+        assertTrue(initializer.createContainerFactory(context) instanceof CompleteAutoloadTilesContainerFactory);
+        verify(context);
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesListenerTest.java b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesListenerTest.java
new file mode 100644
index 0000000..83f77e7
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesListenerTest.java
@@ -0,0 +1,45 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.complete;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link CompleteAutoloadTilesListener}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CompleteAutoloadTilesListenerTest {
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.extras.complete.CompleteAutoloadTilesListener#createTilesInitializer()}
+     * .
+     */
+    @Test
+    public void testCreateTilesInitializer() {
+        CompleteAutoloadTilesListener listener = new CompleteAutoloadTilesListener();
+        assertTrue(listener.createTilesInitializer() instanceof CompleteAutoloadTilesInitializer);
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesInitializerTest.java b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesInitializerTest.java
new file mode 100644
index 0000000..a03b531
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesInitializerTest.java
@@ -0,0 +1,124 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.module;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.servlet.ServletContext;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.startup.TilesInitializer;
+import org.junit.Test;
+
+/**
+ * Tests {@link ModularTilesInitializer}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ModularTilesInitializerTest {
+
+    /**
+     * Tests {@link ModularTilesInitializer#initialize(ApplicationContext)}
+     * and {@link ModularTilesInitializer#destroy()}.
+     *
+     * @throws MalformedURLException Never thrown.
+     */
+    @Test
+    public void testInitialize() throws MalformedURLException {
+        ApplicationContext preliminaryContext = createMock(ApplicationContext.class);
+        ServletContext servletContext = createMock(ServletContext.class);
+        URL manifestUrl = getClass().getResource("/FAKE-MANIFEST.MF");
+
+        expect(preliminaryContext.getContext()).andReturn(servletContext);
+        expect(servletContext.getResource("/META-INF/MANIFEST.MF")).andReturn(manifestUrl);
+
+        replay(preliminaryContext, servletContext);
+        ModularTilesInitializer initializer = new ModularTilesInitializer();
+        initializer.initialize(preliminaryContext);
+        assertTrue(TilesInitializer1.initialized);
+        assertTrue(TilesInitializer2.initialized);
+        initializer.destroy();
+        assertTrue(TilesInitializer1.destroyed);
+        assertTrue(TilesInitializer2.destroyed);
+        verify(preliminaryContext, servletContext);
+    }
+
+    /**
+     * A mock {@link TilesInitializer} with probes.
+     *
+     * @version $Rev$ $Date$
+     */
+    public static class TilesInitializer1 implements TilesInitializer {
+
+        /**
+         * A probe to see if the initializer has been initialized.
+         */
+        private static boolean initialized = false;
+
+        /**
+         * A probe to see if the initializer has been destroyed.
+         */
+        private static boolean destroyed = false;
+
+        /** {@inheritDoc} */
+        public void initialize(ApplicationContext preliminaryContext) {
+            initialized = true;
+        }
+
+        /** {@inheritDoc} */
+        public void destroy() {
+            destroyed = true;
+        }
+    }
+
+    /**
+     * A second mock {@link TilesInitializer} with probes.
+     *
+     * @version $Rev$ $Date$
+     */
+    public static class TilesInitializer2 implements TilesInitializer {
+
+        /**
+         * A probe to see if the initializer has been initialized.
+         */
+        private static boolean initialized = false;
+
+        /**
+         * A probe to see if the initializer has been destroyed.
+         */
+        private static boolean destroyed = false;
+
+        /** {@inheritDoc} */
+        public void initialize(ApplicationContext preliminaryContext) {
+            initialized = true;
+        }
+
+        /** {@inheritDoc} */
+        public void destroy() {
+            destroyed = true;
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java
new file mode 100644
index 0000000..b02a9d6
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java
@@ -0,0 +1,45 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.module;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link ModularTilesListener}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ModularTilesListenerTest {
+
+    /**
+     * Test method for
+     * {@link org.apache.tiles.extras.complete.ModularTilesListener#createTilesInitializer()}
+     * .
+     */
+    @Test
+    public void testCreateTilesInitializer() {
+        ModularTilesListener listener = new ModularTilesListener();
+        assertTrue(listener.createTilesInitializer() instanceof ModularTilesInitializer);
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/renderer/OptionsRendererTest.java b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/renderer/OptionsRendererTest.java
new file mode 100644
index 0000000..765aa71
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/java/org/apache/tiles/extras/renderer/OptionsRendererTest.java
@@ -0,0 +1,139 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.extras.renderer;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import org.apache.tiles.Attribute;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.impl.BasicTilesContainer;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.locale.PostfixedApplicationResource;
+import org.apache.tiles.request.render.StringRenderer;
+import org.junit.Test;
+
+/**
+ * Tests {@link OptionsRenderer}.
+ *
+ * @version $Rev$ $Date$
+ */
+public final class OptionsRendererTest {
+
+    private final BasicTilesContainer container = new BasicTilesContainer();
+
+    private final Map<String, Object> appScope = new HashMap<String, Object>(){{
+        put(TilesAccess.CONTAINER_ATTRIBUTE, container);
+    }};
+
+    private final Map<String, Object> requestScope = new HashMap<String, Object>();
+
+    private final ApplicationResource template = new PostfixedApplicationResource("Result"){
+        @Override
+        public InputStream getInputStream() throws IOException {
+            throw new AssertionError("Shouldn't be called.");
+        }
+        @Override
+        public long getLastModified() throws IOException {
+            return 0;
+        }
+    };
+
+    private final ApplicationContext context = new ApplicationContext(){
+        @Override
+        public Object getContext() {
+            throw new AssertionError("Shouldn't be called.");
+        }
+        @Override
+        public Map<String, Object> getApplicationScope() {
+            return appScope;
+        }
+        @Override
+        public Map<String, String> getInitParams() {
+            throw new AssertionError("Shouldn't be called.");
+        }
+        @Override
+        public ApplicationResource getResource(String string) {
+            return template;
+        }
+        @Override
+        public ApplicationResource getResource(ApplicationResource ar, Locale locale) {
+            throw new AssertionError("Shouldn't be called.");
+        }
+        @Override
+        public Collection<ApplicationResource> getResources(String string) {
+            throw new AssertionError("Shouldn't be called.");
+        }
+    };
+
+    /**
+     * Tests
+     * {@link OptionsRenderer#render(String, Request)}.
+     *
+     * @throws IOException If something goes wrong during rendition.
+     */
+    @Test
+    public void testWrite() throws IOException {
+        StringWriter writer = new StringWriter();
+        Request request = createMock(Request.class);
+
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getContext(matches("request"))).andReturn(requestScope).anyTimes();
+        expect(request.getApplicationContext()).andReturn(context);
+        expect(request.getWriter()).andReturn(writer);
+        replay(request);
+
+        container
+                .getAttributeContext(request)
+                .putAttribute("test-fallback", new ListAttribute(){{
+                    add(new Attribute("Result"));
+                }});
+
+        OptionsRenderer renderer = new OptionsRenderer(context, new StringRenderer());
+        renderer.render("{options[test-fallback]}", request);
+        writer.close();
+        assertEquals("Not written 'Result'", "Result", writer.toString());
+        verify(request);
+    }
+
+    /**
+     * Tests
+     * {@link OptionsRenderer#isRenderable(String, Request)}.
+     */
+    @Test
+    public void testIsRenderable() {
+        Request requestContext = createMock(Request.class);
+        OptionsRenderer renderer = new OptionsRenderer(context, new StringRenderer());
+        assertTrue(renderer.isRenderable("any-string", requestContext));
+    }
+}
diff --git a/TILES_3_0_X/tiles-extras/src/test/resources/FAKE-MANIFEST.MF b/TILES_3_0_X/tiles-extras/src/test/resources/FAKE-MANIFEST.MF
new file mode 100644
index 0000000..352b0db
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/resources/FAKE-MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Tiles-Initializer: org.apache.tiles.extras.module.ModularTilesInitializerTest$TilesInitializer2
+
diff --git a/TILES_3_0_X/tiles-extras/src/test/resources/META-INF/MANIFEST.MF b/TILES_3_0_X/tiles-extras/src/test/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..540b988
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Tiles-Initializer: org.apache.tiles.extras.module.ModularTilesInitializerTest$TilesInitializer1
+
diff --git a/TILES_3_0_X/tiles-extras/src/test/resources/VM_global_library.vm b/TILES_3_0_X/tiles-extras/src/test/resources/VM_global_library.vm
new file mode 100644
index 0000000..7e8277d
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/resources/VM_global_library.vm
@@ -0,0 +1,60 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+##   http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+
+## Display all queued Struts errors
+#macro (errorMarkup)
+    #if ($errors.exist() )
+        <ul>
+        #foreach ($e in $errors.all )
+            $e
+        #end
+        </ul>
+    #end
+#end
+
+## Display all queued Struts errors for a particular property
+#macro (errorMarkupForProperty $property)
+    #if ($errors.exist($property) )
+        <ul>
+        #foreach ($er in $errors.get($property))
+            $er
+        #end
+        </ul>
+    #end
+#end
+
+## Display all queued Struts errors
+#macro (messageMarkup)
+    #if ($messages.exist() )
+        <ul>
+        #foreach ($m in $messages.all )
+            $m
+        #end
+        </ul>
+    #end
+#end
+
+## Display all queued Struts action messages for a particular property
+#macro (messageMarkupForProperty $property)
+    #if ($messages.exist($property) )
+        <ul>
+        #foreach ($m in $messages.get($property))
+            $m
+        #end
+        </ul>
+    #end
+#end
diff --git a/TILES_3_0_X/tiles-extras/src/test/resources/tools.xml b/TILES_3_0_X/tiles-extras/src/test/resources/tools.xml
new file mode 100644
index 0000000..ae29eb6
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/resources/tools.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<tools>
+  <toolbox scope="request">
+    <tool class="org.apache.velocity.tools.generic.ContextTool"/>
+  </toolbox>
+  <toolbox scope="application">
+     <tool class="org.apache.velocity.tools.generic.EscapeTool"/>
+   </toolbox>
+</tools>
diff --git a/TILES_3_0_X/tiles-extras/src/test/resources/velocity.properties b/TILES_3_0_X/tiles-extras/src/test/resources/velocity.properties
new file mode 100644
index 0000000..4dbb194
--- /dev/null
+++ b/TILES_3_0_X/tiles-extras/src/test/resources/velocity.properties
@@ -0,0 +1,114 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# ----------------------------------------------------------------------------
+# These are the default properties for the
+# Velocity Runtime. These values are used when
+# Runtime.init() is called, and when Runtime.init(properties)
+# fails to find the specificed properties file.
+# ----------------------------------------------------------------------------
+
+
+# ----------------------------------------------------------------------------
+# R U N T I M E  L O G
+# ----------------------------------------------------------------------------
+# Velocity uses the Servlet APIs logging facilites.
+
+# ----------------------------------------------------------------------------
+# This controls if Runtime.error(), info() and warn() messages include the
+# whole stack trace. The last property controls whether invalid references
+# are logged.
+# ----------------------------------------------------------------------------
+
+runtime.log.invalid.reference = true
+
+
+# ----------------------------------------------------------------------------
+# T E M P L A T E  E N C O D I N G
+# ----------------------------------------------------------------------------
+
+input.encoding=ISO-8859-1
+output.encoding=ISO-8859-1
+
+
+# ----------------------------------------------------------------------------
+# F O R E A C H  P R O P E R T I E S
+# ----------------------------------------------------------------------------
+# These properties control how the counter is accessed in the #foreach
+# directive. By default the reference $velocityCount will be available
+# in the body of the #foreach directive. The default starting value
+# for this reference is 1.
+# ----------------------------------------------------------------------------
+
+directive.foreach.counter.name = velocityCount
+directive.foreach.counter.initial.value = 1
+
+
+# ----------------------------------------------------------------------------
+# I N C L U D E  P R O P E R T I E S
+# ----------------------------------------------------------------------------
+# These are the properties that governed the way #include'd content
+# is governed.
+# ----------------------------------------------------------------------------
+
+directive.include.output.errormsg.start = <!-- include error :
+directive.include.output.errormsg.end   =  see error log -->
+
+
+# ----------------------------------------------------------------------------
+# P A R S E  P R O P E R T I E S
+# ----------------------------------------------------------------------------
+
+directive.parse.max.depth = 10
+
+
+# ----------------------------------------------------------------------------
+# VELOCIMACRO PROPERTIES
+# ----------------------------------------------------------------------------
+# global : name of default global library.  It is expected to be in the regular
+# template path.  You may remove it (either the file or this property) if
+# you wish with no harm.
+# ----------------------------------------------------------------------------
+# dev-changes by Marino
+webapp.resource.loader.cache = true
+webapp.resource.loader.modificationCheckInterval = 5
+velocimacro.library.autoreload = false
+velocimacro.library = /WEB-INF/VM_global_library.vm
+
+velocimacro.permissions.allow.inline = true
+velocimacro.permissions.allow.inline.to.replace.global = false
+velocimacro.permissions.allow.inline.local.scope = false
+
+velocimacro.context.localscope = false
+
+# ----------------------------------------------------------------------------
+# INTERPOLATION
+# ----------------------------------------------------------------------------
+# turn off and on interpolation of references and directives in string
+# literals.  ON by default :)
+# ----------------------------------------------------------------------------
+runtime.interpolate.string.literals = true
+
+
+# ----------------------------------------------------------------------------
+# RESOURCE MANAGEMENT
+# ----------------------------------------------------------------------------
+# Allows alternative ResourceManager and ResourceCache implementations
+# to be plugged in.
+# ----------------------------------------------------------------------------
+resource.manager.class = org.apache.velocity.runtime.resource.ResourceManagerImpl
+resource.manager.cache.class = org.apache.velocity.runtime.resource.ResourceCacheImpl
diff --git a/TILES_3_0_X/tiles-freemarker/pom.xml b/TILES_3_0_X/tiles-freemarker/pom.xml
new file mode 100644
index 0000000..a463425
--- /dev/null
+++ b/TILES_3_0_X/tiles-freemarker/pom.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.tiles</groupId>
+  <artifactId>tiles-freemarker</artifactId>
+  <name>Tiles - FreeMarker Support</name>
+  <description>Support for FreeMarker in Apache Tiles. For more read http://tiles.apache.org/framework/tutorial/integration/freemarker.html</description>
+  <parent>
+      <artifactId>tiles-parent</artifactId>
+      <groupId>org.apache.tiles</groupId>
+      <version>3.0.1</version>
+  </parent>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.tiles.autotag.plugin</groupId>
+        <artifactId>maven-autotag-plugin</artifactId>
+        <version>${tiles.autotag.version}</version>
+        <executions>
+            <execution>
+                <goals>
+                    <goal>generate-freemarker</goal>
+                </goals>
+                <configuration>
+                    <packageName>org.apache.tiles.freemarker.template</packageName>
+                    <requestClass>org.apache.tiles.request.Request</requestClass>
+                    <freemarkerRuntime>org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime</freemarkerRuntime>
+                </configuration>
+            </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+      <dependency>
+          <groupId>org.apache.tiles</groupId>
+          <artifactId>tiles-servlet</artifactId>
+      </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-template</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+        <groupId>javax.servlet</groupId>
+        <artifactId>servlet-api</artifactId>
+        <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+        <groupId>org.easymock</groupId>
+        <artifactId>easymockclassextension</artifactId>
+        <scope>test</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.tiles</groupId>
+        <artifactId>tiles-request-freemarker</artifactId>
+        <version>${tiles.request.version}</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/TILES_3_0_X/tiles-freemarker/src/main/java/org/apache/tiles/freemarker/TilesSharedVariableFactory.java b/TILES_3_0_X/tiles-freemarker/src/main/java/org/apache/tiles/freemarker/TilesSharedVariableFactory.java
new file mode 100644
index 0000000..a80b9a5
--- /dev/null
+++ b/TILES_3_0_X/tiles-freemarker/src/main/java/org/apache/tiles/freemarker/TilesSharedVariableFactory.java
@@ -0,0 +1,43 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.freemarker;
+
+import org.apache.tiles.freemarker.template.TilesFMModelRepository;
+import org.apache.tiles.request.freemarker.servlet.SharedVariableFactory;
+
+import freemarker.ext.beans.BeanModel;
+import freemarker.ext.beans.BeansWrapper;
+import freemarker.template.TemplateModel;
+
+/**
+ * Creates a shared variable that contains the Tiles Freemarker model repository.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesSharedVariableFactory implements SharedVariableFactory {
+
+    @Override
+    public TemplateModel create() {
+        return new BeanModel(new TilesFMModelRepository(),
+                BeansWrapper.getDefaultInstance());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-freemarker/src/main/java/org/apache/tiles/freemarker/package-info.java b/TILES_3_0_X/tiles-freemarker/src/main/java/org/apache/tiles/freemarker/package-info.java
new file mode 100644
index 0000000..c64cec9
--- /dev/null
+++ b/TILES_3_0_X/tiles-freemarker/src/main/java/org/apache/tiles/freemarker/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes for supporting FreeMarker in Tiles.
+ */
+package org.apache.tiles.freemarker;
diff --git a/TILES_3_0_X/tiles-freemarker/src/site/site.xml b/TILES_3_0_X/tiles-freemarker/src/site/site.xml
new file mode 100644
index 0000000..ba0172f
--- /dev/null
+++ b/TILES_3_0_X/tiles-freemarker/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Freemarker Support">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-freemarker/src/test/java/org/apache/tiles/freemarker/TilesSharedVariableFactoryTest.java b/TILES_3_0_X/tiles-freemarker/src/test/java/org/apache/tiles/freemarker/TilesSharedVariableFactoryTest.java
new file mode 100644
index 0000000..2690e20
--- /dev/null
+++ b/TILES_3_0_X/tiles-freemarker/src/test/java/org/apache/tiles/freemarker/TilesSharedVariableFactoryTest.java
@@ -0,0 +1,45 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.freemarker;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import freemarker.ext.beans.BeanModel;
+
+/**
+ * Tests {@link SharedVariableFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesSharedVariableFactoryTest {
+
+    /**
+     * Test method for {@link org.apache.tiles.freemarker.TilesSharedVariableFactory#create()}.
+     */
+    @Test
+    public void testCreate() {
+        TilesSharedVariableFactory factory = new TilesSharedVariableFactory();
+        assertTrue(factory.create() instanceof BeanModel);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-jsp/pom.xml b/TILES_3_0_X/tiles-jsp/pom.xml
new file mode 100644
index 0000000..877443d
--- /dev/null
+++ b/TILES_3_0_X/tiles-jsp/pom.xml
@@ -0,0 +1,172 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>tiles-jsp</artifactId>
+  <packaging>jar</packaging>
+  <name>Tiles - JSP support</name>
+  <description>Tiles JSP support: Classes and tag libraries to use Tiles in a
+  JSP environment.</description>
+
+  <properties>
+      <tiles.osgi.symbolicName>org.apache.tiles.jsp</tiles.osgi.symbolicName>
+  </properties>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <excludes>
+          <exclude>LICENSE.txt</exclude>
+          <exclude>NOTICE.txt</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>LICENSE.txt</include>
+          <include>NOTICE.txt</include>
+        </includes>
+        <targetPath>META-INF</targetPath>
+      </resource>
+    </resources>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.tiles.autotag.plugin</groupId>
+        <artifactId>maven-autotag-plugin</artifactId>
+        <version>${tiles.autotag.version}</version>
+        <executions>
+            <execution>
+                <goals>
+                    <goal>generate-jsp</goal>
+                </goals>
+                <configuration>
+                    <taglibURI>http://tiles.apache.org/tags-tiles</taglibURI>
+                    <packageName>org.apache.tiles.jsp.taglib</packageName>
+                    <requestClass>org.apache.tiles.request.Request</requestClass>
+                    <jspRuntime>org.apache.tiles.request.jsp.autotag.JspAutotagRuntime</jspRuntime>
+                </configuration>
+            </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>net.sourceforge.maven-taglib</groupId>
+        <artifactId>maven-taglib-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <parseHtml>true</parseHtml>
+          <srcDir>${project.build.outputDirectory}/META-INF/tld</srcDir>
+        </configuration>
+      </plugin>
+    </plugins>
+
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>net.sourceforge.maven-taglib</groupId>
+        <artifactId>maven-taglib-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <parseHtml>true</parseHtml>
+          <srcDir>${project.build.outputDirectory}/META-INF/tld</srcDir>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-servlet</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-template</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymockclassextension</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shale</groupId>
+      <artifactId>shale-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+        <groupId>org.apache.tiles</groupId>
+        <artifactId>tiles-request-jsp</artifactId>
+        <version>${tiles.request.version}</version>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/TILES_3_0_X/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java b/TILES_3_0_X/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java
new file mode 100644
index 0000000..1d61fa7
--- /dev/null
+++ b/TILES_3_0_X/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java
@@ -0,0 +1,226 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.jsp.taglib;
+
+import java.io.IOException;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+import javax.servlet.jsp.tagext.TagData;
+import javax.servlet.jsp.tagext.TagExtraInfo;
+import javax.servlet.jsp.tagext.VariableInfo;
+
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.template.ImportAttributeModel;
+
+/**
+ * Exposes am attribute as a scripting variable within the page.
+ *
+ * @since Tiles 1.0
+ * @version $Rev$ $Date$
+ */
+public class UseAttributeTag extends SimpleTagSupport {
+
+    /**
+     * The template model.
+     */
+    private ImportAttributeModel model = new ImportAttributeModel();
+
+    /**
+     * The id of the imported scripting variable.
+     */
+    private String id;
+
+    /**
+     * The scope name.
+     */
+    private String scopeName = null;
+
+    /**
+     * The name of the attribute.
+     */
+    private String name = null;
+
+    /**
+     * Flag that, if <code>true</code>, ignores exceptions.
+     */
+    private boolean ignore = false;
+
+    /**
+     * Class name of object.
+     */
+    private String classname = null;
+
+    /**
+     * Returns the id of the imported scripting variable.
+     *
+     * @return The id of the imported scripting variable.
+     * @since 2.2.0
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the id of the imported scripting variable.
+     *
+     * @param id
+     *            The id of the imported scripting variable.
+     * @since 2.2.0
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * Set the scope.
+     *
+     * @param scope
+     *            Scope.
+     */
+    public void setScope(String scope) {
+        this.scopeName = scope;
+    }
+
+    /**
+     * Get scope.
+     *
+     * @return Scope.
+     */
+    public String getScope() {
+        return scopeName;
+    }
+
+    /**
+     * Get the name.
+     *
+     * @return Name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Set the name.
+     *
+     * @param name
+     *            The new name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * Set ignore flag.
+     *
+     * @param ignore
+     *            default: <code>false</code>: Exception is thrown when
+     *            attribute is not found, set to <code>
+     *               true</code> to
+     *            ignore missing attributes silently
+     */
+    public void setIgnore(boolean ignore) {
+        this.ignore = ignore;
+    }
+
+    /**
+     * Get ignore flag.
+     *
+     * @return default: <code>false</code>: Exception is thrown when attribute
+     *         is not found, set to <code>
+     *         true</code> to ignore missing
+     *         attributes silently
+     */
+    public boolean isIgnore() {
+        return ignore;
+    }
+
+    /**
+     * Get class name.
+     *
+     * @return class name
+     */
+    public String getClassname() {
+        return classname;
+
+    }
+
+    /**
+     * Set the class name.
+     *
+     * @param name
+     *            The new class name.
+     */
+    public void setClassname(String name) {
+        this.classname = name;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void doTag() throws JspException, IOException {
+        AutotagRuntime<Request> runtime = new org.apache.tiles.request.jsp.autotag.JspAutotagRuntime();
+        if (runtime instanceof SimpleTagSupport) {
+            SimpleTagSupport tag = (SimpleTagSupport) runtime;
+            tag.setJspContext(getJspContext());
+            tag.setJspBody(getJspBody());
+            tag.setParent(getParent());
+            tag.doTag();
+        }
+        Request request = runtime.createRequest();        
+        model.execute(name, scopeName, id, ignore, request);
+    }
+
+    /**
+     * Returns the scripting variable to use.
+     *
+     * @return The scripting variable.
+     */
+    public String getScriptingVariable() {
+        return id == null ? getName() : id;
+    }
+
+    /**
+     * Implementation of <code>TagExtraInfo</code> which identifies the
+     * scripting object(s) to be made visible.
+     */
+    public static class Tei extends TagExtraInfo {
+
+        /** {@inheritDoc} */
+        @Override
+        public VariableInfo[] getVariableInfo(TagData data) {
+            String classname = data.getAttributeString("classname");
+            if (classname == null) {
+                classname = "java.lang.Object";
+            }
+
+            String id = data.getAttributeString("id");
+            if (id == null) {
+                id = data.getAttributeString("name");
+            }
+
+            return new VariableInfo[] { new VariableInfo(id, classname, true,
+                    VariableInfo.AT_END) };
+
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/package-info.java b/TILES_3_0_X/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/package-info.java
new file mode 100644
index 0000000..c57c451
--- /dev/null
+++ b/TILES_3_0_X/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/package-info.java
@@ -0,0 +1,27 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * The "tiles-jsp" tag library contains tags that are useful to create
+ * templates, subpages other reusable view parts using the "tiles-core"
+ * package.
+ */
+package org.apache.tiles.jsp.taglib;
+
diff --git a/TILES_3_0_X/tiles-jsp/src/main/resources/LICENSE.txt b/TILES_3_0_X/tiles-jsp/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/tiles-jsp/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/tiles-jsp/src/main/resources/META-INF/tld/tiles-extras-jsp.tld b/TILES_3_0_X/tiles-jsp/src/main/resources/META-INF/tld/tiles-extras-jsp.tld
new file mode 100644
index 0000000..60cad30
--- /dev/null
+++ b/TILES_3_0_X/tiles-jsp/src/main/resources/META-INF/tld/tiles-extras-jsp.tld
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<taglib
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+  xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  version="2.1">
+   <description>
+   <![CDATA[
+   <p>This tag library provides Tiles tags.</p>
+   ]]>
+   </description>
+   <tlib-version>1.2</tlib-version>
+   <short-name>tilesx</short-name>
+   <uri>http://tiles.apache.org/tags-tiles-extras</uri>
+   <tag>
+      <description>
+      <![CDATA[
+      <p><strong>Use attribute value inside page.</strong></p>
+      <p>Declare a Java variable, and an attribute in the specified scope,
+      using its attribute value.</p>
+      <p>Java variable and attribute will have the name specified by 'id',
+      or the original name if not specified.</p>
+      ]]>
+      </description>
+      <name>useAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.UseAttributeTag</tag-class>
+      <tei-class>org.apache.tiles.jsp.taglib.UseAttributeTag$Tei</tei-class>
+      <body-content>empty</body-content>
+      <attribute>
+         <description>
+         <![CDATA[
+         <p>Declared attribute and variable name.</p>
+         ]]>
+         </description>
+         <name>id</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
+         <description>
+         <![CDATA[
+         <p>Class of the declared variable.</p>
+         ]]>
+         </description>
+         <name>classname</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
+         <description>
+         <![CDATA[
+         <p>Scope of the declared attribute. Default to 'page'.</p>
+         ]]>
+         </description>
+         <name>scope</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+      </attribute>
+      <attribute>
+         <description>
+         <![CDATA[
+         <p>Attribute name.</p>
+         ]]>
+         </description>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
+         <description>
+         <![CDATA[
+         <p>
+         If this attribute is set to true, and the attribute specified by the name
+         does not exist, simply return without error. The default value is false, which will
+         cause a runtime exception to be thrown.
+         </p>
+         ]]>
+         </description>
+         <name>ignore</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+      </attribute>
+   </tag>
+</taglib>
+
diff --git a/TILES_3_0_X/tiles-jsp/src/main/resources/NOTICE.txt b/TILES_3_0_X/tiles-jsp/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..1f13ff8
--- /dev/null
+++ b/TILES_3_0_X/tiles-jsp/src/main/resources/NOTICE.txt
@@ -0,0 +1,6 @@
+   Apache Tiles
+   Copyright 1999-2009 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/TILES_3_0_X/tiles-jsp/src/site/site.xml b/TILES_3_0_X/tiles-jsp/src/site/site.xml
new file mode 100644
index 0000000..e824154
--- /dev/null
+++ b/TILES_3_0_X/tiles-jsp/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - JSP support">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/UseAttributeTagTest.java b/TILES_3_0_X/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/UseAttributeTagTest.java
new file mode 100644
index 0000000..4c59ea0
--- /dev/null
+++ b/TILES_3_0_X/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/UseAttributeTagTest.java
@@ -0,0 +1,214 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.jsp.taglib;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.JspFragment;
+import javax.servlet.jsp.tagext.JspTag;
+import javax.servlet.jsp.tagext.TagData;
+import javax.servlet.jsp.tagext.VariableInfo;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.jsp.JspRequest;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link UseAttributeTag}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class UseAttributeTagTest {
+
+    /**
+     * The tag to test.
+     */
+    private UseAttributeTag tag;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        tag = new UseAttributeTag();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.jsp.taglib.UseAttributeTag#execute(org.apache.tiles.request.Request)}.
+     * @throws IOException
+     * @throws JspException
+     */
+    @Test
+    public void testExecute() throws JspException, IOException {
+        JspFragment jspBody = createMock(JspFragment.class);
+        PageContext pageContext = createMock(PageContext.class);
+        JspTag parent = createMock(JspTag.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        HttpServletRequest httpServletRequest = createMock(HttpServletRequest.class);
+        HttpServletResponse httpServletResponse = createMock(HttpServletResponse.class);
+        @SuppressWarnings("unchecked")
+        Map<String, Object> applicationScope = createMock(Map.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Attribute attribute = createMock(Attribute.class);
+        expect(pageContext.getAttribute(
+                ApplicationAccess.APPLICATION_CONTEXT_ATTRIBUTE,
+                PageContext.APPLICATION_SCOPE)).andReturn(applicationContext);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope).anyTimes();
+        expect(pageContext.getRequest()).andReturn(httpServletRequest);
+        expect(pageContext.getResponse()).andReturn(httpServletResponse);
+        expect(pageContext.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, PageContext.REQUEST_SCOPE)).andReturn(container);
+        expect(container.getAttributeContext(isA(JspRequest.class))).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("name")).andReturn(attribute);
+        expect(container.evaluate(isA(Attribute.class), isA(JspRequest.class))).andReturn(new Integer(1));
+        pageContext.setAttribute("id", new Integer(1), PageContext.PAGE_SCOPE);
+        replay(jspBody, pageContext, parent,
+               applicationContext, httpServletRequest, httpServletResponse,
+               applicationScope, container, attributeContext, attribute);
+        tag.setName("name");
+        tag.setScope("page");
+        tag.setId("id");
+        tag.setIgnore(false);
+        tag.setJspContext(pageContext);
+        tag.setJspBody(jspBody);
+        tag.setParent(parent);
+        tag.doTag();
+        verify(jspBody, pageContext, parent,
+               applicationContext, httpServletRequest, httpServletResponse,
+               container, attributeContext, attribute);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.jsp.taglib.UseAttributeTag#setId(java.lang.String)}.
+     */
+    @Test
+    public void testSetId() {
+        tag.setId("id");
+        assertEquals("id", tag.getId());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.jsp.taglib.UseAttributeTag#getScope()}.
+     */
+    @Test
+    public void testGetScope() {
+        tag.setScope("scope");
+        assertEquals("scope", tag.getScope());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.jsp.taglib.UseAttributeTag#setName(java.lang.String)}.
+     */
+    @Test
+    public void testSetName() {
+        tag.setName("name");
+        assertEquals("name", tag.getName());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.jsp.taglib.UseAttributeTag#setIgnore(boolean)}.
+     */
+    @Test
+    public void testSetIgnore() {
+        tag.setIgnore(true);
+        assertTrue(tag.isIgnore());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.jsp.taglib.UseAttributeTag#setClassname(java.lang.String)}.
+     */
+    @Test
+    public void testSetClassname() {
+        tag.setClassname("classname");
+        assertEquals("classname", tag.getClassname());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.jsp.taglib.UseAttributeTag#getScriptingVariable()}.
+     */
+    @Test
+    public void testGetScriptingVariable() {
+        tag.setName("name");
+        assertEquals("name", tag.getScriptingVariable());
+        tag.setId("id");
+        assertEquals("id", tag.getScriptingVariable());
+    }
+
+    /**
+     * Tests {@link UseAttributeTag.Tei}.
+     */
+    @Test
+    public void testTei() {
+        TagData tagData = createMock(TagData.class);
+
+        expect(tagData.getAttributeString("classname")).andReturn("my.Clazz");
+        expect(tagData.getAttributeString("id")).andReturn("id");
+
+        replay(tagData);
+        UseAttributeTag.Tei tei = new UseAttributeTag.Tei();
+        VariableInfo[] infos = tei.getVariableInfo(tagData);
+        assertEquals(1, infos.length);
+        VariableInfo info = infos[0];
+        assertEquals("id", info.getVarName());
+        assertEquals("my.Clazz", info.getClassName());
+        assertTrue(info.getDeclare());
+        assertEquals(VariableInfo.AT_END, info.getScope());
+        verify(tagData);
+    }
+
+    /**
+     * Tests {@link UseAttributeTag.Tei}.
+     */
+    @Test
+    public void testTeiDefaults() {
+        TagData tagData = createMock(TagData.class);
+
+        expect(tagData.getAttributeString("classname")).andReturn(null);
+        expect(tagData.getAttributeString("id")).andReturn(null);
+        expect(tagData.getAttributeString("name")).andReturn("name");
+
+        replay(tagData);
+        UseAttributeTag.Tei tei = new UseAttributeTag.Tei();
+        VariableInfo[] infos = tei.getVariableInfo(tagData);
+        assertEquals(1, infos.length);
+        VariableInfo info = infos[0];
+        assertEquals("name", info.getVarName());
+        assertEquals("java.lang.Object", info.getClassName());
+        assertTrue(info.getDeclare());
+        assertEquals(VariableInfo.AT_END, info.getScope());
+        verify(tagData);
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/pom.xml b/TILES_3_0_X/tiles-mvel/pom.xml
new file mode 100644
index 0000000..a91727d
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/pom.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>tiles-mvel</artifactId>
+  <packaging>jar</packaging>
+  <name>Tiles - MVEL support</name>
+  <description>Tiles MVEL support: Classes and tag libraries to use MVEL as an expression language in attribute expressions.</description>
+
+  <properties>
+      <tiles.osgi.symbolicName>org.apache.tiles.mvel</tiles.osgi.symbolicName>
+  </properties>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <excludes>
+          <exclude>LICENSE.txt</exclude>
+          <exclude>NOTICE.txt</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>LICENSE.txt</include>
+          <include>NOTICE.txt</include>
+        </includes>
+        <targetPath>META-INF</targetPath>
+      </resource>
+    </resources>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymockclassextension</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mvel</groupId>
+      <artifactId>mvel2</artifactId>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/MVELAttributeEvaluator.java b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/MVELAttributeEvaluator.java
new file mode 100644
index 0000000..13f21c7
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/MVELAttributeEvaluator.java
@@ -0,0 +1,72 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.mvel;
+
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.evaluator.AbstractAttributeEvaluator;
+import org.apache.tiles.request.Request;
+import org.mvel2.MVEL;
+import org.mvel2.integration.VariableResolverFactory;
+
+/**
+ * Allows to use MVEL as the language to evaluate attribute values.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class MVELAttributeEvaluator extends AbstractAttributeEvaluator {
+
+    /**
+     * Holds the Tiles request context of the current thread.
+     */
+    private TilesRequestContextHolder requestHolder;
+
+    /**
+     * Resolves variables when starting from the root.
+     *
+     * @since 2.2.0
+     */
+    private VariableResolverFactory variableResolverFactory;
+
+    /**
+     * Constructor.
+     *
+     * @param requestHolder The object that holds the Tiles request context of
+     * the current thread.
+     * @param variableResolverFactory The resolver factory to use.
+     * @since 2.2.0
+     */
+    public MVELAttributeEvaluator(TilesRequestContextHolder requestHolder,
+            VariableResolverFactory variableResolverFactory) {
+        this.requestHolder = requestHolder;
+        this.variableResolverFactory = variableResolverFactory;
+    }
+
+    /** {@inheritDoc} */
+    public Object evaluate(String expression, Request request) {
+        if (expression == null) {
+            throw new IllegalArgumentException("The expression parameter cannot be null");
+        }
+        requestHolder.setTilesRequestContext(request);
+        return MVEL.eval(expression, variableResolverFactory);
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/ReadOnlyVariableResolverFactory.java b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/ReadOnlyVariableResolverFactory.java
new file mode 100644
index 0000000..aa3b2e3
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/ReadOnlyVariableResolverFactory.java
@@ -0,0 +1,147 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.mvel;
+
+import java.util.HashMap;
+
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.mvel2.UnresolveablePropertyException;
+import org.mvel2.integration.VariableResolver;
+import org.mvel2.integration.impl.BaseVariableResolverFactory;
+
+/**
+ * A base variable resolver factory that is read-only.
+ *
+ * @version $Rev$ $Date$
+ */
+public abstract class ReadOnlyVariableResolverFactory extends
+        BaseVariableResolverFactory {
+
+    /**
+     * The Tiles request holder.
+     */
+    protected TilesRequestContextHolder requestHolder;
+
+    /**
+     * Constructor.
+     *
+     * @param requestHolder The Tiles request holder.
+     * @since 3..0
+     */
+    public ReadOnlyVariableResolverFactory(TilesRequestContextHolder requestHolder) {
+        this.requestHolder = requestHolder;
+        variableResolvers = new HashMap<String, VariableResolver>();
+    }
+
+    /** {@inheritDoc} */
+    public VariableResolver createVariable(String name, Object value) {
+        if (nextFactory != null) {
+            return nextFactory.createVariable(name, value);
+        }
+        throw new UnsupportedOperationException("This variable resolver factory is read only");
+    }
+
+    /** {@inheritDoc} */
+    public VariableResolver createVariable(String name, Object value,
+            Class<?> type) {
+        variableResolvers = new HashMap<String, VariableResolver>();
+        if (nextFactory != null) {
+            return nextFactory.createVariable(name, value, type);
+        }
+        throw new UnsupportedOperationException("This variable resolver factory is read only");
+    }
+
+    /** {@inheritDoc} */
+    public boolean isResolveable(String name) {
+        return isTarget(name) || isNextResolveable(name);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public VariableResolver getVariableResolver(String name) {
+        if (isResolveable(name)) {
+            if (variableResolvers != null && variableResolvers.containsKey(name)) {
+                return variableResolvers.get(name);
+            } else if (isTarget(name)) {
+                VariableResolver variableResolver = createVariableResolver(name);
+                variableResolvers.put(name, variableResolver);
+                return variableResolver;
+            } else if (nextFactory != null) {
+                return nextFactory.getVariableResolver(name);
+            }
+        }
+
+        throw new UnresolveablePropertyException("unable to resolve variable '" + name + "'");
+    }
+
+    /**
+     * Creates a variable resolver.
+     *
+     * @param name The name of the property.
+     * @return The variable resolver.
+     * @since 3.0.0
+     */
+    public abstract VariableResolver createVariableResolver(String name);
+
+    /**
+     * Base variable resolver.
+     *
+     * @version $Rev$ $Date$
+     * @since 3.0.0
+     */
+    public abstract static class ReadOnlyVariableResolver implements VariableResolver {
+
+        /**
+         * The name of the property.
+         */
+        protected String name;
+
+        /**
+         * Constructor.
+         *
+         * @param name The name of the property.
+         * @since 2.2.0
+         */
+        public ReadOnlyVariableResolver(String name) {
+            this.name = name;
+        }
+
+        /** {@inheritDoc} */
+        public int getFlags() {
+            return 0;
+        }
+
+        /** {@inheritDoc} */
+        public String getName() {
+            return name;
+        }
+
+        /** {@inheritDoc} */
+        public void setStaticType(@SuppressWarnings("rawtypes") Class type) {
+            // Does nothing for the moment.
+        }
+
+        /** {@inheritDoc} */
+        public void setValue(Object value) {
+            throw new UnsupportedOperationException("This resolver is read-only");
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/ScopeVariableResolverFactory.java b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/ScopeVariableResolverFactory.java
new file mode 100644
index 0000000..7cb21da
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/ScopeVariableResolverFactory.java
@@ -0,0 +1,104 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.mvel;
+
+import java.util.Map;
+
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.request.Request;
+import org.mvel2.integration.VariableResolver;
+
+/**
+ * Resolves beans stored in request, session and application scopes.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class ScopeVariableResolverFactory extends
+        ReadOnlyVariableResolverFactory {
+
+    /**
+     * The length of the scope suffix: "Scope".
+     */
+    private static final int SCOPE_SUFFIX_LENGTH = 5;
+
+    /**
+     * Constructor.
+     *
+     * @param requestHolder The Tiles request holder.
+     * @since 2.2.0
+     */
+    public ScopeVariableResolverFactory(TilesRequestContextHolder requestHolder) {
+        super(requestHolder);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public VariableResolver createVariableResolver(String name) {
+        return new ScopeVariableResolver(name);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isTarget(String name) {
+        Request request = requestHolder.getTilesRequestContext();
+        if (name.endsWith("Scope")) {
+            String scopeName = name.substring(0, name.length() - SCOPE_SUFFIX_LENGTH);
+            for (String availableScope : request.getAvailableScopes()) {
+                if (scopeName.equals(availableScope)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Resolves a single attribute stored in request, session or application scope.
+     *
+     * @version $Rev$ $Date$
+     * @since 2.2.0
+     */
+    private class ScopeVariableResolver extends ReadOnlyVariableResolver {
+
+        /**
+         * Constructor.
+         *
+         * @param name The name of the attribute.
+         * @since 2.2.0
+         */
+        public ScopeVariableResolver(String name) {
+            super(name);
+        }
+
+        /** {@inheritDoc} */
+        @SuppressWarnings("rawtypes")
+        public Class getType() {
+            return Map.class;
+        }
+
+        /** {@inheritDoc} */
+        public Object getValue() {
+            Request request = requestHolder.getTilesRequestContext();
+            return request.getContext(name.substring(0, name.length() - SCOPE_SUFFIX_LENGTH));
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactory.java b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactory.java
new file mode 100644
index 0000000..2d54ad8
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactory.java
@@ -0,0 +1,104 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.mvel;
+
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.request.Request;
+import org.mvel2.integration.VariableResolver;
+
+/**
+ * Resolves beans stored in request, session and application scopes.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class TilesContextBeanVariableResolverFactory extends
+        ReadOnlyVariableResolverFactory {
+
+    /**
+     * Constructor.
+     *
+     * @param requestHolder The Tiles request holder.
+     * @since 2.2.0
+     */
+    public TilesContextBeanVariableResolverFactory(TilesRequestContextHolder requestHolder) {
+        super(requestHolder);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public VariableResolver createVariableResolver(String name) {
+        return new TilesContextBeanVariableResolver(name);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isTarget(String name) {
+        Request request = requestHolder.getTilesRequestContext();
+        for (String scope : request.getAvailableScopes()) {
+            if (request.getContext(scope).containsKey(name)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Resolves a single attribute stored in request, session or application scope.
+     *
+     * @version $Rev$ $Date$
+     * @since 2.2.0
+     */
+    private class TilesContextBeanVariableResolver extends ReadOnlyVariableResolver {
+
+        /**
+         * Constructor.
+         *
+         * @param name The name of the attribute.
+         * @since 2.2.0
+         */
+        public TilesContextBeanVariableResolver(String name) {
+            super(name);
+        }
+
+        /** {@inheritDoc} */
+        @SuppressWarnings("rawtypes")
+        public Class getType() {
+            Object value = getValue();
+            if (value != null) {
+                return value.getClass();
+            }
+            return Object.class;
+        }
+
+        /** {@inheritDoc} */
+        public Object getValue() {
+            Request request = requestHolder.getTilesRequestContext();
+            for (String scope : request.getAvailableScopes()) {
+                Object value = request.getContext(scope).get(name);
+                if (value != null) {
+                    return value;
+                }
+            }
+            return null;
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextVariableResolverFactory.java b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextVariableResolverFactory.java
new file mode 100644
index 0000000..0336e75
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/TilesContextVariableResolverFactory.java
@@ -0,0 +1,195 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.mvel;
+
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.reflect.CannotAccessMethodException;
+import org.apache.tiles.util.CombinedBeanInfo;
+import org.mvel2.integration.VariableResolver;
+
+/**
+ * Resolves {@link org.apache.tiles.request.Request} and
+ * {@link org.apache.tiles.request.ApplicationContext} properties as variables.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class TilesContextVariableResolverFactory extends
+        ReadOnlyVariableResolverFactory {
+
+    /**
+     * Beaninfo about {@link org.apache.tiles.request.Request} and
+     * {@link org.apache.tiles.request.ApplicationContext}.
+     */
+    private CombinedBeanInfo requestBeanInfo = new CombinedBeanInfo(
+            Request.class, ApplicationContext.class);
+
+    /**
+     * Constructor.
+     *
+     * @param requestHolder The Tiles request holder.
+     * @since 2.2.0
+     */
+    public TilesContextVariableResolverFactory(TilesRequestContextHolder requestHolder) {
+        super(requestHolder);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isTarget(String name) {
+        return requestBeanInfo.getMappedDescriptors(Request.class).containsKey(
+                name)
+                || requestBeanInfo.getMappedDescriptors(
+                        ApplicationContext.class).containsKey(name);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public VariableResolver createVariableResolver(String name) {
+        VariableResolver resolver = null;
+        PropertyDescriptor descriptor = requestBeanInfo.getMappedDescriptors(Request.class).get(name);
+        if (descriptor != null) {
+            resolver = new RequestVariableResolver(name, descriptor);
+        } else {
+            descriptor = requestBeanInfo.getMappedDescriptors(ApplicationContext.class).get(name);
+            if (descriptor != null) {
+                resolver = new ApplicationVariableResolver(name, descriptor);
+            }
+        }
+        return resolver;
+    }
+
+    /**
+     * Resolves a {@link org.apache.tiles.request.Request} property as a variable.
+     *
+     * @version $Rev$ $Date$
+     * @since 2.2.0
+     */
+    private class RequestVariableResolver extends ReadOnlyVariableResolver {
+
+        /**
+         * The property descriptor.
+         */
+        private PropertyDescriptor descriptor;
+
+        /**
+         * Constructor.
+         *
+         * @param name The name of the property.
+         * @param descriptor The property descriptor.
+         * @since 2.2.0
+         */
+        public RequestVariableResolver(String name, PropertyDescriptor descriptor) {
+            super(name);
+            this.descriptor = descriptor;
+        }
+
+        /** {@inheritDoc} */
+        @SuppressWarnings("rawtypes")
+        public Class getType() {
+            return descriptor.getPropertyType();
+        }
+
+        /** {@inheritDoc} */
+        public Object getValue() {
+            Method method = descriptor.getReadMethod();
+            try {
+                return method.invoke(requestHolder.getTilesRequestContext());
+            } catch (IllegalArgumentException e) {
+                throw new CannotAccessMethodException(
+                        "Arguments are wrong for property '"
+                                + descriptor.getName() + "'", e);
+            } catch (IllegalAccessException e) {
+                throw new CannotAccessMethodException(
+                        "Cannot access getter method for property '"
+                                + descriptor.getName() + "'", e);
+            } catch (InvocationTargetException e) {
+                throw new CannotAccessMethodException(
+                        "The getter method for property '"
+                                + descriptor.getName() + "' threw an exception",
+                        e);
+            }
+        }
+    }
+
+    /**
+     * Resolves a {@link org.apache.tiles.request.ApplicationContext} property as a
+     * variable.
+     *
+     * @version $Rev$ $Date$
+     * @since 2.2.0
+     */
+    private class ApplicationVariableResolver extends ReadOnlyVariableResolver {
+
+        /**
+         * The property descriptor.
+         *
+         * @since 2.2.0
+         */
+        private PropertyDescriptor descriptor;
+
+        /**
+         * Constructor.
+         *
+         * @param name The name of the property.
+         * @param descriptor The property descriptor.
+         * @since 2.2.0
+         */
+        public ApplicationVariableResolver(String name, PropertyDescriptor descriptor) {
+            super(name);
+            this.descriptor = descriptor;
+        }
+
+        /** {@inheritDoc} */
+        @SuppressWarnings("rawtypes")
+        public Class getType() {
+            return descriptor.getPropertyType();
+        }
+
+        /** {@inheritDoc} */
+        public Object getValue() {
+            Method method = descriptor.getReadMethod();
+            try {
+                return method.invoke(requestHolder.getTilesRequestContext()
+                        .getApplicationContext());
+            } catch (IllegalArgumentException e) {
+                throw new CannotAccessMethodException(
+                        "Arguments are wrong for property '"
+                                + descriptor.getName() + "'", e);
+            } catch (IllegalAccessException e) {
+                throw new CannotAccessMethodException(
+                        "Cannot access getter method for property '"
+                                + descriptor.getName() + "'", e);
+            } catch (InvocationTargetException e) {
+                throw new CannotAccessMethodException(
+                        "The getter method for property '"
+                                + descriptor.getName() + "' threw an exception",
+                        e);
+            }
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/package-info.java b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/package-info.java
new file mode 100644
index 0000000..b37f16f
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/main/java/org/apache/tiles/mvel/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Attribute evaluator classes that can perform MVEL evaluation for attributes.
+ */
+package org.apache.tiles.mvel;
diff --git a/TILES_3_0_X/tiles-mvel/src/site/site.xml b/TILES_3_0_X/tiles-mvel/src/site/site.xml
new file mode 100644
index 0000000..df9627d
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - MVEL Support">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/MVELAttributeEvaluatorTest.java b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/MVELAttributeEvaluatorTest.java
new file mode 100644
index 0000000..96a3370
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/MVELAttributeEvaluatorTest.java
@@ -0,0 +1,201 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.mvel;
+
+import java.util.Arrays;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Expression;
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+import org.mvel2.integration.VariableResolverFactory;
+
+/**
+ * Tests {@link MVELAttributeEvaluator}.
+ *
+ * @version $Rev$ $Date$$
+ */
+public class MVELAttributeEvaluatorTest {
+
+    /**
+     * The evaluator to test.
+     */
+    private MVELAttributeEvaluator evaluator;
+
+    /**
+     * The request object to use.
+     */
+    private Request request;
+
+    /**
+     * The application context.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        TilesRequestContextHolder requestHolder = new TilesRequestContextHolder();
+        VariableResolverFactory variableResolverFactory = new ScopeVariableResolverFactory(
+                requestHolder);
+        variableResolverFactory
+                .setNextFactory(new TilesContextVariableResolverFactory(
+                        requestHolder));
+        variableResolverFactory
+                .setNextFactory(new TilesContextBeanVariableResolverFactory(
+                        requestHolder));
+        evaluator = new MVELAttributeEvaluator(requestHolder,
+                variableResolverFactory);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put("object1", "value");
+        sessionScope.put("object2", new Integer(1));
+        applicationScope.put("object3", new Float(2.0));
+        requestScope.put("paulaBean", new PaulaBean());
+        request = createMock(Request.class);
+        expect(request.getContext("request")).andReturn(requestScope)
+                .anyTimes();
+        expect(request.getContext("session")).andReturn(sessionScope)
+                .anyTimes();
+        expect(request.getContext("application")).andReturn(applicationScope)
+                .anyTimes();
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[] { "request", "session", "application" })).anyTimes();
+        applicationContext = createMock(ApplicationContext.class);
+        expect(request.getApplicationContext()).andReturn(
+                applicationContext).anyTimes();
+        replay(request, applicationContext);
+    }
+
+    /**
+     * Tests {@link MVELAttributeEvaluator#evaluate(String, Request)}.
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testEvaluateNull() {
+        evaluator.evaluate((String) null, request);
+        verify(request, applicationContext);
+    }
+
+    /**
+     * Tests
+     * {@link MVELAttributeEvaluator#evaluate(Attribute, Request)}.
+     */
+    @Test
+    public void testEvaluate() {
+        Attribute attribute = new Attribute();
+        attribute.setExpressionObject(new Expression("requestScope.object1"));
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                attribute, request));
+        attribute.setExpressionObject(new Expression("sessionScope.object2"));
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("applicationScope.object3"));
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("object1"));
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                attribute, request));
+        attribute.setExpressionObject(new Expression("object2"));
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("object3"));
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("paulaBean.paula"));
+        assertEquals("The value is not correct", "Brillant", evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("'String literal'"));
+        assertEquals("The value is not correct", "String literal", evaluator
+                .evaluate(attribute, request));
+        attribute.setValue(new Integer(2));
+        assertEquals("The value is not correct", new Integer(2), evaluator
+                .evaluate(attribute, request));
+        attribute.setValue("object1");
+        assertEquals("The value has been evaluated", "object1", evaluator
+                .evaluate(attribute, request));
+        verify(request, applicationContext);
+    }
+
+    /**
+     * Tests {@link MVELAttributeEvaluator#evaluate(String, Request)}.
+     */
+    @Test
+    public void testEvaluateString() {
+        String expression = "requestScope.object1";
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                expression, request));
+        expression = "sessionScope.object2";
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(expression, request));
+        expression = "applicationScope.object3";
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(expression, request));
+        expression = "object1";
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                expression, request));
+        expression = "object2";
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(expression, request));
+        expression = "object3";
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(expression, request));
+        expression = "paulaBean.paula";
+        assertEquals("The value is not correct", "Brillant", evaluator
+                .evaluate(expression, request));
+        expression = "'String literal'";
+        assertEquals("The value is not correct", "String literal", evaluator
+                .evaluate(expression, request));
+        verify(request, applicationContext);
+    }
+
+    /**
+     * This is The Brillant Paula Bean (sic) just like it was posted to:
+     * http://thedailywtf.com/Articles/The_Brillant_Paula_Bean.aspx I hope that
+     * there is no copyright on it.
+     */
+    public static class PaulaBean {
+
+        /**
+         * Paula is brillant, really.
+         */
+        private String paula = "Brillant";
+
+        /**
+         * Returns brillant.
+         *
+         * @return "Brillant".
+         */
+        public String getPaula() {
+            return paula;
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/ReadOnlyVariableResolverFactoryTest.java b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/ReadOnlyVariableResolverFactoryTest.java
new file mode 100644
index 0000000..a1a7e79
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/ReadOnlyVariableResolverFactoryTest.java
@@ -0,0 +1,192 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.mvel;
+
+import java.util.Arrays;
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+import org.mvel2.UnresolveablePropertyException;
+import org.mvel2.integration.VariableResolver;
+import org.mvel2.integration.VariableResolverFactory;
+
+
+/**
+ * Tests {@link ReadOnlyVariableResolverFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ReadOnlyVariableResolverFactoryTest {
+
+    /**
+     * The Tiles request.
+     */
+    private Request request;
+
+    /**
+     * The Tiles application context.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * The object to test.
+     */
+    private ReadOnlyVariableResolverFactory factory;
+
+    /**
+     * Sets up the object.
+     */
+    @Before
+    public void setUp() {
+        request = createMock(Request.class);
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[]{"request", "session", "application"})).anyTimes();
+        TilesRequestContextHolder holder = new TilesRequestContextHolder();
+        holder.setTilesRequestContext(request);
+        applicationContext = createMock(ApplicationContext.class);
+        factory = createMockBuilder(ReadOnlyVariableResolverFactory.class).withConstructor(holder).createMock();
+    }
+
+    /**
+     * Test method for {@link ScopeVariableResolverFactory#createVariable(String, Object)}.
+     */
+    @Test(expected = UnsupportedOperationException.class)
+    public void testCreateVariableStringObject() {
+        replay(factory, request, applicationContext);
+        try {
+            factory.createVariable("myName", "myValue");
+        } finally {
+            verify(factory, request, applicationContext);
+        }
+    }
+
+    /**
+     * Test method for {@link ScopeVariableResolverFactory#createVariable(String, Object)}.
+     */
+    @Test
+    public void testCreateVariableStringObjectNextFactory() {
+        VariableResolverFactory nextFactory = createMock(VariableResolverFactory.class);
+        VariableResolver resolver = createMock(VariableResolver.class);
+
+        expect(nextFactory.createVariable("myName", "myValue")).andReturn(resolver);
+
+        replay(factory, request, applicationContext, nextFactory, resolver);
+        factory.setNextFactory(nextFactory);
+        assertEquals(resolver, factory.createVariable("myName", "myValue"));
+        verify(factory, request, applicationContext, nextFactory, resolver);
+    }
+
+    /**
+     * Test method for {@link ScopeVariableResolverFactory#createVariable(String, Object, Class)}.
+     */
+    @Test(expected = UnsupportedOperationException.class)
+    public void testCreateVariableStringObjectClassOfQ() {
+        replay(factory, request, applicationContext);
+        try {
+            factory.createVariable("myName", "myValue", String.class);
+        } finally {
+            verify(factory, request, applicationContext);
+        }
+    }
+
+    /**
+     * Test method for {@link ScopeVariableResolverFactory#createVariable(String, Object, Class)}.
+     */
+    @Test
+    public void testCreateVariableStringObjectClassNextFactory() {
+        VariableResolverFactory nextFactory = createMock(VariableResolverFactory.class);
+        VariableResolver resolver = createMock(VariableResolver.class);
+
+        expect(nextFactory.createVariable("myName", "myValue", String.class)).andReturn(resolver);
+
+        replay(factory, request, applicationContext, nextFactory, resolver);
+        factory.setNextFactory(nextFactory);
+        assertEquals(resolver, factory.createVariable("myName", "myValue", String.class));
+        verify(factory, request, applicationContext, nextFactory, resolver);
+    }
+
+    /**
+     * Test method for {@link ScopeVariableResolverFactory#isResolveable(String)}.
+     */
+    @Test
+    public void testIsResolveable() {
+        expect(factory.isTarget("whatever")).andReturn(true);
+
+        replay(factory, request, applicationContext);
+        assertTrue(factory.isResolveable("whatever"));
+        verify(factory, request, applicationContext);
+    }
+
+    /**
+     * Test method for {@link ScopeVariableResolverFactory#getVariableResolver(String)}.
+     */
+    @Test
+    public void testGetVariableResolver() {
+        VariableResolverFactory nextFactory = createMock(VariableResolverFactory.class);
+        VariableResolver nextResolver = createMock(VariableResolver.class);
+        VariableResolver requestResolver = createMock(VariableResolver.class);
+        VariableResolver applicationResolver = createMock(VariableResolver.class);
+        expect(nextFactory.getVariableResolver("other")).andReturn(nextResolver);
+        expect(nextFactory.isResolveable("other")).andReturn(true);
+        expect(factory.isTarget("requestScope")).andReturn(true).anyTimes();
+        expect(factory.isTarget("applicationScope")).andReturn(true).anyTimes();
+        expect(factory.isTarget("other")).andReturn(false).anyTimes();
+        expect(factory.createVariableResolver("requestScope")).andReturn(requestResolver);
+        expect(factory.createVariableResolver("applicationScope")).andReturn(applicationResolver);
+
+        replay(factory, request, applicationContext, nextFactory, nextResolver, requestResolver, applicationResolver);
+        factory.setNextFactory(nextFactory);
+        VariableResolver resolver = factory.getVariableResolver("requestScope");
+        assertEquals(requestResolver, resolver);
+        resolver = factory.getVariableResolver("requestScope"); // again to test caching
+        assertEquals(requestResolver, resolver);
+        resolver = factory.getVariableResolver("applicationScope");
+        assertEquals(applicationResolver, resolver);
+        resolver = factory.getVariableResolver("other");
+        assertEquals(nextResolver, resolver);
+        verify(factory, request, applicationContext, nextFactory, nextResolver, requestResolver, applicationResolver);
+    }
+
+    /**
+     * Test method for {@link ScopeVariableResolverFactory#getVariableResolver(String)}.
+     */
+    @Test(expected = UnresolveablePropertyException.class)
+    public void testGetVariableResolverNotResolvable() {
+        VariableResolverFactory nextFactory = createMock(VariableResolverFactory.class);
+
+        expect(factory.isTarget("other")).andReturn(false).anyTimes();
+        expect(nextFactory.isResolveable("other")).andReturn(false);
+
+        replay(factory, request, applicationContext, nextFactory);
+        try {
+            factory.setNextFactory(nextFactory);
+            factory.getVariableResolver("other");
+        } finally {
+            verify(factory, request, applicationContext, nextFactory);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/ReadOnlyVariableResolverTest.java b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/ReadOnlyVariableResolverTest.java
new file mode 100644
index 0000000..0bdb8b3
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/ReadOnlyVariableResolverTest.java
@@ -0,0 +1,90 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.mvel;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import org.apache.tiles.mvel.ReadOnlyVariableResolverFactory.ReadOnlyVariableResolver;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link ReadOnlyVariableResolver}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ReadOnlyVariableResolverTest {
+
+    /**
+     * The resolver to test.
+     */
+    private ReadOnlyVariableResolver resolver;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        resolver = createMockBuilder(ReadOnlyVariableResolver.class).withConstructor("name").createMock();
+    }
+
+    /**
+     * Test method for {@link ReadOnlyVariableResolverFactory.ReadOnlyVariableResolver#getFlags()}.
+     */
+    @Test
+    public void testGetFlags() {
+        replay(resolver);
+        assertEquals(0, resolver.getFlags());
+        verify(resolver);
+    }
+
+    /**
+     * Test method for {@link ReadOnlyVariableResolverFactory.ReadOnlyVariableResolver#getName()}.
+     */
+    @Test
+    public void testGetName() {
+        replay(resolver);
+        assertEquals("name", resolver.getName());
+        verify(resolver);
+    }
+
+    /**
+     * Test method for {@link ReadOnlyVariableResolverFactory.ReadOnlyVariableResolver#setStaticType(java.lang.Class)}.
+     */
+    @Test
+    public void testSetStaticType() {
+        replay(resolver);
+        resolver.setStaticType(Object.class);
+        verify(resolver);
+    }
+
+    /**
+     * Test method for {@link ReadOnlyVariableResolverFactory.ReadOnlyVariableResolver#setValue(java.lang.Object)}.
+     */
+    @Test(expected = UnsupportedOperationException.class)
+    public void testSetValue() {
+        replay(resolver);
+        resolver.setValue("whatever");
+        verify(resolver);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/ScopeVariableResolverFactoryTest.java b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/ScopeVariableResolverFactoryTest.java
new file mode 100644
index 0000000..bb3693c
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/ScopeVariableResolverFactoryTest.java
@@ -0,0 +1,114 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.mvel;
+
+import java.util.Arrays;
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+import org.mvel2.integration.VariableResolver;
+
+
+/**
+ * Tests {@link ScopeVariableResolverFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ScopeVariableResolverFactoryTest {
+
+    /**
+     * The Tiles request.
+     */
+    private Request request;
+
+    /**
+     * The Tiles application context.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * The object to test.
+     */
+    private ScopeVariableResolverFactory factory;
+
+    /**
+     * Sets up the object.
+     */
+    @Before
+    public void setUp() {
+        request = createMock(Request.class);
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[]{"request", "session", "application"})).anyTimes();
+        TilesRequestContextHolder holder = new TilesRequestContextHolder();
+        holder.setTilesRequestContext(request);
+        applicationContext = createMock(ApplicationContext.class);
+        factory = new ScopeVariableResolverFactory(holder);
+    }
+
+    /**
+     * Test method for {@link ScopeVariableResolverFactory#isTarget(String)}.
+     */
+    @Test
+    public void testIsTarget() {
+        replay(request, applicationContext);
+        assertFalse(factory.isTarget("header"));
+        assertTrue(factory.isTarget("requestScope"));
+        assertTrue(factory.isTarget("applicationScope"));
+        assertFalse(factory.isTarget("blah"));
+        verify(request, applicationContext);
+    }
+
+    /**
+     * Test method for {@link ScopeVariableResolverFactory#createVariableResolver(String)}.
+     */
+    @Test
+    public void testCreateVariableResolver() {
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put("one", 1);
+        expect(request.getContext("request")).andReturn(requestScope).times(2);
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        applicationScope.put("two", 2);
+        expect(request.getContext("application")).andReturn(applicationScope);
+
+        replay(request, applicationContext);
+        VariableResolver resolver = factory.createVariableResolver("requestScope");
+        assertEquals(0, resolver.getFlags());
+        assertEquals("requestScope", resolver.getName());
+        assertEquals(Map.class, resolver.getType());
+        assertEquals(requestScope, resolver.getValue());
+        resolver.setStaticType(Object.class); // To complete coverage
+        assertEquals(Map.class, resolver.getType());
+        resolver = factory.createVariableResolver("requestScope"); // again to test caching
+        assertEquals(requestScope, resolver.getValue());
+        resolver = factory.createVariableResolver("applicationScope");
+        assertEquals(applicationScope, resolver.getValue());
+        verify(request, applicationContext);
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactoryTest.java b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactoryTest.java
new file mode 100644
index 0000000..290125e
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/TilesContextBeanVariableResolverFactoryTest.java
@@ -0,0 +1,142 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.mvel;
+
+import java.util.Arrays;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+import org.mvel2.integration.VariableResolver;
+
+/**
+ * Tests {@link TilesContextBeanVariableResolverFactory}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class TilesContextBeanVariableResolverFactoryTest {
+
+    /**
+     * The expected session scope calls.
+     */
+    private static final int EXPECTED_SESSION_CALLS = 3;
+
+    /**
+     * The expected request scope calls.
+     */
+    private static final int EXPECTED_REQUEST_CALLS = 4;
+
+    /**
+     * The Tiles request.
+     */
+    private Request request;
+
+    /**
+     * The Tiles application context.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * The object to test.
+     */
+    private TilesContextBeanVariableResolverFactory factory;
+
+    /**
+     * Sets up the object.
+     */
+    @Before
+    public void setUp() {
+        request = createMock(Request.class);
+        TilesRequestContextHolder holder = new TilesRequestContextHolder();
+        holder.setTilesRequestContext(request);
+        applicationContext = createMock(ApplicationContext.class);
+        factory = new TilesContextBeanVariableResolverFactory(holder);
+    }
+
+    /**
+     * Test method for {@link TilesContextBeanVariableResolverFactory#createVariableResolver(String)}.
+     */
+    @Test
+    public void testCreateVariableResolver() {
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put("one", 1);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        applicationScope.put("two", 2);
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        sessionScope.put("three", "three");
+        expect(request.getContext("session")).andReturn(sessionScope).anyTimes();
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[] { "request", "session", "application" }))
+                .anyTimes();
+        expect(request.getContext("application")).andReturn(applicationScope).anyTimes();
+        replay(request, applicationContext);
+
+        VariableResolver resolver = factory.createVariableResolver("one");
+        assertEquals(1, resolver.getValue());
+        assertEquals(Integer.class, resolver.getType());
+        resolver = factory.createVariableResolver("two");
+        assertEquals(2, resolver.getValue());
+        resolver = factory.createVariableResolver("three");
+        assertEquals("three", resolver.getValue());
+        resolver = factory.createVariableResolver("four");
+        assertEquals(Object.class, resolver.getType());
+        assertNull(resolver.getValue());
+        verify(request, applicationContext);
+    }
+
+    /**
+     * Test method for {@link TilesContextBeanVariableResolverFactory#isTarget(String)}.
+     */
+    @Test
+    public void testIsTarget() {
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put("one", 1);
+        expect(request.getContext("request")).andReturn(requestScope).times(
+                EXPECTED_REQUEST_CALLS);
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        applicationScope.put("two", 2);
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        sessionScope.put("three", "three");
+        expect(request.getContext("session")).andReturn(sessionScope).times(
+                EXPECTED_SESSION_CALLS);
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[] { "request", "session", "application" }))
+                .anyTimes();
+        expect(request.getContext("application")).andReturn(applicationScope).anyTimes();
+        replay(request, applicationContext);
+
+        assertTrue(factory.isTarget("one"));
+        assertTrue(factory.isTarget("two"));
+        assertTrue(factory.isTarget("three"));
+        assertFalse(factory.isTarget("four"));
+        verify(request, applicationContext);
+    }
+}
diff --git a/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/TilesContextVariableResolverFactoryTest.java b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/TilesContextVariableResolverFactoryTest.java
new file mode 100644
index 0000000..0c2219d
--- /dev/null
+++ b/TILES_3_0_X/tiles-mvel/src/test/java/org/apache/tiles/mvel/TilesContextVariableResolverFactoryTest.java
@@ -0,0 +1,118 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.mvel;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.context.TilesRequestContextHolder;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mvel2.integration.VariableResolver;
+
+/**
+ * Tests {@link TilesContextVariableResolverFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesContextVariableResolverFactoryTest {
+
+    /**
+     * The Tiles request.
+     */
+    private Request request;
+
+    /**
+     * The Tiles application context.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * The object to test.
+     */
+    private TilesContextVariableResolverFactory factory;
+
+    /**
+     * Sets up the object.
+     */
+    @Before
+    public void setUp() {
+        request = createMock(Request.class);
+        TilesRequestContextHolder holder = new TilesRequestContextHolder();
+        holder.setTilesRequestContext(request);
+        applicationContext = createMock(ApplicationContext.class);
+        factory = new TilesContextVariableResolverFactory(holder);
+    }
+
+    /**
+     * Tears down the object.
+     */
+    @After
+    public void tearDown() {
+        verify(request, applicationContext);
+    }
+
+    /**
+     * Test method for {@link TilesContextVariableResolverFactory#isTarget(String)}.
+     */
+    @Test
+    public void testIsTarget() {
+        replay(request, applicationContext);
+        assertTrue(factory.isTarget("header"));
+        assertFalse(factory.isTarget("requestScope"));
+        assertTrue(factory.isTarget("applicationScope"));
+        assertFalse(factory.isTarget("blah"));
+    }
+
+    /**
+     * Test method for {@link TilesContextVariableResolverFactory#createVariableResolver(String)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testCreateVariableResolver() {
+        Map<String, String> header = createMock(Map.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put("one", 1);
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        applicationScope.put("two", 2);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope);
+        expect(request.getHeader()).andReturn(header);
+
+        replay(request, applicationContext, header);
+
+        VariableResolver resolver = factory.createVariableResolver("header");
+        assertEquals(Map.class, resolver.getType());
+        assertEquals(header, resolver.getValue());
+        resolver = factory.createVariableResolver("applicationScope");
+        assertEquals(applicationScope, resolver.getValue());
+        assertEquals(Map.class, resolver.getType());
+        verify(header);
+    }
+}
diff --git a/TILES_3_0_X/tiles-ognl/pom.xml b/TILES_3_0_X/tiles-ognl/pom.xml
new file mode 100644
index 0000000..4cef897
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/pom.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>tiles-ognl</artifactId>
+  <packaging>jar</packaging>
+  <name>Tiles - OGNL support</name>
+  <description>Tiles OGNL support: Classes and tag libraries to use OGNL as an expression language in attribute expressions.</description>
+
+  <properties>
+  	<tiles.osgi.symbolicName>org.apache.tiles.ognl</tiles.osgi.symbolicName>
+  </properties>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <excludes>
+          <exclude>LICENSE.txt</exclude>
+          <exclude>NOTICE.txt</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>LICENSE.txt</include>
+          <include>NOTICE.txt</include>
+        </includes>
+        <targetPath>META-INF</targetPath>
+      </resource>
+    </resources>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymockclassextension</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>ognl</groupId>
+      <artifactId>ognl</artifactId>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/AnyScopePropertyAccessor.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/AnyScopePropertyAccessor.java
new file mode 100644
index 0000000..e572f6a
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/AnyScopePropertyAccessor.java
@@ -0,0 +1,97 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.ognl;
+
+import java.util.Map;
+
+import ognl.OgnlContext;
+import ognl.PropertyAccessor;
+
+import org.apache.tiles.request.Request;
+
+/**
+ * Accesses attributes in any scope.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AnyScopePropertyAccessor implements PropertyAccessor {
+
+    @Override
+    public Object getProperty(@SuppressWarnings("rawtypes") Map context, Object target, Object name) {
+        Request request = (Request) target;
+        String attributeName = (String) name;
+        for (String scopeName : request.getAvailableScopes()) {
+            Map<String, Object> scope = request.getContext(scopeName);
+            if (scope.containsKey(attributeName)) {
+                return scope.get(attributeName);
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public String getSourceAccessor(OgnlContext context, Object target,
+            Object index) {
+        Request request = (Request) target;
+        String attributeName = (String) index;
+        for (String scopeName : request.getAvailableScopes()) {
+            Map<String, Object> scope = request.getContext(scopeName);
+            if (scope.containsKey(attributeName)) {
+                return ".getContext(\"" + scopeName + "\").get(index)";
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public String getSourceSetter(OgnlContext context, Object target,
+            Object index) {
+        Request request = (Request) target;
+        String attributeName = (String) index;
+        String[] availableScopes = request.getAvailableScopes().toArray(new String[0]);
+        for (String scopeName : availableScopes) {
+            Map<String, Object> scope = request.getContext(scopeName);
+            if (scope.containsKey(attributeName)) {
+                return ".getContext(\"" + scopeName + "\").put(index, target)";
+            }
+        }
+        return ".getContext(\"" + availableScopes[0] + "\").put(index, target)";
+    }
+
+    @Override
+    public void setProperty(@SuppressWarnings("rawtypes") Map context, Object target, Object name,
+            Object value) {
+        Request request = (Request) target;
+        String attributeName = (String) name;
+        String[] availableScopes = request.getAvailableScopes().toArray(new String[0]);
+        for (String scopeName : availableScopes) {
+            Map<String, Object> scope = request.getContext(scopeName);
+            if (scope.containsKey(attributeName)) {
+                scope.put(attributeName, value);
+                return;
+            }
+        }
+        if (availableScopes.length > 0) {
+            request.getContext(availableScopes[0]).put(attributeName, value);
+        }
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/DelegatePropertyAccessor.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/DelegatePropertyAccessor.java
new file mode 100644
index 0000000..60175e0
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/DelegatePropertyAccessor.java
@@ -0,0 +1,88 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import java.util.Map;
+
+import ognl.OgnlContext;
+import ognl.OgnlException;
+import ognl.PropertyAccessor;
+
+/**
+ * Uses a {@link PropertyAccessorDelegateFactory} to delegate the methods to
+ * another {@link PropertyAccessor}.
+ *
+ * @param <T> The type of the accessed root object.
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class DelegatePropertyAccessor<T> implements PropertyAccessor {
+
+    /**
+     * The property accessor factory.
+     *
+     * @since 2.2.0
+     */
+    private PropertyAccessorDelegateFactory<T> factory;
+
+    /**
+     * Constructor.
+     *
+     * @param factory The property accessor factory.
+     * @since 2.2.0
+     */
+    public DelegatePropertyAccessor(PropertyAccessorDelegateFactory<T> factory) {
+        this.factory = factory;
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    public Object getProperty(@SuppressWarnings("rawtypes") Map context, Object target, Object name)
+            throws OgnlException {
+        return factory.getPropertyAccessor((String) name, (T) target).getProperty(
+                context, target, name);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    public void setProperty(@SuppressWarnings("rawtypes") Map context, Object target, Object name,
+            Object value) throws OgnlException {
+        factory.getPropertyAccessor((String) name, (T) target).setProperty(context,
+                target, name, value);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    public String getSourceAccessor(OgnlContext context, Object target,
+            Object index) {
+        return factory.getPropertyAccessor((String) index, (T) target)
+                .getSourceAccessor(context, target, index);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    public String getSourceSetter(OgnlContext context, Object target,
+            Object index) {
+        return factory.getPropertyAccessor((String) index, (T) target)
+                .getSourceSetter(context, target, index);
+    }
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/NestedObjectDelegatePropertyAccessor.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/NestedObjectDelegatePropertyAccessor.java
new file mode 100644
index 0000000..2d9b50c
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/NestedObjectDelegatePropertyAccessor.java
@@ -0,0 +1,101 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import java.util.Map;
+
+import ognl.OgnlContext;
+import ognl.OgnlException;
+import ognl.PropertyAccessor;
+
+/**
+ * Uses a {@link PropertyAccessor} as a delegate, but passing a nested object as
+ * target.
+ *
+ * @param <T> The root object type from which the target object will be
+ * extracted.
+ * @since 2.2.0
+ * @version $Rev$ $Date$
+ */
+public class NestedObjectDelegatePropertyAccessor<T> implements
+        PropertyAccessor {
+
+    /**
+     * The extractor of the nested object.
+     *
+     * @since 2.2.0
+     */
+    private NestedObjectExtractor<T> nestedObjectExtractor;
+
+    /**
+     * The delegated property accessor.
+     *
+     * @since 2.2.0
+     */
+    private PropertyAccessor propertyAccessor;
+
+    /**
+     * Constructor.
+     *
+     * @param nestedObjectExtractor The extractor of the nested object.
+     * @param propertyAccessor The delegated property accessor.
+     * @since 2.2.0
+     */
+    public NestedObjectDelegatePropertyAccessor(
+            NestedObjectExtractor<T> nestedObjectExtractor,
+            PropertyAccessor propertyAccessor) {
+        this.nestedObjectExtractor = nestedObjectExtractor;
+        this.propertyAccessor = propertyAccessor;
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    public Object getProperty(@SuppressWarnings("rawtypes") Map context, Object target, Object name)
+            throws OgnlException {
+        return propertyAccessor.getProperty(context, nestedObjectExtractor
+                .getNestedObject((T) target), name);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    public void setProperty(@SuppressWarnings("rawtypes") Map context, Object target, Object name,
+            Object value) throws OgnlException {
+        propertyAccessor.setProperty(context, nestedObjectExtractor
+                .getNestedObject((T) target), name, value);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    public String getSourceAccessor(OgnlContext context, Object target,
+            Object index) {
+        return propertyAccessor.getSourceAccessor(context,
+                nestedObjectExtractor.getNestedObject((T) target), index);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    public String getSourceSetter(OgnlContext context, Object target,
+            Object index) {
+        return propertyAccessor.getSourceSetter(context, nestedObjectExtractor
+                .getNestedObject((T) target), index);
+    }
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/NestedObjectExtractor.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/NestedObjectExtractor.java
new file mode 100644
index 0000000..c6888f4
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/NestedObjectExtractor.java
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+/**
+ * Extracts an object using another object as a basis.
+ *
+ * @param <T> The type of the root object.
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface NestedObjectExtractor<T> {
+
+    /**
+     * Extracts the nested object.
+     *
+     * @param obj The root object.
+     * @return The extracted nested object.
+     * @since 2.2.0
+     */
+    Object getNestedObject(T obj);
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/OGNLAttributeEvaluator.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/OGNLAttributeEvaluator.java
new file mode 100644
index 0000000..ee4d896
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/OGNLAttributeEvaluator.java
@@ -0,0 +1,51 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import ognl.Ognl;
+import ognl.OgnlException;
+
+import org.apache.tiles.evaluator.AbstractAttributeEvaluator;
+import org.apache.tiles.evaluator.EvaluationException;
+import org.apache.tiles.request.Request;
+
+/**
+ * Evaluates attribute expressions and expressions with OGNL language.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class OGNLAttributeEvaluator extends AbstractAttributeEvaluator {
+
+    /** {@inheritDoc} */
+    public Object evaluate(String expression, Request request) {
+        if (expression == null) {
+            throw new IllegalArgumentException("The expression parameter cannot be null");
+        }
+        try {
+            return Ognl.getValue(expression, request);
+        } catch (OgnlException e) {
+            throw new EvaluationException("Cannot evaluate OGNL expression '"
+                    + expression + "'", e);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/PropertyAccessorDelegateFactory.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/PropertyAccessorDelegateFactory.java
new file mode 100644
index 0000000..7c619ca
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/PropertyAccessorDelegateFactory.java
@@ -0,0 +1,46 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import ognl.PropertyAccessor;
+
+/**
+ * Decides a {@link PropertyAccessor} depending on the property name and the
+ * object to evaluate.
+ *
+ * @param <T> The type of the root object to evaluate.
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface PropertyAccessorDelegateFactory<T> {
+
+    /**
+     * Returns a prooerty accessor appropriate for the property name and the
+     * object passed.
+     *
+     * @param propertyName The name of the property.
+     * @param obj The root object to evaluate.
+     * @return The appropriate property accessor.
+     * @since 2.2.0
+     */
+    PropertyAccessor getPropertyAccessor(String propertyName, T obj);
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/ScopePropertyAccessor.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/ScopePropertyAccessor.java
new file mode 100644
index 0000000..35f47fe
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/ScopePropertyAccessor.java
@@ -0,0 +1,76 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.ognl;
+
+import java.util.Map;
+
+import ognl.OgnlContext;
+import ognl.PropertyAccessor;
+
+import org.apache.tiles.request.Request;
+
+/**
+ * Accesses a scope.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ScopePropertyAccessor implements PropertyAccessor {
+
+    /**
+     * The length of the scope suffix: "Scope".
+     */
+    static final int SCOPE_SUFFIX_LENGTH = 5;
+
+    @Override
+    public Object getProperty(@SuppressWarnings("rawtypes") Map context, Object target, Object name) {
+        Request request = (Request) target;
+        String scope = (String) name;
+        if (scope.endsWith("Scope")) {
+            String scopeName = scope.substring(0, scope.length() - SCOPE_SUFFIX_LENGTH);
+            return request.getContext(scopeName);
+        }
+        return null;
+    }
+
+    @Override
+    public String getSourceAccessor(OgnlContext context, Object target,
+            Object index) {
+        String scope = (String) index;
+        if (scope.endsWith("Scope")) {
+            String scopeName = scope.substring(0, scope.length() - SCOPE_SUFFIX_LENGTH);
+            return ".getContext(\"" + scopeName + "\")";
+        }
+        return null;
+    }
+
+    @Override
+    public String getSourceSetter(OgnlContext context, Object target,
+            Object index) {
+        return null;
+    }
+
+    @Override
+    public void setProperty(@SuppressWarnings("rawtypes") Map context, Object target, Object name,
+            Object value) {
+        // Does nothing.
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/TilesApplicationContextNestedObjectExtractor.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/TilesApplicationContextNestedObjectExtractor.java
new file mode 100644
index 0000000..7642fa8
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/TilesApplicationContextNestedObjectExtractor.java
@@ -0,0 +1,40 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+
+/**
+ * Extracts the application context from a Tiles request.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class TilesApplicationContextNestedObjectExtractor implements
+        NestedObjectExtractor<Request> {
+
+    /** {@inheritDoc} */
+    public ApplicationContext getNestedObject(Request obj) {
+        return obj.getApplicationContext();
+    }
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/TilesContextPropertyAccessorDelegateFactory.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/TilesContextPropertyAccessorDelegateFactory.java
new file mode 100644
index 0000000..a253f44
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/TilesContextPropertyAccessorDelegateFactory.java
@@ -0,0 +1,112 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import ognl.PropertyAccessor;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.util.CombinedBeanInfo;
+
+/**
+ * Decides the appropriate {@link PropertyAccessor} for the given property name
+ * and {@link Request}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class TilesContextPropertyAccessorDelegateFactory implements
+        PropertyAccessorDelegateFactory<Request> {
+
+    /**
+     * The plain object property accessor, to be used directly for
+     * {@link Request}.
+     */
+    private PropertyAccessor objectPropertyAccessor;
+
+    /**
+     * The application context property accessor.
+     */
+    private PropertyAccessor applicationContextPropertyAccessor;
+
+    /**
+     * The request scope property accessor.
+     */
+    private PropertyAccessor anyScopePropertyAccessor;
+
+    /**
+     * The session scope property accessor.
+     */
+    private PropertyAccessor scopePropertyAccessor;
+
+    /**
+     * The bean info of {@link Request} and
+     * {@link org.apache.tiles.request.ApplicationContext}.
+     */
+    private CombinedBeanInfo beanInfo;
+
+    /**
+     * Constructor.
+     *
+     * @param objectPropertyAccessor The plain object property accessor, to be
+     * used directly for {@link Request}.
+     * @param applicationContextPropertyAccessor The application context
+     * property accessor.
+     * @param anyScopePropertyAccessor The request scope property accessor.
+     * @param scopePropertyAccessor The session scope property accessor.
+     * @since 2.2.0
+     */
+    public TilesContextPropertyAccessorDelegateFactory(
+            PropertyAccessor objectPropertyAccessor,
+            PropertyAccessor applicationContextPropertyAccessor,
+            PropertyAccessor anyScopePropertyAccessor,
+            PropertyAccessor scopePropertyAccessor) {
+        beanInfo = new CombinedBeanInfo(Request.class, ApplicationContext.class);
+        this.objectPropertyAccessor = objectPropertyAccessor;
+        this.applicationContextPropertyAccessor = applicationContextPropertyAccessor;
+        this.anyScopePropertyAccessor = anyScopePropertyAccessor;
+        this.scopePropertyAccessor = scopePropertyAccessor;
+    }
+
+    /** {@inheritDoc} */
+    public PropertyAccessor getPropertyAccessor(String propertyName,
+            Request request) {
+        PropertyAccessor retValue;
+        if (propertyName.endsWith("Scope")) {
+            String scopeName = propertyName.substring(0, propertyName.length()
+                    - ScopePropertyAccessor.SCOPE_SUFFIX_LENGTH);
+            if (request.getContext(scopeName) != null) {
+                return scopePropertyAccessor;
+            }
+        }
+        if (beanInfo.getMappedDescriptors(Request.class)
+                .containsKey(propertyName)) {
+            retValue = objectPropertyAccessor;
+        } else if (beanInfo.getMappedDescriptors(ApplicationContext.class)
+                .containsKey(propertyName)) {
+            retValue = applicationContextPropertyAccessor;
+        } else {
+            return anyScopePropertyAccessor;
+        }
+        return retValue;
+    }
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/package-info.java b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/package-info.java
new file mode 100644
index 0000000..116082c
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/main/java/org/apache/tiles/ognl/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Attribute evaluator classes that can perform OGNL evaluation for attributes.
+ */
+package org.apache.tiles.ognl;
diff --git a/TILES_3_0_X/tiles-ognl/src/site/site.xml b/TILES_3_0_X/tiles-ognl/src/site/site.xml
new file mode 100644
index 0000000..dae4c3f
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - OGNL Support">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/AnyScopePropertyAccessorTest.java b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/AnyScopePropertyAccessorTest.java
new file mode 100644
index 0000000..fb60fac
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/AnyScopePropertyAccessorTest.java
@@ -0,0 +1,162 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.ognl;
+
+import java.util.Arrays;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.Map;
+
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link AnyScopePropertyAccessor}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AnyScopePropertyAccessorTest {
+
+    /**
+     * The accessor to test.
+     */
+    private AnyScopePropertyAccessor accessor;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        accessor = new AnyScopePropertyAccessor();
+    }
+
+    /**
+     * Test method for {@link AnyScopePropertyAccessor#getProperty(java.util.Map, java.lang.Object, java.lang.Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetProperty() {
+        Request request = createMock(Request.class);
+        Map<String, Object> oneScope = createMock(Map.class);
+        Map<String, Object> twoScope = createMock(Map.class);
+
+        expect(request.getAvailableScopes()).andReturn(Arrays.asList(new String[] {"one", "two"})).anyTimes();
+        expect(request.getContext("one")).andReturn(oneScope).anyTimes();
+        expect(request.getContext("two")).andReturn(twoScope).anyTimes();
+        expect(oneScope.containsKey("name1")).andReturn(true);
+        expect(oneScope.get("name1")).andReturn("value1");
+        expect(oneScope.containsKey("name2")).andReturn(false);
+        expect(oneScope.containsKey("name3")).andReturn(false);
+        expect(twoScope.containsKey("name2")).andReturn(true);
+        expect(twoScope.get("name2")).andReturn("value2");
+        expect(twoScope.containsKey("name3")).andReturn(false);
+
+        replay(request, oneScope, twoScope);
+        assertEquals("value1", accessor.getProperty(null, request, "name1"));
+        assertEquals("value2", accessor.getProperty(null, request, "name2"));
+        assertNull(accessor.getProperty(null, request, "name3"));
+        verify(request, oneScope, twoScope);
+    }
+
+    /**
+     * Test method for {@link AnyScopePropertyAccessor#getSourceAccessor(OgnlContext, Object, Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetSourceAccessor() {
+        Request request = createMock(Request.class);
+        Map<String, Object> oneScope = createMock(Map.class);
+        Map<String, Object> twoScope = createMock(Map.class);
+
+        expect(request.getAvailableScopes()).andReturn(Arrays.asList(new String[] {"one", "two"})).anyTimes();
+        expect(request.getContext("one")).andReturn(oneScope).anyTimes();
+        expect(request.getContext("two")).andReturn(twoScope).anyTimes();
+        expect(oneScope.containsKey("name1")).andReturn(true);
+        expect(oneScope.containsKey("name2")).andReturn(false);
+        expect(oneScope.containsKey("name3")).andReturn(false);
+        expect(twoScope.containsKey("name2")).andReturn(true);
+        expect(twoScope.containsKey("name3")).andReturn(false);
+
+        replay(request, oneScope, twoScope);
+        assertEquals(".getContext(\"one\").get(index)", accessor.getSourceAccessor(null, request, "name1"));
+        assertEquals(".getContext(\"two\").get(index)", accessor.getSourceAccessor(null, request, "name2"));
+        assertNull(accessor.getSourceAccessor(null, request, "name3"));
+        verify(request, oneScope, twoScope);
+    }
+
+    /**
+     * Test method for {@link AnyScopePropertyAccessor#getSourceSetter(OgnlContext, Object, Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetSourceSetter() {
+        Request request = createMock(Request.class);
+        Map<String, Object> oneScope = createMock(Map.class);
+        Map<String, Object> twoScope = createMock(Map.class);
+
+        expect(request.getAvailableScopes()).andReturn(Arrays.asList(new String[] {"one", "two"})).anyTimes();
+        expect(request.getContext("one")).andReturn(oneScope).anyTimes();
+        expect(request.getContext("two")).andReturn(twoScope).anyTimes();
+        expect(oneScope.containsKey("name1")).andReturn(true);
+        expect(oneScope.containsKey("name2")).andReturn(false);
+        expect(oneScope.containsKey("name3")).andReturn(false);
+        expect(twoScope.containsKey("name2")).andReturn(true);
+        expect(twoScope.containsKey("name3")).andReturn(false);
+
+        replay(request, oneScope, twoScope);
+        assertEquals(".getContext(\"one\").put(index, target)", accessor.getSourceSetter(null, request, "name1"));
+        assertEquals(".getContext(\"two\").put(index, target)", accessor.getSourceSetter(null, request, "name2"));
+        assertEquals(".getContext(\"one\").put(index, target)", accessor.getSourceSetter(null, request, "name3"));
+        verify(request, oneScope, twoScope);
+    }
+
+    /**
+     * Test method for {@link AnyScopePropertyAccessor#setProperty(Map, Object, Object, Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testSetProperty() {
+        Request request = createMock(Request.class);
+        Map<String, Object> oneScope = createMock(Map.class);
+        Map<String, Object> twoScope = createMock(Map.class);
+
+        expect(request.getAvailableScopes()).andReturn(Arrays.asList(new String[] {"one", "two"})).anyTimes();
+        expect(request.getContext("one")).andReturn(oneScope).anyTimes();
+        expect(request.getContext("two")).andReturn(twoScope).anyTimes();
+        expect(oneScope.containsKey("name1")).andReturn(true);
+        expect(oneScope.put("name1", "otherValue1")).andReturn("value1");
+        expect(oneScope.containsKey("name2")).andReturn(false);
+        expect(oneScope.containsKey("name3")).andReturn(false);
+        expect(twoScope.containsKey("name2")).andReturn(true);
+        expect(twoScope.put("name2", "otherValue2")).andReturn("value2");
+        expect(twoScope.containsKey("name3")).andReturn(false);
+        expect(oneScope.put("name3", "otherValue3")).andReturn(null);
+
+        replay(request, oneScope, twoScope);
+        accessor.setProperty(null, request, "name1", "otherValue1");
+        accessor.setProperty(null, request, "name2", "otherValue2");
+        accessor.setProperty(null, request, "name3", "otherValue3");
+        verify(request, oneScope, twoScope);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/DelegatePropertyAccessorTest.java b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/DelegatePropertyAccessorTest.java
new file mode 100644
index 0000000..bcf9a74
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/DelegatePropertyAccessorTest.java
@@ -0,0 +1,115 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import static org.junit.Assert.*;
+import static org.easymock.classextension.EasyMock.*;
+
+import java.util.Map;
+
+import ognl.OgnlContext;
+import ognl.OgnlException;
+import ognl.PropertyAccessor;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link DelegatePropertyAccessor}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DelegatePropertyAccessorTest {
+
+    /**
+     * Test method for {@link DelegatePropertyAccessor#getProperty(java.util.Map, Object, Object)}.
+     * @throws OgnlException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetProperty() throws OgnlException {
+        PropertyAccessorDelegateFactory<Integer> factory = createMock(PropertyAccessorDelegateFactory.class);
+        PropertyAccessor mockAccessor = createMock(PropertyAccessor.class);
+        Map<String, Object> context = createMock(Map.class);
+        expect(factory.getPropertyAccessor("property", 1)).andReturn(mockAccessor);
+        expect(mockAccessor.getProperty(context, 1, "property")).andReturn("value");
+
+        replay(factory, mockAccessor, context);
+        PropertyAccessor accessor = new DelegatePropertyAccessor<Integer>(factory);
+        assertEquals("value", accessor.getProperty(context, 1, "property"));
+        verify(factory, mockAccessor, context);
+    }
+
+    /**
+     * Test method for {@link DelegatePropertyAccessor#setProperty(java.util.Map, Object, Object, Object)}.
+     * @throws OgnlException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testSetProperty() throws OgnlException {
+        PropertyAccessorDelegateFactory<Integer> factory = createMock(PropertyAccessorDelegateFactory.class);
+        PropertyAccessor mockAccessor = createMock(PropertyAccessor.class);
+        Map<String, Object> context = createMock(Map.class);
+        expect(factory.getPropertyAccessor("property", 1)).andReturn(mockAccessor);
+        mockAccessor.setProperty(context, 1, "property", "value");
+
+        replay(factory, mockAccessor, context);
+        PropertyAccessor accessor = new DelegatePropertyAccessor<Integer>(factory);
+        accessor.setProperty(context, 1, "property", "value");
+        verify(factory, mockAccessor, context);
+    }
+
+    /**
+     * Test method for {@link DelegatePropertyAccessor#getSourceAccessor(ognl.OgnlContext, Object, Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetSourceAccessor() {
+        PropertyAccessorDelegateFactory<Integer> factory = createMock(PropertyAccessorDelegateFactory.class);
+        PropertyAccessor mockAccessor = createMock(PropertyAccessor.class);
+        OgnlContext context = createMock(OgnlContext.class);
+        expect(factory.getPropertyAccessor("property", 1)).andReturn(mockAccessor);
+        expect(mockAccessor.getSourceAccessor(context, 1, "property")).andReturn("method");
+
+        replay(factory, mockAccessor, context);
+        PropertyAccessor accessor = new DelegatePropertyAccessor<Integer>(factory);
+        assertEquals("method", accessor.getSourceAccessor(context, 1, "property"));
+        verify(factory, mockAccessor, context);
+    }
+
+    /**
+     * Test method for {@link DelegatePropertyAccessor#getSourceSetter(ognl.OgnlContext, Object, Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetSourceSetter() {
+        PropertyAccessorDelegateFactory<Integer> factory = createMock(PropertyAccessorDelegateFactory.class);
+        PropertyAccessor mockAccessor = createMock(PropertyAccessor.class);
+        OgnlContext context = createMock(OgnlContext.class);
+        expect(factory.getPropertyAccessor("property", 1)).andReturn(mockAccessor);
+        expect(mockAccessor.getSourceSetter(context, 1, "property")).andReturn("method");
+
+        replay(factory, mockAccessor, context);
+        PropertyAccessor accessor = new DelegatePropertyAccessor<Integer>(factory);
+        assertEquals("method", accessor.getSourceSetter(context, 1, "property"));
+        verify(factory, mockAccessor, context);
+    }
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/NestedObjectDelegatePropertyAccessorTest.java b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/NestedObjectDelegatePropertyAccessorTest.java
new file mode 100644
index 0000000..2931716
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/NestedObjectDelegatePropertyAccessorTest.java
@@ -0,0 +1,120 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import static org.junit.Assert.*;
+import static org.easymock.classextension.EasyMock.*;
+
+import java.util.Map;
+
+import ognl.OgnlContext;
+import ognl.OgnlException;
+import ognl.PropertyAccessor;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link NestedObjectDelegatePropertyAccessor}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class NestedObjectDelegatePropertyAccessorTest {
+
+    /**
+     * Test method for {@link NestedObjectDelegatePropertyAccessor#getProperty(java.util.Map, Object, Object)}.
+     * @throws OgnlException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetProperty() throws OgnlException {
+        NestedObjectExtractor<Integer> nestedObjectExtractor = createMock(NestedObjectExtractor.class);
+        PropertyAccessor propertyAccessor = createMock(PropertyAccessor.class);
+        Map<String, Object> context = createMock(Map.class);
+        expect(propertyAccessor.getProperty(context, "nested", "property")).andReturn("value");
+        expect(nestedObjectExtractor.getNestedObject(1)).andReturn("nested");
+
+        replay(nestedObjectExtractor, propertyAccessor, context);
+        PropertyAccessor accessor = new NestedObjectDelegatePropertyAccessor<Integer>(
+                nestedObjectExtractor, propertyAccessor);
+        assertEquals("value", accessor.getProperty(context, 1, "property"));
+        verify(nestedObjectExtractor, propertyAccessor, context);
+    }
+
+    /**
+     * Test method for {@link NestedObjectDelegatePropertyAccessor#setProperty(java.util.Map, Object, Object, Object)}.
+     * @throws OgnlException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testSetProperty() throws OgnlException {
+        NestedObjectExtractor<Integer> nestedObjectExtractor = createMock(NestedObjectExtractor.class);
+        PropertyAccessor propertyAccessor = createMock(PropertyAccessor.class);
+        Map<String, Object> context = createMock(Map.class);
+        propertyAccessor.setProperty(context, "nested", "property", "value");
+        expect(nestedObjectExtractor.getNestedObject(1)).andReturn("nested");
+
+        replay(nestedObjectExtractor, propertyAccessor, context);
+        PropertyAccessor accessor = new NestedObjectDelegatePropertyAccessor<Integer>(
+                nestedObjectExtractor, propertyAccessor);
+        accessor.setProperty(context, 1, "property", "value");
+        verify(nestedObjectExtractor, propertyAccessor, context);
+    }
+
+    /**
+     * Test method for {@link NestedObjectDelegatePropertyAccessor#getSourceAccessor(ognl.OgnlContext, Object, Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetSourceAccessor() {
+        NestedObjectExtractor<Integer> nestedObjectExtractor = createMock(NestedObjectExtractor.class);
+        PropertyAccessor propertyAccessor = createMock(PropertyAccessor.class);
+        OgnlContext context = createMock(OgnlContext.class);
+        expect(propertyAccessor.getSourceAccessor(context, "nested", "property")).andReturn("method");
+        expect(nestedObjectExtractor.getNestedObject(1)).andReturn("nested");
+
+        replay(nestedObjectExtractor, propertyAccessor, context);
+        PropertyAccessor accessor = new NestedObjectDelegatePropertyAccessor<Integer>(
+                nestedObjectExtractor, propertyAccessor);
+        assertEquals("method", accessor.getSourceAccessor(context, 1, "property"));
+        verify(nestedObjectExtractor, propertyAccessor, context);
+    }
+
+    /**
+     * Test method for {@link NestedObjectDelegatePropertyAccessor#getSourceSetter(ognl.OgnlContext, Object, Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetSourceSetter() {
+        NestedObjectExtractor<Integer> nestedObjectExtractor = createMock(NestedObjectExtractor.class);
+        PropertyAccessor propertyAccessor = createMock(PropertyAccessor.class);
+        OgnlContext context = createMock(OgnlContext.class);
+        expect(propertyAccessor.getSourceSetter(context, "nested", "property")).andReturn("method");
+        expect(nestedObjectExtractor.getNestedObject(1)).andReturn("nested");
+
+        replay(nestedObjectExtractor, propertyAccessor, context);
+        PropertyAccessor accessor = new NestedObjectDelegatePropertyAccessor<Integer>(
+                nestedObjectExtractor, propertyAccessor);
+        assertEquals("method", accessor.getSourceSetter(context, 1, "property"));
+        verify(nestedObjectExtractor, propertyAccessor, context);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/OGNLAttributeEvaluatorTest.java b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/OGNLAttributeEvaluatorTest.java
new file mode 100644
index 0000000..520b9c4
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/OGNLAttributeEvaluatorTest.java
@@ -0,0 +1,225 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.ognl;
+
+import java.util.Arrays;
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import ognl.OgnlException;
+import ognl.OgnlRuntime;
+import ognl.PropertyAccessor;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Expression;
+import org.apache.tiles.evaluator.EvaluationException;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link OGNLAttributeEvaluator}.
+ *
+ * @version $Rev$ $Date$$
+ */
+public class OGNLAttributeEvaluatorTest {
+
+    /**
+     * The evaluator to test.
+     */
+    private OGNLAttributeEvaluator evaluator;
+
+    /**
+     * The request object to use.
+     */
+    private Request request;
+
+    /**
+     * The application context.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * Sets up the test.
+     *
+     * @throws OgnlException If something goes wrong.
+     */
+    @Before
+    public void setUp() throws OgnlException {
+        PropertyAccessor objectPropertyAccessor = OgnlRuntime.getPropertyAccessor(Object.class);
+        PropertyAccessor applicationContextPropertyAccessor =
+            new NestedObjectDelegatePropertyAccessor<Request>(
+                new TilesApplicationContextNestedObjectExtractor(),
+                objectPropertyAccessor);
+        PropertyAccessor anyScopePropertyAccessor = new AnyScopePropertyAccessor();
+        PropertyAccessor scopePropertyAccessor = new ScopePropertyAccessor();
+        PropertyAccessorDelegateFactory<Request> factory = new TilesContextPropertyAccessorDelegateFactory(
+                objectPropertyAccessor, applicationContextPropertyAccessor,
+                anyScopePropertyAccessor, scopePropertyAccessor);
+        PropertyAccessor tilesRequestAccessor = new DelegatePropertyAccessor<Request>(factory);
+        OgnlRuntime.setPropertyAccessor(Request.class, tilesRequestAccessor);
+        evaluator = new OGNLAttributeEvaluator();
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> sessionScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put("object1", "value");
+        sessionScope.put("object2", new Integer(1));
+        applicationScope.put("object3", new Float(2.0));
+        requestScope.put("paulaBean", new PaulaBean());
+        request = createMock(Request.class);
+        expect(request.getContext("request")).andReturn(requestScope)
+                .anyTimes();
+        expect(request.getContext("session")).andReturn(sessionScope)
+                .anyTimes();
+        expect(request.getContext("application")).andReturn(applicationScope)
+                .anyTimes();
+        expect(request.getAvailableScopes()).andReturn(
+                Arrays.asList(new String[] { "request", "session", "application" })).anyTimes();
+        applicationContext = createMock(ApplicationContext.class);
+        expect(request.getApplicationContext()).andReturn(
+                applicationContext).anyTimes();
+        expect(applicationContext.getApplicationScope()).andReturn(
+                applicationScope).anyTimes();
+        replay(request, applicationContext);
+    }
+
+    /**
+     * Tears down the test.
+     */
+    @After
+    public void tearDown() {
+        verify(request, applicationContext);
+    }
+
+    /**
+     * Tests
+     * {@link OGNLAttributeEvaluator#evaluate(Attribute, Request)}.
+     */
+    @Test
+    public void testEvaluate() {
+        Attribute attribute = new Attribute();
+        attribute.setExpressionObject(new Expression("requestScope.object1"));
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                attribute, request));
+        attribute.setExpressionObject(new Expression("sessionScope.object2"));
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("applicationScope.object3"));
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("object1"));
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                attribute, request));
+        attribute.setExpressionObject(new Expression("object2"));
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("object3"));
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("paulaBean.paula"));
+        assertEquals("The value is not correct", "Brillant", evaluator
+                .evaluate(attribute, request));
+        attribute.setExpressionObject(new Expression("'String literal'"));
+        assertEquals("The value is not correct", "String literal", evaluator
+                .evaluate(attribute, request));
+        attribute.setValue(new Integer(2));
+        assertEquals("The value is not correct", new Integer(2), evaluator
+                .evaluate(attribute, request));
+        attribute.setValue("object1");
+        assertEquals("The value has been evaluated", "object1", evaluator
+                .evaluate(attribute, request));
+    }
+
+    /**
+     * Tests {@link OGNLAttributeEvaluator#evaluate(String, Request)}.
+     */
+    @Test
+    public void testEvaluateString() {
+        String expression = "requestScope.object1";
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                expression, request));
+        expression = "sessionScope.object2";
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(expression, request));
+        expression = "applicationScope.object3";
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(expression, request));
+        expression = "object1";
+        assertEquals("The value is not correct", "value", evaluator.evaluate(
+                expression, request));
+        expression = "object2";
+        assertEquals("The value is not correct", new Integer(1), evaluator
+                .evaluate(expression, request));
+        expression = "object3";
+        assertEquals("The value is not correct", new Float(2.0), evaluator
+                .evaluate(expression, request));
+        expression = "paulaBean.paula";
+        assertEquals("The value is not correct", "Brillant", evaluator
+                .evaluate(expression, request));
+        expression = "'String literal'";
+        assertEquals("The value is not correct", "String literal", evaluator
+                .evaluate(expression, request));
+    }
+
+    /**
+     * Tests {@link OGNLAttributeEvaluator#evaluate(String, Request)}.
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testEvaluateNull() {
+        evaluator.evaluate((String) null, request);
+    }
+
+    /**
+     * Tests {@link OGNLAttributeEvaluator#evaluate(String, Request)}.
+     */
+    @Test(expected = EvaluationException.class)
+    public void testEvaluateOgnlException() {
+        evaluator.evaluate("wrong|||!!!!yes###", request);
+    }
+
+    /**
+     * This is The Brillant Paula Bean (sic) just like it was posted to:
+     * http://thedailywtf.com/Articles/The_Brillant_Paula_Bean.aspx I hope that
+     * there is no copyright on it.
+     */
+    public static class PaulaBean {
+
+        /**
+         * Paula is brillant, really.
+         */
+        private String paula = "Brillant";
+
+        /**
+         * Returns brillant.
+         *
+         * @return "Brillant".
+         */
+        public String getPaula() {
+            return paula;
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/ScopePropertyAccessorTest.java b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/ScopePropertyAccessorTest.java
new file mode 100644
index 0000000..3bbc58c
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/ScopePropertyAccessorTest.java
@@ -0,0 +1,101 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.ognl;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.Map;
+
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link ScopePropertyAccessor}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ScopePropertyAccessorTest {
+
+    /**
+     * The accessor to test.
+     */
+    private ScopePropertyAccessor accessor;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        accessor = new ScopePropertyAccessor();
+    }
+
+    /**
+     * Test method for {@link ScopePropertyAccessor#getProperty(Map, Object, Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetProperty() {
+        Request request = createMock(Request.class);
+        Map<String, Object> oneScope = createMock(Map.class);
+
+        expect(request.getContext("one")).andReturn(oneScope);
+
+        replay(request);
+        assertEquals(oneScope, accessor.getProperty(null, request, "oneScope"));
+        assertNull(accessor.getProperty(null, request, "whatever"));
+        verify(request);
+    }
+
+    /**
+     * Test method for {@link ScopePropertyAccessor#getSourceAccessor(OgnlContext, Object, Object)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetSourceAccessor() {
+        Request request = createMock(Request.class);
+        @SuppressWarnings("unused")
+        Map<String, Object> oneScope = createMock(Map.class);
+
+        replay(request);
+        assertEquals(".getContext(\"one\")", accessor.getSourceAccessor(null, request, "oneScope"));
+        assertNull(accessor.getSourceAccessor(null, request, "whatever"));
+        verify(request);
+    }
+
+    /**
+     * Test method for {@link ScopePropertyAccessor#getSourceSetter(OgnlContext, Object, Object)}.
+     */
+    @Test
+    public void testGetSourceSetter() {
+        assertNull(accessor.getSourceSetter(null, null, "whatever"));
+    }
+
+    /**
+     * Test method for {@link ScopePropertyAccessor#setProperty(Map, Object, Object, Object)}.
+     */
+    @Test
+    public void testSetProperty() {
+        accessor.setProperty(null, null, "whatever", "whateverValue");
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/TilesApplicationContextNestedObjectExtractorTest.java b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/TilesApplicationContextNestedObjectExtractorTest.java
new file mode 100644
index 0000000..6fc1bb3
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/TilesApplicationContextNestedObjectExtractorTest.java
@@ -0,0 +1,52 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesApplicationContextNestedObjectExtractor}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesApplicationContextNestedObjectExtractorTest {
+
+    /**
+     * Tests {@link TilesApplicationContextNestedObjectExtractor#getNestedObject(Request)}.
+     */
+    @Test
+    public void testGetNestedObject() {
+        Request request = createMock(Request.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+
+        replay(request, applicationContext);
+        NestedObjectExtractor<Request> extractor = new TilesApplicationContextNestedObjectExtractor();
+        assertEquals(applicationContext, extractor.getNestedObject(request));
+        verify(request, applicationContext);
+    }
+}
diff --git a/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/TilesContextPropertyAccessorDelegateFactoryTest.java b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/TilesContextPropertyAccessorDelegateFactoryTest.java
new file mode 100644
index 0000000..66bfff0
--- /dev/null
+++ b/TILES_3_0_X/tiles-ognl/src/test/java/org/apache/tiles/ognl/TilesContextPropertyAccessorDelegateFactoryTest.java
@@ -0,0 +1,202 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.ognl;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import ognl.PropertyAccessor;
+
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesContextPropertyAccessorDelegateFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesContextPropertyAccessorDelegateFactoryTest {
+
+    /**
+     * Test method for
+     * {@link TilesContextPropertyAccessorDelegateFactory#getPropertyAccessor(String, Request)}
+     * .
+     */
+    @Test
+    public void testGetPropertyAccessorRequest() {
+        PropertyAccessor objectPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationContextPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor requestScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor sessionScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationScopePropertyAccessor = createMock(PropertyAccessor.class);
+        Request request = createMock(Request.class);
+
+        replay(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request);
+        PropertyAccessorDelegateFactory<Request> factory = new TilesContextPropertyAccessorDelegateFactory(
+                objectPropertyAccessor, applicationContextPropertyAccessor,
+                requestScopePropertyAccessor, sessionScopePropertyAccessor);
+        assertEquals(objectPropertyAccessor, factory.getPropertyAccessor("writer", request));
+
+        verify(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextPropertyAccessorDelegateFactory#getPropertyAccessor(String, Request)}
+     * .
+     */
+    @Test
+    public void testGetPropertyAccessorApplication() {
+        PropertyAccessor objectPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationContextPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor requestScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor sessionScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationScopePropertyAccessor = createMock(PropertyAccessor.class);
+        Request request = createMock(Request.class);
+
+        replay(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request);
+        PropertyAccessorDelegateFactory<Request> factory = new TilesContextPropertyAccessorDelegateFactory(
+                objectPropertyAccessor, applicationContextPropertyAccessor,
+                requestScopePropertyAccessor, sessionScopePropertyAccessor);
+        assertEquals(applicationContextPropertyAccessor, factory.getPropertyAccessor("initParams", request));
+
+        verify(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextPropertyAccessorDelegateFactory#getPropertyAccessor(String, Request)}
+     * .
+     */
+    @Test
+    public void testGetPropertyAccessorRequestScope() {
+        PropertyAccessor objectPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationContextPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor requestScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor sessionScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationScopePropertyAccessor = createMock(PropertyAccessor.class);
+        Request request = createMock(Request.class);
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("attribute", 1);
+
+        replay(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request);
+        PropertyAccessorDelegateFactory<Request> factory = new TilesContextPropertyAccessorDelegateFactory(
+                objectPropertyAccessor, applicationContextPropertyAccessor,
+                requestScopePropertyAccessor, sessionScopePropertyAccessor);
+        assertEquals(requestScopePropertyAccessor, factory.getPropertyAccessor("attribute", request));
+
+        verify(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextPropertyAccessorDelegateFactory#getPropertyAccessor(String, Request)}
+     * .
+     */
+    @Test
+    public void testGetPropertyAccessorSessionScope() {
+        PropertyAccessor objectPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationContextPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor requestScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor sessionScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationScopePropertyAccessor = createMock(PropertyAccessor.class);
+        Request request = createMock(Request.class);
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("attribute", 1);
+
+        replay(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request);
+        PropertyAccessorDelegateFactory<Request> factory = new TilesContextPropertyAccessorDelegateFactory(
+                objectPropertyAccessor, applicationContextPropertyAccessor,
+                requestScopePropertyAccessor, sessionScopePropertyAccessor);
+        assertEquals(requestScopePropertyAccessor, factory.getPropertyAccessor("attribute", request));
+
+        verify(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextPropertyAccessorDelegateFactory#getPropertyAccessor(String, Request)}
+     * .
+     */
+    @Test
+    public void testGetPropertyAccessorApplicationScope() {
+        PropertyAccessor objectPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationContextPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor requestScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor sessionScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationScopePropertyAccessor = createMock(PropertyAccessor.class);
+        Request request = createMock(Request.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("attribute", 1);
+
+        replay(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request, applicationContext);
+        PropertyAccessorDelegateFactory<Request> factory = new TilesContextPropertyAccessorDelegateFactory(
+                objectPropertyAccessor, applicationContextPropertyAccessor,
+                requestScopePropertyAccessor, sessionScopePropertyAccessor);
+        assertEquals(requestScopePropertyAccessor, factory.getPropertyAccessor("attribute", request));
+
+        verify(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request, applicationContext);
+    }
+
+    /**
+     * Test method for
+     * {@link TilesContextPropertyAccessorDelegateFactory#getPropertyAccessor(String, Request)}
+     * .
+     */
+    @Test
+    public void testGetPropertyAccessorRequestScopeDefault() {
+        PropertyAccessor objectPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationContextPropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor requestScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor sessionScopePropertyAccessor = createMock(PropertyAccessor.class);
+        PropertyAccessor applicationScopePropertyAccessor = createMock(PropertyAccessor.class);
+        Request request = createMock(Request.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("anotherAttribute", 1);
+
+        replay(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request, applicationContext);
+        PropertyAccessorDelegateFactory<Request> factory = new TilesContextPropertyAccessorDelegateFactory(
+                objectPropertyAccessor, applicationContextPropertyAccessor,
+                requestScopePropertyAccessor, sessionScopePropertyAccessor);
+        assertEquals(requestScopePropertyAccessor, factory.getPropertyAccessor("attribute", request));
+
+        verify(objectPropertyAccessor, applicationContextPropertyAccessor, requestScopePropertyAccessor,
+                sessionScopePropertyAccessor, applicationScopePropertyAccessor, request, applicationContext);
+    }
+}
diff --git a/TILES_3_0_X/tiles-servlet/pom.xml b/TILES_3_0_X/tiles-servlet/pom.xml
new file mode 100644
index 0000000..37e77eb
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/pom.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>org.apache.tiles</groupId>
+    <artifactId>tiles-parent</artifactId>
+    <version>3.0.1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>tiles-servlet</artifactId>
+  <packaging>jar</packaging>
+  <name>Tiles - Servlet support</name>
+  <description>Tiles servlet support, to enable use of Tiles inside a Servlet environment.
+  </description>
+
+  <properties>
+      <tiles.osgi.symbolicName>org.apache.tiles.servlet</tiles.osgi.symbolicName>
+  </properties>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <excludes>
+          <exclude>LICENSE.txt</exclude>
+          <exclude>NOTICE.txt</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>LICENSE.txt</include>
+          <include>NOTICE.txt</include>
+        </includes>
+        <targetPath>META-INF</targetPath>
+      </resource>
+    </resources>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>net.sf.dtddoc</groupId>
+        <artifactId>dtddoc-maven-plugin</artifactId>
+        <version>1.1</version>
+        <configuration>
+          <docTitle>Tiles Definition File</docTitle>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymockclassextension</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shale</groupId>
+      <artifactId>shale-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+        <groupId>org.apache.tiles</groupId>
+        <artifactId>tiles-request-servlet</artifactId>
+        <version>${tiles.request.version}</version>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/AbstractTilesInitializerServlet.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/AbstractTilesInitializerServlet.java
new file mode 100644
index 0000000..b4d2558
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/AbstractTilesInitializerServlet.java
@@ -0,0 +1,73 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.startup;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServlet;
+
+import org.apache.tiles.request.servlet.ServletApplicationContext;
+import org.apache.tiles.startup.TilesInitializer;
+import org.apache.tiles.web.util.ServletContextAdapter;
+
+/**
+ * Abstract Initialization Servlet. Uses a {@link TilesInitializer}, created by
+ * {@link #createTilesInitializer()} to initialize Tiles.
+ *
+ * @deprecated use {@link AbstractTilesListener} instead.
+ * @see org.apache.tiles.web.startup.TilesListener
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+@Deprecated
+public abstract class AbstractTilesInitializerServlet extends HttpServlet {
+
+    /**
+     * The private listener instance, that is used to initialize Tiles
+     * container.
+     */
+    private TilesInitializer initializer;
+
+    /** {@inheritDoc} */
+    @Override
+    public void destroy() {
+        initializer.destroy();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void init() {
+        initializer = createTilesInitializer();
+        ServletContext adaptedContext = new ServletContextAdapter(
+                getServletConfig());
+        ServletApplicationContext preliminaryContext = new ServletApplicationContext(
+                adaptedContext);
+        initializer.initialize(preliminaryContext);
+    }
+
+    /**
+     * Creates a new instance of {@link TilesInitializer}. Implement it to use
+     * your custom initializer.
+     *
+     * @return The Tiles servlet-based initializer.
+     * @since 2.2.0
+     */
+    protected abstract TilesInitializer createTilesInitializer();
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/AbstractTilesListener.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/AbstractTilesListener.java
new file mode 100644
index 0000000..40a8b24
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/AbstractTilesListener.java
@@ -0,0 +1,74 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.startup;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.apache.tiles.request.servlet.ServletApplicationContext;
+import org.apache.tiles.startup.TilesInitializer;
+
+/**
+ * Listener for the initialization of the Tiles container.
+ *
+ * @version $Rev$ $Date$
+ */
+public abstract class AbstractTilesListener implements ServletContextListener {
+
+    /**
+     * The initializer object.
+     *
+     * @since 2.1.2
+     */
+    protected TilesInitializer initializer;
+
+    /**
+     * Initialize the TilesContainer and place it
+     * into service.
+     *
+     * @param event The intercepted event.
+     */
+    public void contextInitialized(ServletContextEvent event) {
+        ServletContext servletContext = event.getServletContext();
+        initializer = createTilesInitializer();
+        initializer.initialize(new ServletApplicationContext(
+                servletContext));
+    }
+
+    /**
+     * Destroys the initializer.
+     *
+     * @param event The intercepted event.
+     */
+    public void contextDestroyed(ServletContextEvent event) {
+        initializer.destroy();
+    }
+
+    /**
+     * Creates a new instance of {@link TilesInitializer}. Implement it to use a
+     * different initializer.
+     *
+     * @return The Tiles servlet-based initializer.
+     * @since 2.2.0
+     */
+    protected abstract TilesInitializer createTilesInitializer();
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/package-info.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/package-info.java
new file mode 100644
index 0000000..6dc2fd3
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id: package-info.java 1049711 2010-12-15 21:12:00Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes to start the Tiles engine up in a web environment.
+ */
+package org.apache.tiles.web.startup;
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/simple/SimpleTilesInitializerServlet.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/simple/SimpleTilesInitializerServlet.java
new file mode 100644
index 0000000..0159db3
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/simple/SimpleTilesInitializerServlet.java
@@ -0,0 +1,43 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.web.startup.simple;
+
+import org.apache.tiles.startup.DefaultTilesInitializer;
+import org.apache.tiles.startup.TilesInitializer;
+import org.apache.tiles.web.startup.AbstractTilesInitializerServlet;
+
+/**
+ * A Tiles listener that loads Tiles in the default way.
+ *
+ * @deprecated use {@link SimpleTilesListener} instead.
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+@Deprecated
+public class SimpleTilesInitializerServlet extends AbstractTilesInitializerServlet {
+
+    /** {@inheritDoc} */
+    @Override
+    protected TilesInitializer createTilesInitializer() {
+        return new DefaultTilesInitializer();
+    }
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/simple/SimpleTilesListener.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/simple/SimpleTilesListener.java
new file mode 100644
index 0000000..6474b8e
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/simple/SimpleTilesListener.java
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.web.startup.simple;
+
+import org.apache.tiles.startup.DefaultTilesInitializer;
+import org.apache.tiles.startup.TilesInitializer;
+import org.apache.tiles.web.startup.AbstractTilesListener;
+
+/**
+ * A Tiles listener that loads Tiles in the default way.
+ *
+ * @version $Rev$ $Date$ù
+ * @since 2.2.0
+ */
+public class SimpleTilesListener extends AbstractTilesListener {
+
+    /** {@inheritDoc} */
+    @Override
+    protected TilesInitializer createTilesInitializer() {
+        return new DefaultTilesInitializer();
+    }
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/simple/package-info.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/simple/package-info.java
new file mode 100644
index 0000000..68f96c2
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/startup/simple/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id: package-info.java 1049711 2010-12-15 21:12:00Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes to start the Tiles engine up in a web environment using the default settings.
+ */
+package org.apache.tiles.web.startup.simple;
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/AttributeContextMutator.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/AttributeContextMutator.java
new file mode 100644
index 0000000..2e96a71
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/AttributeContextMutator.java
@@ -0,0 +1,45 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.util;
+
+import org.apache.tiles.AttributeContext;
+
+import javax.servlet.ServletRequest;
+
+/**
+ * It represents an object able to manipulate a <code>AttributeContext</code>.
+ * In other words, it is able to add, replace and remove attributes from the
+ * <code>AttributeContext</code>.
+ *
+ * @since Tiles 2.0
+ * @version $Rev$ $Date$
+ */
+public interface AttributeContextMutator {
+
+    /**
+     * Mutate a <code>AttributeContext</code>.
+     *
+     * @param context The attribute context to mutate.
+     * @param request The current servlet request.
+     */
+    void mutate(AttributeContext context, ServletRequest request);
+
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/ServletContextAdapter.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/ServletContextAdapter.java
new file mode 100644
index 0000000..4d8fe91
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/ServletContextAdapter.java
@@ -0,0 +1,209 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.util;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Set;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+/**
+ * Adapts a servlet config and a servlet context to become a unique servlet
+ * context.
+ *
+ * @version $Rev$ $Date$
+ */
+@SuppressWarnings("deprecation")
+public class ServletContextAdapter implements ServletContext {
+
+    /**
+     * The root context to use.
+     */
+    private ServletContext rootContext;
+
+    /**
+     * The union of init parameters of {@link ServletConfig} and
+     * {@link ServletContext}.
+     */
+    private Hashtable<String, String> initParameters;
+
+
+    /**
+     * Constructor.
+     *
+     * @param config The servlet configuration object.
+     */
+    @SuppressWarnings("unchecked")
+    public ServletContextAdapter(ServletConfig config) {
+        this.rootContext = config.getServletContext();
+        initParameters = new Hashtable<String, String>();
+        Enumeration<String> enumeration = rootContext
+                .getInitParameterNames();
+        while (enumeration.hasMoreElements()) {
+            String paramName = enumeration.nextElement();
+            initParameters.put(paramName, rootContext
+                    .getInitParameter(paramName));
+        }
+        enumeration = config.getInitParameterNames();
+        while (enumeration.hasMoreElements()) {
+            String paramName = enumeration.nextElement();
+            initParameters.put(paramName, config.getInitParameter(paramName));
+        }
+    }
+
+    /** {@inheritDoc} */
+    public ServletContext getContext(String string) {
+        return rootContext.getContext(string);
+    }
+
+    /** {@inheritDoc} */
+    public int getMajorVersion() {
+        return rootContext.getMajorVersion();
+    }
+
+    /** {@inheritDoc} */
+    public int getMinorVersion() {
+        return rootContext.getMinorVersion();
+    }
+
+    /** {@inheritDoc} */
+    public String getMimeType(String string) {
+        return rootContext.getMimeType(string);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings({ "rawtypes" })
+    public Set getResourcePaths(String string) {
+        return rootContext.getResourcePaths(string);
+    }
+
+    /** {@inheritDoc} */
+    public URL getResource(String string) throws MalformedURLException {
+        return rootContext.getResource(string);
+    }
+
+    /** {@inheritDoc} */
+    public InputStream getResourceAsStream(String string) {
+        return rootContext.getResourceAsStream(string);
+    }
+
+    /** {@inheritDoc} */
+    public RequestDispatcher getRequestDispatcher(String string) {
+        return rootContext.getRequestDispatcher(string);
+    }
+
+    /** {@inheritDoc} */
+    public RequestDispatcher getNamedDispatcher(String string) {
+        return rootContext.getNamedDispatcher(string);
+    }
+
+    /** {@inheritDoc} */
+    public Servlet getServlet(String string) throws ServletException {
+        return rootContext.getServlet(string);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("rawtypes")
+    public Enumeration getServlets() {
+        return rootContext.getServlets();  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("rawtypes")
+    public Enumeration getServletNames() {
+        return rootContext.getServletNames();
+    }
+
+    /** {@inheritDoc} */
+    public void log(String string) {
+        rootContext.log(string);
+    }
+
+    /** {@inheritDoc} */
+    public void log(Exception exception, String string) {
+        rootContext.log(exception, string);
+    }
+
+    /** {@inheritDoc} */
+    public void log(String string, Throwable throwable) {
+        rootContext.log(string, throwable);
+    }
+
+    /** {@inheritDoc} */
+    public String getRealPath(String string) {
+        return rootContext.getRealPath(string);
+    }
+
+    /** {@inheritDoc} */
+    public String getServerInfo() {
+        return rootContext.getServerInfo();
+    }
+
+    /** {@inheritDoc} */
+    public String getInitParameter(String string) {
+        return initParameters.get(string);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("rawtypes")
+    public Enumeration getInitParameterNames() {
+        return initParameters.keys();
+    }
+
+    /** {@inheritDoc} */
+    public Object getAttribute(String string) {
+        return rootContext.getAttribute(string);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("rawtypes")
+    public Enumeration getAttributeNames() {
+        return rootContext.getAttributeNames();
+    }
+
+    /** {@inheritDoc} */
+    public void setAttribute(String string, Object object) {
+        rootContext.setAttribute(string, object);
+    }
+
+    /** {@inheritDoc} */
+    public void removeAttribute(String string) {
+        rootContext.removeAttribute(string);
+    }
+
+    /** {@inheritDoc} */
+    public String getServletContextName() {
+        return rootContext.getServletContextName();
+    }
+
+    /** {@inheritDoc} */
+    public String getContextPath() {
+        return rootContext.getContextPath();
+    }
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDecorationFilter.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDecorationFilter.java
new file mode 100644
index 0000000..35cbbfb
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDecorationFilter.java
@@ -0,0 +1,296 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.util;
+
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.reflect.CannotInstantiateObjectException;
+import org.apache.tiles.request.reflect.ClassUtil;
+import org.apache.tiles.request.servlet.ServletRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Decoration Filter.  Intercepts all requests and decorates them
+ * with the configured definition.
+ * <p/>
+ * For example, given the following config:
+ * &lt;xmp&gt;
+ * &lt;filter&gt;
+ * &lt;filter-name&gt;Tiles Decoration Filter&lt;/filter-name&gt;
+ * &lt;filter-class&gt;org.apache.tiles.web.TilesDecorationFilter&lt;/filter-class&gt;
+ * &lt;init-param&gt;
+ * &lt;param-name&gt;definition&lt;/param-name&gt;
+ * &lt;param-value&gt;test.definition&lt;/param-value&gt;
+ * &lt;/init-param&gt;
+ * &lt;init-param&gt;
+ * &lt;param-name&gt;attribute-name&lt;/param-name&gt;
+ * &lt;param-value&gt;body&lt;/param-value&gt;
+ * &lt;/init-param&gt;
+ * &lt;init-param&gt;
+ * &lt;param-name&gt;prevent-token&lt;/param-name&gt;
+ * &lt;param-value&gt;layout&lt;/param-value&gt;
+ * &lt;/init-param&gt;
+ * &lt;/filter&gt;
+ * <p/>
+ * &lt;filter-mapping&gt;
+ * &lt;filter-name&gt;Tiles Decoration Filter&lt;/filter-name&gt;
+ * &lt;url-pattern&gt;/testdecorationfilter.jsp&lt;/url-pattern&gt;
+ * &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
+ * &lt;/filter-mapping&gt;
+ * &lt;/xmp&gt;
+ * The filter will intercept all requests to the indicated url pattern
+ * store the initial request path as the "body"  attribute and then render the
+ * "test.definition" definition.  The filter will only redecorate those requests
+ * which do not contain the request attribute associated with the prevent token
+ * "layout".
+ */
+public class TilesDecorationFilter implements Filter {
+
+    /**
+     * Init parameter to define the key of the container to use.
+     *
+     * @since 2.1.2
+     */
+    public static final String CONTAINER_KEY_INIT_PARAMETER =
+        "org.apache.tiles.web.util.TilesDecorationFilter.CONTAINER_KEY";
+
+    /**
+     * The logging object.
+     */
+    private Logger log = LoggerFactory.getLogger(TilesDecorationFilter.class);
+
+    /**
+     * Filter configuration.
+     */
+    private FilterConfig filterConfig;
+
+    /**
+     * The key under which the container is stored.
+     */
+    private String containerKey;
+
+    /**
+     * The name of the definition attribute used to
+     * pass on the request.
+     */
+    private String definitionAttributeName = "content";
+
+    /**
+     * The definition name to use.
+     */
+    private String definitionName = "layout";
+
+    /**
+     * Token used to prevent re-decoration of requests.
+     * This token is used to prevent infinate loops on
+     * filters configured to match wildcards.
+     */
+    private String preventDecorationToken;
+
+    /**
+     * Stores a map of the type "mask -> definition": when a definition name
+     * mask is identified, it is substituted with the configured definition.
+     */
+    private Map<String, String> alternateDefinitions;
+
+    /**
+     * The object that will mutate the attribute context so that it uses
+     * different attributes.
+     */
+    private AttributeContextMutator mutator = null;
+
+    /**
+     * The servlet context.
+     */
+    private ServletContext servletContext;
+
+    /** {@inheritDoc} */
+    public void init(FilterConfig config) throws ServletException {
+        filterConfig = config;
+        servletContext = filterConfig.getServletContext();
+
+        containerKey = filterConfig
+                .getInitParameter(CONTAINER_KEY_INIT_PARAMETER);
+
+        String temp = config.getInitParameter("attribute-name");
+        if (temp != null) {
+            definitionAttributeName = temp;
+        }
+
+        temp = config.getInitParameter("definition");
+        if (temp != null) {
+            definitionName = temp;
+        }
+
+        temp = config.getInitParameter("prevent-token");
+        preventDecorationToken = "org.apache.tiles.decoration.PREVENT:"
+                + (temp == null ? definitionName : temp);
+
+        alternateDefinitions = parseAlternateDefinitions();
+
+        temp = config.getInitParameter("mutator");
+        if (temp != null) {
+            try {
+                mutator = (AttributeContextMutator) ClassUtil.instantiate(temp);
+            } catch (CannotInstantiateObjectException e) {
+                throw new ServletException("Unable to instantiate specified context mutator.", e);
+            }
+        } else {
+            mutator = new DefaultMutator();
+        }
+    }
+
+    /**
+     * Creates the alternate definitions map, to map a mask of definition names
+     * to a configured definition.
+     *
+     * @return The alternate definitions map.
+     */
+    @SuppressWarnings("unchecked")
+    protected Map<String, String> parseAlternateDefinitions() {
+        Map<String, String> map = new HashMap<String, String>();
+        Enumeration<String> e = filterConfig.getInitParameterNames();
+        while (e.hasMoreElements()) {
+            String parm = e.nextElement();
+            if (parm.startsWith("definition(") && parm.endsWith("*)")) {
+                String value = filterConfig.getInitParameter(parm);
+                String mask = parm.substring("definition(".length());
+                mask = mask.substring(0, mask.lastIndexOf("*)"));
+                map.put(mask, value);
+                log.info("Mapping all requests matching '" + mask
+                        + "*' to definition '" + value + "'");
+            }
+        }
+        return map;
+    }
+
+    /** {@inheritDoc} */
+    public void destroy() {
+        filterConfig = null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void doFilter(javax.servlet.ServletRequest req, ServletResponse res, FilterChain filterChain)
+            throws IOException, ServletException {
+        // If the request contains the prevent token, we must not reapply the definition.
+        // This is used to ensure that filters mapped to wild cards do not infinately
+        // loop.
+        if (!isPreventTokenPresent(req)) {
+            ApplicationContext applicationContext = org.apache.tiles.request.servlet.ServletUtil
+                    .getApplicationContext(servletContext);
+            Request request = new ServletRequest(applicationContext,
+                    (HttpServletRequest) req, (HttpServletResponse) res);
+            TilesContainer container = TilesAccess.getContainer(applicationContext,
+                    containerKey);
+            mutator.mutate(container.getAttributeContext(request), req);
+            if (preventDecorationToken != null) {
+                req.setAttribute(preventDecorationToken, Boolean.TRUE);
+            }
+            String definitionName = getDefinitionForRequest(req);
+            container.render(definitionName, request);
+        }
+        filterChain.doFilter(req, res);
+    }
+
+    /**
+     * Returns the final definition to render for the given request.
+     *
+     * @param request The request object.
+     * @return The final definition name.
+     */
+    private String getDefinitionForRequest(javax.servlet.ServletRequest request) {
+        if (alternateDefinitions.size() < 1) {
+            return definitionName;
+        }
+        String base = getRequestBase(request);
+        for (Map.Entry<String, String> pair : alternateDefinitions.entrySet()) {
+            if (base.startsWith(pair.getKey())) {
+                return pair.getValue();
+            }
+        }
+        return definitionName;
+    }
+
+    /**
+     * Returns the request base, i.e. the the URL to calculate all the relative
+     * paths.
+     *
+     * @param request The request object to use.
+     * @return The request base.
+     */
+    private String getRequestBase(javax.servlet.ServletRequest request) {
+        // Included Path
+        String include = (String) request.getAttribute("javax.servlet.include.servlet_path");
+        if (include != null) {
+            return include;
+        }
+
+        // As opposed to includes, if a forward occurs, it will update the servletPath property
+        // and include the original as the request attribute.
+        return ((HttpServletRequest) request).getServletPath();
+    }
+
+    /**
+     * The default attribute context mutator to use.
+     */
+    class DefaultMutator implements AttributeContextMutator {
+
+        /** {@inheritDoc} */
+        public void mutate(AttributeContext ctx, javax.servlet.ServletRequest req) {
+            Attribute attr = new Attribute();
+            attr.setRenderer("template");
+            attr.setValue(getRequestBase(req));
+            ctx.putAttribute(definitionAttributeName, attr);
+        }
+    }
+
+    /**
+     * Checks if the prevent evaluation token is present.
+     *
+     * @param request The HTTP request object.
+     * @return <code>true</code> if the token is present.
+     */
+    private boolean isPreventTokenPresent(javax.servlet.ServletRequest request) {
+        return preventDecorationToken != null && request.getAttribute(preventDecorationToken) != null;
+    }
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDispatchServlet.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDispatchServlet.java
new file mode 100644
index 0000000..0e63551
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/TilesDispatchServlet.java
@@ -0,0 +1,143 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.util;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.reflect.ClassUtil;
+import org.apache.tiles.request.servlet.ServletRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Tiles dispatching servlet.  Used to invoke
+ * a definition directly.
+ */
+public class TilesDispatchServlet extends HttpServlet {
+
+    /**
+     * Init parameter to define the key of the container to use.
+     *
+     * @since 2.1.2
+     */
+    public static final String CONTAINER_KEY_INIT_PARAMETER =
+        "org.apache.tiles.web.util.TilesDispatchServlet.CONTAINER_KEY";
+
+    /**
+     * The logging object.
+     */
+    private final Logger log = LoggerFactory
+            .getLogger(TilesDispatchServlet.class);
+
+    /**
+     * The key under which the container is stored.
+     */
+    private String containerKey;
+
+    /**
+     * The object that will mutate the attribute context so that it uses
+     * different attributes.
+     */
+    private AttributeContextMutator mutator;
+
+
+    /** {@inheritDoc} */
+    @Override
+    public void init() throws ServletException {
+        super.init();
+
+        containerKey = getServletConfig().getInitParameter(
+                CONTAINER_KEY_INIT_PARAMETER);
+
+        String temp = getInitParameter("mutator");
+        if (temp != null) {
+            try {
+                mutator = (AttributeContextMutator) ClassUtil.instantiate(temp);
+            } catch (Exception e) {
+                throw new ServletException("Unable to instantiate specified context mutator.", e);
+            }
+        } else {
+            mutator = new DefaultMutator();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse res) {
+
+        ApplicationContext applicationContext = org.apache.tiles.request.servlet.ServletUtil
+                .getApplicationContext(getServletContext());
+        Request request = new ServletRequest(applicationContext,
+                req, res);
+        TilesContainer container = TilesAccess.getContainer(applicationContext,
+                containerKey);
+        mutator.mutate(container.getAttributeContext(request), req);
+        String definition = getDefinitionName(req);
+        if (log.isDebugEnabled()) {
+            log.info("Dispatching to tile '" + definition + "'");
+        }
+        container.render(definition, request);
+    }
+
+    /**
+     * Returns the called definition name for the given request.
+     *
+     * @param request The request to parse.
+     * @return The definition name to render.
+     */
+    protected String getDefinitionName(HttpServletRequest request) {
+        String path = (String) request.getAttribute("javax.servlet.include.servlet_path");
+        if (path == null) {
+            path = request.getServletPath();
+        }
+
+        int start = path.startsWith("/") ? 1 : 0;
+        int end = path.endsWith(".tiles") ? path.indexOf(".tiles") : path.length();
+
+        return path.substring(start, end);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void doPost(HttpServletRequest req, HttpServletResponse res) {
+        log.info("Tiles dispatch request received. Redirecting POST to GET.");
+        doGet(req, res);
+    }
+
+    /**
+     * Default no-op mutator.
+     */
+    class DefaultMutator implements AttributeContextMutator {
+
+        /** {@inheritDoc} */
+        public void mutate(AttributeContext context, javax.servlet.ServletRequest request) {
+            // noop;
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/package-info.java b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/package-info.java
new file mode 100644
index 0000000..4a373d9
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/java/org/apache/tiles/web/util/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id: package-info.java 1049711 2010-12-15 21:12:00Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Utility classes to use Tiles in a servlet environment.
+ */
+package org.apache.tiles.web.util;
diff --git a/TILES_3_0_X/tiles-servlet/src/main/resources/LICENSE.txt b/TILES_3_0_X/tiles-servlet/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/tiles-servlet/src/main/resources/NOTICE.txt b/TILES_3_0_X/tiles-servlet/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..1f13ff8
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/main/resources/NOTICE.txt
@@ -0,0 +1,6 @@
+   Apache Tiles
+   Copyright 1999-2009 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/TILES_3_0_X/tiles-servlet/src/site/site.xml b/TILES_3_0_X/tiles-servlet/src/site/site.xml
new file mode 100644
index 0000000..3645b30
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Servlet Support">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/AbstractTilesInitializerServletTest.java b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/AbstractTilesInitializerServletTest.java
new file mode 100644
index 0000000..d2de305
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/AbstractTilesInitializerServletTest.java
@@ -0,0 +1,68 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.startup;
+
+import static org.easymock.classextension.EasyMock.*;
+
+import java.util.Enumeration;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+import org.apache.tiles.request.servlet.ServletApplicationContext;
+import org.apache.tiles.startup.TilesInitializer;
+import org.junit.Test;
+
+/**
+ * Tests {@link AbstractTilesInitializerServlet}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AbstractTilesInitializerServletTest {
+
+    /**
+     * Test method for {@link org.apache.tiles.web.startup.AbstractTilesInitializerServlet#init()}.
+     * @throws ServletException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testInit() throws ServletException {
+        AbstractTilesInitializerServlet servlet = createMockBuilder(AbstractTilesInitializerServlet.class).createMock();
+        TilesInitializer initializer = createMock(TilesInitializer.class);
+        ServletConfig config = createMock(ServletConfig.class);
+        ServletContext servletContext = createMock(ServletContext.class);
+        Enumeration<String> names = createMock(Enumeration.class);
+
+        expect(servlet.createTilesInitializer()).andReturn(initializer);
+        expect(config.getServletContext()).andReturn(servletContext);
+        expect(servletContext.getInitParameterNames()).andReturn(names);
+        expect(config.getInitParameterNames()).andReturn(names);
+        expect(names.hasMoreElements()).andReturn(false).times(2);
+        initializer.initialize(isA(ServletApplicationContext.class));
+        initializer.destroy();
+
+        replay(servlet, initializer, config, servletContext, names);
+        servlet.init(config);
+        servlet.destroy();
+        verify(servlet, initializer, config, servletContext, names);
+    }
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/AbstractTilesListenerTest.java b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/AbstractTilesListenerTest.java
new file mode 100644
index 0000000..ca6f4ab
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/AbstractTilesListenerTest.java
@@ -0,0 +1,61 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.startup;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+
+import org.apache.tiles.request.servlet.ServletApplicationContext;
+import org.apache.tiles.startup.TilesInitializer;
+import org.junit.Test;
+
+/**
+ * Tests {@link AbstractTilesListener}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AbstractTilesListenerTest {
+
+    /**
+     * Test method for {@link AbstractTilesListener#contextInitialized(ServletContextEvent)}.
+     */
+    @Test
+    public void testContextInitialized() {
+        AbstractTilesListener listener = createMockBuilder(AbstractTilesListener.class).createMock();
+        ServletContextEvent event = createMock(ServletContextEvent.class);
+        ServletContext servletContext = createMock(ServletContext.class);
+        TilesInitializer initializer = createMock(TilesInitializer.class);
+
+        expect(event.getServletContext()).andReturn(servletContext);
+        expect(listener.createTilesInitializer()).andReturn(initializer);
+        initializer.initialize(isA(ServletApplicationContext.class));
+        initializer.destroy();
+
+        replay(listener, event, servletContext, initializer);
+        listener.contextInitialized(event);
+        listener.contextDestroyed(event);
+        verify(listener, event, servletContext, initializer);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/simple/SimpleTilesInitializerServletTest.java b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/simple/SimpleTilesInitializerServletTest.java
new file mode 100644
index 0000000..45d4cef
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/simple/SimpleTilesInitializerServletTest.java
@@ -0,0 +1,44 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.startup.simple;
+
+import static org.junit.Assert.*;
+
+import org.apache.tiles.startup.DefaultTilesInitializer;
+import org.junit.Test;
+
+/**
+ * Tests {@link SimpleTilesInitializerServlet}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SimpleTilesInitializerServletTest {
+
+    /**
+     * Test method for {@link SimpleTilesInitializerServlet#createTilesInitializer()}.
+     */
+    @Test
+    public void testCreateTilesInitializer() {
+        SimpleTilesInitializerServlet servlet = new SimpleTilesInitializerServlet();
+        assertTrue(servlet.createTilesInitializer() instanceof DefaultTilesInitializer);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/simple/SimpleTilesListenerTest.java b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/simple/SimpleTilesListenerTest.java
new file mode 100644
index 0000000..599a77a
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/startup/simple/SimpleTilesListenerTest.java
@@ -0,0 +1,44 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.startup.simple;
+
+import static org.junit.Assert.*;
+
+import org.apache.tiles.startup.DefaultTilesInitializer;
+import org.junit.Test;
+
+/**
+ * Tests {@link SimpleTilesListener}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SimpleTilesListenerTest {
+
+    /**
+     * Test method for {@link org.apache.tiles.web.startup.simple.SimpleTilesListener#createTilesInitializer()}.
+     */
+    @Test
+    public void testCreateTilesInitializer() {
+        SimpleTilesListener servlet = new SimpleTilesListener();
+        assertTrue(servlet.createTilesInitializer() instanceof DefaultTilesInitializer);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/util/ServletContextAdapterTest.java b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/util/ServletContextAdapterTest.java
new file mode 100644
index 0000000..d9109b8
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/util/ServletContextAdapterTest.java
@@ -0,0 +1,456 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.util;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link ServletContextAdapter}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ServletContextAdapterTest {
+
+    /**
+     * The servlet configuration.
+     */
+    private ServletConfig config;
+
+    /**
+     * The servlet context.
+     */
+    private ServletContext servletContext;
+
+    /**
+     * First set of param names.
+     */
+    private Enumeration<String> names1;
+
+    /**
+     * Second set of param names.
+     */
+    private Enumeration<String> names2;
+
+    /**
+     * Sets up the test.
+     */
+    @SuppressWarnings("unchecked")
+    @Before
+    public void setUp() {
+        config = createMock(ServletConfig.class);
+        servletContext = createMock(ServletContext.class);
+        names1 = createMock(Enumeration.class);
+        names2 = createMock(Enumeration.class);
+
+        expect(config.getServletContext()).andReturn(servletContext);
+        expect(names1.hasMoreElements()).andReturn(true);
+        expect(names1.nextElement()).andReturn("one");
+        expect(names1.hasMoreElements()).andReturn(true);
+        expect(names1.nextElement()).andReturn("two");
+        expect(names1.hasMoreElements()).andReturn(false);
+        expect(names2.hasMoreElements()).andReturn(true);
+        expect(names2.nextElement()).andReturn("two");
+        expect(names2.hasMoreElements()).andReturn(true);
+        expect(names2.nextElement()).andReturn("three");
+        expect(names2.hasMoreElements()).andReturn(false);
+        expect(servletContext.getInitParameterNames()).andReturn(names1);
+        expect(servletContext.getInitParameter("one")).andReturn("value1");
+        expect(servletContext.getInitParameter("two")).andReturn("value2");
+        expect(config.getInitParameterNames()).andReturn(names2);
+        expect(config.getInitParameter("two")).andReturn("otherValue2");
+        expect(config.getInitParameter("three")).andReturn("otherValue3");
+
+        replay(names1, names2);
+    }
+
+    /**
+     * Tears down the test.
+     */
+    @After
+    public void tearDown() {
+        verify(config, servletContext, names1, names2);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getContext(java.lang.String)}.
+     */
+    @Test
+    public void testGetContext() {
+        ServletContext otherContext = createMock(ServletContext.class);
+        expect(servletContext.getContext("whatever")).andReturn(otherContext);
+
+        replay(servletContext, config, otherContext);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(otherContext, adapter.getContext("whatever"));
+        verify(otherContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getMajorVersion()}.
+     */
+    @Test
+    public void testGetMajorVersion() {
+        expect(servletContext.getMajorVersion()).andReturn(2);
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(2, adapter.getMajorVersion());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getMinorVersion()}.
+     */
+    @Test
+    public void testGetMinorVersion() {
+        expect(servletContext.getMinorVersion()).andReturn(5);
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(5, adapter.getMinorVersion());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getMimeType(java.lang.String)}.
+     */
+    @Test
+    public void testGetMimeType() {
+        expect(servletContext.getMimeType("whatever")).andReturn("mymime");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals("mymime", adapter.getMimeType("whatever"));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getResourcePaths(java.lang.String)}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetResourcePaths() {
+        Set<URL> urls = createMock(Set.class);
+
+        expect(servletContext.getResourcePaths("whatever")).andReturn(urls);
+
+        replay(servletContext, config, urls);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(urls, adapter.getResourcePaths("whatever"));
+        verify(urls);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getResource(java.lang.String)}.
+     * @throws MalformedURLException If something goes wrong.
+     */
+    @Test
+    public void testGetResource() throws MalformedURLException {
+        URL url = new URL("file:///temporary");
+
+        expect(servletContext.getResource("whatever")).andReturn(url);
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(url, adapter.getResource("whatever"));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getResourceAsStream(java.lang.String)}.
+     */
+    @Test
+    public void testGetResourceAsStream() {
+        InputStream is = createMock(InputStream.class);
+
+        expect(servletContext.getResourceAsStream("whatever")).andReturn(is);
+
+        replay(servletContext, config, is);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(is, adapter.getResourceAsStream("whatever"));
+        verify(is);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getRequestDispatcher(java.lang.String)}.
+     */
+    @Test
+    public void testGetRequestDispatcher() {
+        RequestDispatcher is = createMock(RequestDispatcher.class);
+
+        expect(servletContext.getRequestDispatcher("whatever")).andReturn(is);
+
+        replay(servletContext, config, is);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(is, adapter.getRequestDispatcher("whatever"));
+        verify(is);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getNamedDispatcher(java.lang.String)}.
+     */
+    @Test
+    public void testGetNamedDispatcher() {
+        RequestDispatcher is = createMock(RequestDispatcher.class);
+
+        expect(servletContext.getNamedDispatcher("whatever")).andReturn(is);
+
+        replay(servletContext, config, is);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(is, adapter.getNamedDispatcher("whatever"));
+        verify(is);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getServlet(java.lang.String)}.
+     * @throws ServletException If something goes wrong.
+     */
+    @SuppressWarnings("deprecation")
+    @Test
+    public void testGetServlet() throws ServletException {
+        Servlet is = createMock(Servlet.class);
+
+        expect(servletContext.getServlet("whatever")).andReturn(is);
+
+        replay(servletContext, config, is);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(is, adapter.getServlet("whatever"));
+        verify(is);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getServlets()}.
+     */
+    @SuppressWarnings({ "deprecation", "unchecked" })
+    @Test
+    public void testGetServlets() {
+        Enumeration<Servlet> is = createMock(Enumeration.class);
+
+        expect(servletContext.getServlets()).andReturn(is);
+
+        replay(servletContext, config, is);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(is, adapter.getServlets());
+        verify(is);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getServletNames()}.
+     */
+    @SuppressWarnings({ "deprecation", "unchecked" })
+    @Test
+    public void testGetServletNames() {
+        Enumeration<String> is = createMock(Enumeration.class);
+
+        expect(servletContext.getServletNames()).andReturn(is);
+
+        replay(servletContext, config, is);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(is, adapter.getServletNames());
+        verify(is);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#log(java.lang.String)}.
+     */
+    @Test
+    public void testLogString() {
+        servletContext.log("whatever");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        adapter.log("whatever");
+    }
+
+    /**
+     * Test method for {@link ServletContextAdapter#log(java.lang.Exception, java.lang.String)}.
+     */
+    @SuppressWarnings("deprecation")
+    @Test
+    public void testLogExceptionString() {
+        Exception e = new Exception("It does not matter");
+        servletContext.log(e, "whatever");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        adapter.log(e, "whatever");
+    }
+
+    /**
+     * Test method for {@link ServletContextAdapter#log(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testLogStringThrowable() {
+        Throwable e = new Throwable("It does not matter");
+        servletContext.log("whatever", e);
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        adapter.log("whatever", e);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getRealPath(java.lang.String)}.
+     */
+    @Test
+    public void testGetRealPath() {
+        expect(servletContext.getRealPath("whatever")).andReturn("mypath");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals("mypath", adapter.getRealPath("whatever"));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getServerInfo()}.
+     */
+    @Test
+    public void testGetServerInfo() {
+        expect(servletContext.getServerInfo()).andReturn("info");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals("info", adapter.getServerInfo());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getInitParameter(java.lang.String)}.
+     */
+    @Test
+    public void testGetInitParameter() {
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals("value1", adapter.getInitParameter("one"));
+        assertEquals("otherValue2", adapter.getInitParameter("two"));
+        assertEquals("otherValue3", adapter.getInitParameter("three"));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getInitParameterNames()}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetInitParameterNames() {
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        Set<String> names = new HashSet<String>();
+        names.add("one");
+        names.add("two");
+        names.add("three");
+        for (Enumeration<String> enumeration = adapter.getInitParameterNames(); enumeration.hasMoreElements();) {
+            String name = enumeration.nextElement();
+            assertTrue(names.remove(name));
+        }
+        assertTrue(names.isEmpty());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getAttribute(java.lang.String)}.
+     */
+    @Test
+    public void testGetAttribute() {
+        expect(servletContext.getAttribute("whatever")).andReturn("value");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals("value", adapter.getAttribute("whatever"));
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getAttributeNames()}.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testGetAttributeNames() {
+        Enumeration<String> is = createMock(Enumeration.class);
+
+        expect(servletContext.getAttributeNames()).andReturn(is);
+
+        replay(servletContext, config, is);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals(is, adapter.getAttributeNames());
+        verify(is);
+    }
+
+    /**
+     * Test method for {@link ServletContextAdapter#setAttribute(java.lang.String, java.lang.Object)}.
+     */
+    @Test
+    public void testSetAttribute() {
+        servletContext.setAttribute("whatever", "value");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        adapter.setAttribute("whatever", "value");
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#removeAttribute(java.lang.String)}.
+     */
+    @Test
+    public void testRemoveAttribute() {
+        servletContext.removeAttribute("whatever");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        adapter.removeAttribute("whatever");
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getServletContextName()}.
+     */
+    @Test
+    public void testGetServletContextName() {
+        expect(servletContext.getServletContextName()).andReturn("value");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals("value", adapter.getServletContextName());
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.web.util.ServletContextAdapter#getContextPath()}.
+     */
+    @Test
+    public void testGetContextPath() {
+        expect(servletContext.getContextPath()).andReturn("value");
+
+        replay(servletContext, config);
+        ServletContextAdapter adapter = new ServletContextAdapter(config);
+        assertEquals("value", adapter.getContextPath());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/util/TilesDecorationFilterTest.java b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/util/TilesDecorationFilterTest.java
new file mode 100644
index 0000000..6b1e411
--- /dev/null
+++ b/TILES_3_0_X/tiles-servlet/src/test/java/org/apache/tiles/web/util/TilesDecorationFilterTest.java
@@ -0,0 +1,151 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.web.util;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Map;
+
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.tiles.request.ApplicationAccess;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.servlet.ServletRequest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesDecorationFilter}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesDecorationFilterTest {
+
+    /**
+     * The filter configuration.
+     */
+    private FilterConfig config;
+
+    /**
+     * The servlet context.
+     */
+    private ServletContext servletContext;
+
+    /**
+     * The filter to test.
+     */
+    private TilesDecorationFilter filter;
+
+    /**
+     * Sets up the test.
+     * @throws ServletException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Before
+    public void setUp() throws ServletException {
+        config = createMock(FilterConfig.class);
+        servletContext = createMock(ServletContext.class);
+        Enumeration<String> names = createMock(Enumeration.class);
+
+        expect(config.getServletContext()).andReturn(servletContext);
+        expect(config.getInitParameter(TilesDecorationFilter.CONTAINER_KEY_INIT_PARAMETER)).andReturn("key");
+        expect(config.getInitParameter("attribute-name")).andReturn("attributeKey");
+        expect(config.getInitParameter("definition")).andReturn("definitionKey");
+        expect(config.getInitParameter("prevent-token")).andReturn("tokenKey");
+        expect(names.hasMoreElements()).andReturn(true);
+        expect(names.nextElement()).andReturn("definition(hello*)");
+        expect(names.hasMoreElements()).andReturn(false);
+        expect(config.getInitParameterNames()).andReturn(names);
+        expect(config.getInitParameter("definition(hello*)")).andReturn("alternateDef");
+        expect(config.getInitParameter("mutator")).andReturn(CustomAttributeMutator.class.getName());
+
+        replay(config, names);
+        filter = new TilesDecorationFilter();
+        filter.init(config);
+        verify(names);
+    }
+
+    /**
+     * Tears down the test.
+     */
+    @After
+    public void tearDown() {
+        verify(config, servletContext);
+    }
+
+    /**
+     * Test method for {@link TilesDecorationFilter#doFilter(ServletRequest, ServletResponse, FilterChain)}.
+     * @throws ServletException If something goes wrong
+     * @throws IOException If something goes wrong.
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testDoFilter() throws IOException, ServletException {
+        HttpServletRequest request = createMock(HttpServletRequest.class);
+        HttpServletResponse response = createMock(HttpServletResponse.class);
+        FilterChain chain = createMock(FilterChain.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> applicationScope = createMock(Map.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(request.getAttribute("org.apache.tiles.decoration.PREVENT:tokenKey")).andReturn(null);
+        expect(servletContext.getAttribute(ApplicationAccess.APPLICATION_CONTEXT_ATTRIBUTE))
+                .andReturn(applicationContext);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope);
+        expect(applicationScope.get("key")).andReturn(container);
+        expect(container.getAttributeContext(isA(ServletRequest.class))).andReturn(attributeContext);
+        request.setAttribute("org.apache.tiles.decoration.PREVENT:tokenKey", true);
+        expect(request.getAttribute("javax.servlet.include.servlet_path")).andReturn(null);
+        expect(request.getServletPath()).andReturn("/tiles");
+        container.render(eq("definitionKey"), isA(ServletRequest.class));
+        chain.doFilter(request, response);
+
+        replay(servletContext, request, response, chain, applicationContext,
+                applicationScope, container, attributeContext);
+        filter.doFilter(request, response, chain);
+        verify(request, response, chain, applicationContext, applicationScope, container, attributeContext);
+    }
+
+    /**
+     * Internal mutator for testing.
+     *
+     */
+    public static class CustomAttributeMutator implements AttributeContextMutator {
+
+        @Override
+        public void mutate(AttributeContext context,
+                javax.servlet.ServletRequest request) {
+            // Does nothing.
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/pom.xml b/TILES_3_0_X/tiles-template/pom.xml
new file mode 100644
index 0000000..5150e4f
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/pom.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.tiles</groupId>
+  <artifactId>tiles-template</artifactId>
+  <name>Tiles - Template Technologies Support</name>
+  <description>Common code for integration of Tiles for different templating technologies.</description>
+  <parent>
+    <artifactId>tiles-parent</artifactId>
+    <groupId>org.apache.tiles</groupId>
+    <version>3.0.1</version>
+  </parent>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.tiles.autotag.plugin</groupId>
+        <artifactId>maven-autotag-plugin</artifactId>
+        <version>${tiles.autotag.version}</version>
+        <executions>
+            <execution>
+                <goals>
+                    <goal>create-descriptor</goal>
+                </goals>
+                <configuration>
+                    <name>tiles</name>
+                </configuration>
+            </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymockclassextension</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.tiles</groupId>
+        <artifactId>tiles-autotag-core-runtime</artifactId>
+        <version>${tiles.autotag.version}</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/AddAttributeModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/AddAttributeModel.java
new file mode 100644
index 0000000..7fc3a65
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/AddAttributeModel.java
@@ -0,0 +1,118 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.io.IOException;
+import java.util.Deque;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Expression;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.Request;
+
+/**
+ * <p>
+ * <strong>Add an element to the surrounding list. Equivalent to 'putAttribute',
+ * but for list element.</strong>
+ * </p>
+ *
+ * <p>
+ * Add an element to the surrounding list. This tag can only be used inside
+ * 'putListAttribute' or 'addListAttribute' tags. Value can come from a direct
+ * assignment (value="aValue")
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class AddAttributeModel {
+
+    /**
+     * Executes the operation.
+     * @param value The value of the attribute. Use this parameter, or
+     * expression, or body.
+     * @param expression The expression to calculate the value from. Use this
+     * parameter, or value, or body.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param type The type (renderer) of the attribute.
+     * @param request The request.
+     * @param modelBody The body.
+     * @throws IOException If the body cannot be correctly evaluated.
+     * @since 2.2.0
+     */
+    public void execute(Object value, String expression, String role,
+            String type, Request request, ModelBody modelBody)
+            throws IOException {
+        Attribute attribute = new Attribute();
+        Deque<Object> composeStack = ComposeStackUtil.getComposeStack(request);
+        composeStack.push(attribute);
+        String body = modelBody.evaluateAsString();
+        attribute = (Attribute) composeStack.pop();
+        addAttributeToList(attribute, composeStack, value, expression, body,
+                role, type);
+    }
+
+    /**
+     * Adds the attribute to the containing list attribute.
+     *
+     * @param attribute The attribute to add to the list attribute.
+     * @param composeStack The composing stack.
+     * @param value The value of the attribute. Use this parameter, or
+     * expression, or body.
+     * @param expression The expression to calculate the value from. Use this
+     * parameter, or value, or body.
+     * @param body The body of the tag. Use this parameter, or value, or
+     * expression.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param type The type (renderer) of the attribute.
+     * @since 2.2.0
+     */
+    private void addAttributeToList(Attribute attribute,
+            Deque<Object> composeStack, Object value, String expression,
+            String body, String role, String type) {
+        ListAttribute listAttribute = (ListAttribute) ComposeStackUtil
+                .findAncestorWithClass(composeStack, ListAttribute.class);
+
+        if (listAttribute == null) {
+            throw new NullPointerException("There is no ListAttribute in the stack");
+        }
+        if (value != null) {
+            attribute.setValue(value);
+        } else if (attribute.getValue() == null && body != null) {
+            attribute.setValue(body);
+        }
+        if (expression != null) {
+            attribute.setExpressionObject(Expression
+                    .createExpressionFromDescribedExpression(expression));
+        }
+        if (role != null) {
+            attribute.setRole(role);
+        }
+        if (type != null) {
+            attribute.setRenderer(type);
+        }
+        listAttribute.add(attribute);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/AddListAttributeModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/AddListAttributeModel.java
new file mode 100644
index 0000000..12cb1be
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/AddListAttributeModel.java
@@ -0,0 +1,64 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.io.IOException;
+import java.util.Deque;
+
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.Request;
+
+/**
+ * <p>
+ * <strong>Declare a list that will be pass as an attribute. </strong>
+ * </p>
+ * <p>
+ * Declare a list that will be pass as an attribute . List elements are added
+ * using the tag 'addAttribute' or 'addListAttribute'. This tag can only be used
+ * inside 'insertTemplate', 'insertDefinition' or 'definition' tag.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class AddListAttributeModel {
+
+    /**
+     * Executes the model.
+     *
+     * @param role The comma-separated list of roles that can use the list attribute.
+     * @param request The request.
+     * @param modelBody The body.
+     * @throws IOException If the body cannot be evaluated.
+     */
+    public void execute(String role, Request request, ModelBody modelBody) throws IOException {
+        Deque<Object> composeStack = ComposeStackUtil.getComposeStack(request);
+        ListAttribute listAttribute = new ListAttribute();
+        listAttribute.setRole(role);
+        composeStack.push(listAttribute);
+        modelBody.evaluateWithoutWriting();
+        listAttribute = (ListAttribute) composeStack.pop();
+        ListAttribute parent = (ListAttribute) composeStack.peek();
+        parent.add(listAttribute);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/AttributeResolver.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/AttributeResolver.java
new file mode 100644
index 0000000..3815ddc
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/AttributeResolver.java
@@ -0,0 +1,55 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.Request;
+
+/**
+ * Resolves an attribute, depending on the given parameters.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public interface AttributeResolver {
+
+    /**
+     * Computes the attribute.
+     *
+     * @param container The Tiles container to use.
+     * @param attribute The attribute to return immediately, if not null.
+     * @param name The name of the attribute.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param ignore If <code>true</code> if the computed attribute is null, this problem will be ignored.
+     * @param defaultValue The default value of the attribute. To use only if the attribute was not computed.
+     * @param defaultValueRole The default comma-separated list of roles. To use only if the attribute was not computed.
+     * @param defaultValueType The default type of the attribute. To use only if the attribute was not computed.
+     * @param request TODO
+     * @return The computed attribute.
+     * @since 2.2.0
+     */
+    Attribute computeAttribute(TilesContainer container, Attribute attribute,
+            String name, String role, boolean ignore,
+            Object defaultValue, String defaultValueRole, String defaultValueType, Request request);
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/ComposeStackUtil.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/ComposeStackUtil.java
new file mode 100644
index 0000000..00e472c
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/ComposeStackUtil.java
@@ -0,0 +1,86 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.util.Deque;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.apache.tiles.request.Request;
+
+/**
+ * Utilities to work with compose stacks.
+ *
+ * @version $Rev$ $Date$
+ * @since 3.0.0
+ */
+public final class ComposeStackUtil {
+
+    /**
+     * The name of the attribute that holds the compose stack.
+     */
+    public static final String COMPOSE_STACK_ATTRIBUTE_NAME = "org.apache.tiles.template.COMPOSE_STACK";
+
+    /**
+     * Private constructor to avoid instantiation.
+     */
+    private ComposeStackUtil() {
+
+    }
+
+    /**
+     * Finds the first ancestor in the stack, that is assignable to the given class.
+     *
+     * @param composeStack The compose stack to evaluate.
+     * @param clazz The class to check.
+     * @return The first ancestor that is assignable to the class, or null if not found.
+     * @since 3.0.0
+     */
+    public static Object findAncestorWithClass(Deque<Object> composeStack, Class<?> clazz) {
+        for (Object obj : composeStack) {
+            if (clazz.isAssignableFrom(obj.getClass())) {
+                return obj;
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Returns the current compose stack, or creates a new one if not present.
+     *
+     * @param request The request.
+     * @return The compose stack.
+     * @since 3.0.0
+     */
+    @SuppressWarnings("unchecked")
+    public static Deque<Object> getComposeStack(Request request) {
+        Map<String, Object> requestScope = request.getContext("request");
+        Deque<Object> composeStack = (Deque<Object>) requestScope
+                .get(COMPOSE_STACK_ATTRIBUTE_NAME);
+        if (composeStack == null) {
+            composeStack = new LinkedList<Object>();
+            requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+        }
+        return composeStack;
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/DefaultAttributeResolver.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/DefaultAttributeResolver.java
new file mode 100644
index 0000000..c35ca59
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/DefaultAttributeResolver.java
@@ -0,0 +1,83 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.Expression;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.Request;
+
+/**
+ * The default implementation of AttributeResolver.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class DefaultAttributeResolver implements AttributeResolver {
+
+    /** {@inheritDoc} */
+    public Attribute computeAttribute(TilesContainer container, Attribute attribute,
+            String name, String role, boolean ignore,
+            Object defaultValue, String defaultValueRole, String defaultValueType, Request request) {
+        if (attribute == null) {
+            AttributeContext evaluatingContext = container
+                    .getAttributeContext(request);
+            attribute = evaluatingContext.getAttribute(name);
+            if (attribute == null) {
+                attribute = computeDefaultAttribute(defaultValue,
+                        defaultValueRole, defaultValueType);
+                if (attribute == null && !ignore) {
+                    throw new NoSuchAttributeException("Attribute '" + name
+                            + "' not found.");
+                }
+            }
+        }
+        if (attribute != null && role != null && !"".equals(role.trim())) {
+            attribute = new Attribute(attribute);
+            attribute.setRole(role);
+        }
+        return attribute;
+    }
+
+    /**
+     * Computes the default attribute.
+     *
+     * @param defaultValue The default value of the attribute.
+     * @param defaultValueRole The default role of tha attribute.
+     * @param defaultValueType The default type of the attribute.
+     * @return The default attribute.
+     */
+    private Attribute computeDefaultAttribute(Object defaultValue,
+            String defaultValueRole, String defaultValueType) {
+        Attribute attribute = null;
+        if (defaultValue != null) {
+            if (defaultValue instanceof Attribute) {
+                attribute = (Attribute) defaultValue;
+            } else if (defaultValue instanceof String) {
+                attribute = new Attribute(defaultValue, (Expression) null,
+                        defaultValueRole, defaultValueType);
+            }
+        }
+        return attribute;
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/DefinitionModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/DefinitionModel.java
new file mode 100644
index 0000000..0953dbc
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/DefinitionModel.java
@@ -0,0 +1,133 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.io.IOException;
+import java.util.Deque;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.annotation.Parameter;
+import org.apache.tiles.mgmt.MutableTilesContainer;
+import org.apache.tiles.request.Request;
+
+/**
+ * <p>
+ * <strong>Create a definition at runtime. </strong>
+ * </p>
+ * <p>
+ * Create a new definition at runtime. Newly created definition will be
+ * available across the entire request.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class DefinitionModel {
+
+    /**
+     * Executes the operation.
+     *
+     * @param name The name of the definition to create. If not specified, an
+     * anonymous definition will be created.
+     * @param template The template of this definition.
+     * @param role A comma-separated list of roles. If present, the definition
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param extendsParam The definition name that this definition extends.
+     * @param preparer The preparer to use to invoke before the definition is
+     * rendered.
+     * @param request The request.
+     * @param modelBody The body.
+     * @throws IOException If something goes wrong.
+     * @since 2.2.0
+     */
+    public void execute(String name, String template, String role,
+            @Parameter(name = "extends") String extendsParam, String preparer,
+            Request request, ModelBody modelBody) throws IOException {
+        Deque<Object> composeStack = ComposeStackUtil
+                .getComposeStack(request);
+        Definition definition = createDefinition(name, template, role,
+                extendsParam, preparer);
+        composeStack.push(definition);
+        modelBody.evaluateWithoutWriting();
+        MutableTilesContainer container = (MutableTilesContainer) TilesAccess
+                .getCurrentContainer(request);
+        definition = (Definition) composeStack.pop();
+        registerDefinition(definition, container, composeStack, request);
+    }
+
+    /**
+     * Creates the definition to store.
+     *
+     * @param name The name of the definition to create. If not specified, an
+     * anonymous definition will be created.
+     * @param template The template of this definition.
+     * @param role A comma-separated list of roles. If present, the definition
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param extendsParam The definition name that this definition extends.
+     * @param preparer The preparer to use to invoke before the definition is
+     * rendered.
+     * @return The created definition.
+     */
+    private Definition createDefinition(String name, String template,
+            String role, String extendsParam, String preparer) {
+        Definition definition = new Definition();
+        definition.setName(name);
+        Attribute templateAttribute = Attribute
+                .createTemplateAttribute(template);
+        templateAttribute.setRole(role);
+        definition.setTemplateAttribute(templateAttribute);
+        definition.setExtends(extendsParam);
+        definition.setPreparer(preparer);
+        return definition;
+    }
+
+    /**
+     * Registers a definition in the container.
+     *
+     * @param definition The definition to register.
+     * @param container The container into which the definition will be
+     * registered.
+     * @param composeStack The compose stack,
+     * @param request The request.
+     */
+    private void registerDefinition(Definition definition,
+            MutableTilesContainer container, Deque<Object> composeStack,
+            Request request) {
+        container.register(definition, request);
+
+        if (composeStack.isEmpty()) {
+            return;
+        }
+
+        Object obj = composeStack.peek();
+        if (obj instanceof Attribute) {
+            Attribute attribute = (Attribute) obj;
+            attribute.setValue(definition.getName());
+            if (attribute.getRenderer() == null) {
+                attribute.setRenderer("definition");
+            }
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/GetAsStringModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/GetAsStringModel.java
new file mode 100644
index 0000000..aae0538
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/GetAsStringModel.java
@@ -0,0 +1,194 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Deque;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.annotation.Parameter;
+import org.apache.tiles.request.Request;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * <strong> Render the value of the specified template attribute to the current
+ * Writer</strong>
+ * </p>
+ *
+ * <p>
+ * Retrieve the value of the specified template attribute property, and render
+ * it to the current Writer as a String. The usual toString() conversions is
+ * applied on found value.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class GetAsStringModel {
+
+    /**
+     * The logging object.
+     */
+    private Logger log = LoggerFactory.getLogger(getClass());
+
+    /**
+     * The attribute resolver to use.
+     */
+    private AttributeResolver attributeResolver;
+
+    /**
+     * Constructor that uses the defaut attribute resolver.
+     *
+     * @since 3.0.0
+     */
+    public GetAsStringModel() {
+        this(new DefaultAttributeResolver());
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param attributeResolver The attribute resolver to use.
+     * @since 2.2.0
+     */
+    public GetAsStringModel(AttributeResolver attributeResolver) {
+        this.attributeResolver = attributeResolver;
+    }
+
+    /**
+     * Executes the operation.
+     * @param ignore If <code>true</code>, if an exception happens during
+     * rendering, of if the attribute is null, the problem will be ignored.
+     * @param preparer The preparer to invoke before rendering the attribute.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param defaultValue The default value of the attribute. To use only if
+     * the attribute was not computed.
+     * @param defaultValueRole The default comma-separated list of roles. To use
+     * only if the attribute was not computed.
+     * @param defaultValueType The default type of the attribute. To use only if
+     * the attribute was not computed.
+     * @param name The name of the attribute.
+     * @param value The attribute to use immediately, if not null.
+     * @param request The request.
+     * @param modelBody The body.
+     * @throws IOException If an I/O error happens during rendering.
+     * @since 2.2.0
+     */
+    public void execute(boolean ignore, String preparer, String role,
+            Object defaultValue, String defaultValueRole,
+            String defaultValueType, @Parameter(required = true) String name,
+            Attribute value, Request request, ModelBody modelBody)
+            throws IOException {
+        TilesContainer container = TilesAccess.getCurrentContainer(request);
+        Deque<Object> composeStack = ComposeStackUtil.getComposeStack(request);
+        Attribute attribute = resolveAttribute(container, ignore, preparer,
+                role, defaultValue, defaultValueRole, defaultValueType, name,
+                value, request);
+        if (attribute != null) {
+            composeStack.push(attribute);
+        }
+        modelBody.evaluateWithoutWriting();
+        container = TilesAccess.getCurrentContainer(request);
+        Writer writer = request.getWriter();
+        if (attribute != null) {
+            attribute = (Attribute) composeStack.pop();
+        }
+        renderAttribute(attribute, container, writer, ignore, request);
+    }
+
+    /**
+     * Resolves the attribute. and starts the context.
+     *
+     * @param container The Tiles container to use.
+     * @param ignore If <code>true</code>, if an exception happens during
+     * rendering, of if the attribute is null, the problem will be ignored.
+     * @param preparer The preparer to invoke before rendering the attribute.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param defaultValue The default value of the attribute. To use only if
+     * the attribute was not computed.
+     * @param defaultValueRole The default comma-separated list of roles. To use
+     * only if the attribute was not computed.
+     * @param defaultValueType The default type of the attribute. To use only if
+     * the attribute was not computed.
+     * @param name The name of the attribute.
+     * @param value The attribute to use immediately, if not null.
+     * @param request The request.
+     * @return The resolved attribute.
+     */
+    private Attribute resolveAttribute(TilesContainer container,
+            boolean ignore, String preparer, String role, Object defaultValue,
+            String defaultValueRole, String defaultValueType, String name,
+            Attribute value, Request request) {
+        if (preparer != null) {
+            container.prepare(preparer, request);
+        }
+        Attribute attribute = attributeResolver.computeAttribute(container,
+                value, name, role, ignore, defaultValue, defaultValueRole,
+                defaultValueType, request);
+        container.startContext(request);
+        return attribute;
+    }
+
+    /**
+     * Renders the attribute as a string.
+     *
+     * @param attribute The attribute to use, previously resolved.
+     * @param container The Tiles container to use.
+     * @param writer The writer into which the attribute will be written.
+     * @param ignore If <code>true</code>, if an exception happens during
+     * rendering, of if the attribute is null, the problem will be ignored.
+     * @param request The request.
+     * @throws IOException If an I/O error happens during rendering.
+     */
+    private void renderAttribute(Attribute attribute, TilesContainer container,
+            Writer writer, boolean ignore, Request request)
+            throws IOException {
+        try {
+            if (attribute == null && ignore) {
+                return;
+            }
+            writer.write(attribute.getValue().toString());
+        } catch (IOException e) {
+            if (!ignore) {
+                throw e;
+            } else if (log.isDebugEnabled()) {
+                log.debug("Ignoring exception", e);
+            }
+        } catch (RuntimeException e) {
+            if (!ignore) {
+                throw e;
+            } else if (log.isDebugEnabled()) {
+                log.debug("Ignoring exception", e);
+            }
+        } finally {
+            container.endContext(request);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/ImportAttributeModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/ImportAttributeModel.java
new file mode 100644
index 0000000..eec6405
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/ImportAttributeModel.java
@@ -0,0 +1,197 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.Request;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * <strong>Import attribute(s) in specified context.</strong>
+ * </p>
+ * <p>
+ * Import attribute(s) to requested scope. Attribute name and scope are
+ * optional. If not specified, all attributes are imported in page scope. Once
+ * imported, an attribute can be used as any other beans from jsp contexts.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class ImportAttributeModel {
+
+    /**
+     * The logging object.
+     */
+    private Logger log = LoggerFactory.getLogger(getClass());
+
+    /**
+     * Executes the model.
+     *
+     * @param name The name of the attribute to import. If it is
+     * <code>null</code>, all the attributes will be imported.
+     * @param scope The scope into which the attribute(s) will be imported. If
+     * <code>null</code>, the import will go in page scope.
+     * @param toName The name of the attribute into which the attribute will be
+     * imported. To be used in conjunction to <code>name</code>. If
+     * <code>null</code>, the value of <code>name</code> will be used.
+     * @param ignore If <code>true</code>, if the attribute is not present, the
+     * problem will be ignored.
+     * @param request The request.
+     */
+    public void execute(String name, String scope, String toName, boolean ignore, Request request) {
+        Map<String, Object> attributes = getImportedAttributes(
+                name, toName, ignore, request);
+        if (scope == null) {
+            scope = request.getAvailableScopes().get(0);
+        }
+        request.getContext(scope).putAll(attributes);
+    }
+
+    /**
+     * Retuns a Map that contains the attributes to be imported. The importing
+     * code must be done by the caller.
+     * @param name The attribute to import. If null, all the attributes will be
+     * imported.
+     * @param toName The destination name of the attribute to import. Valid only
+     * if <code>name</code> is specified.
+     * @param ignore If <code>true</code> and the attribute is not found, or an
+     * exception happens, the problem will be ignored.
+     * @param request The request.
+     *
+     * @return A Map of the attributes to be imported: the key is the name of an
+     * attribute, the value is the value of that attribute.
+     * @since 2.2.0
+     */
+    private Map<String, Object> getImportedAttributes(String name,
+            String toName, boolean ignore, Request request) {
+        TilesContainer container = TilesAccess.getCurrentContainer(request);
+        Map<String, Object> retValue = new HashMap<String, Object>();
+        AttributeContext attributeContext = container
+                .getAttributeContext(request);
+        // Some tags allow for unspecified attributes. This
+        // implies that the tag should use all of the attributes.
+        if (name != null) {
+            importSingleAttribute(container, attributeContext, name, toName,
+                    ignore, retValue, request);
+        } else {
+            importAttributes(attributeContext.getCascadedAttributeNames(),
+                    container, attributeContext, retValue, ignore, request);
+            importAttributes(attributeContext.getLocalAttributeNames(),
+                    container, attributeContext, retValue, ignore, request);
+        }
+        return retValue;
+    }
+
+    /**
+     * Imports a single attribute.
+     *
+     * @param container The Tiles container to use.
+     * @param attributeContext The context from which the attributes will be
+     * got.
+     * @param name The name of the attribute.
+     * @param toName The name of the destination attribute. If null,
+     * <code>name</code> will be used.
+     * @param ignore If <code>true</code> and the attribute is not found, or an
+     * exception happens, the problem will be ignored.
+     * @param attributes The map of the attributes to fill.
+     * @param request The request.
+     */
+    private void importSingleAttribute(TilesContainer container,
+            AttributeContext attributeContext, String name, String toName,
+            boolean ignore, Map<String, Object> attributes,
+            Request request) {
+        Attribute attr = attributeContext.getAttribute(name);
+        if (attr != null) {
+            try {
+                Object attributeValue = container.evaluate(attr,
+                        request);
+                if (attributeValue == null) {
+                    if (!ignore) {
+                        throw new NoSuchAttributeException(
+                                "Error importing attributes. " + "Attribute '"
+                                        + name + "' has a null value ");
+                    }
+                } else {
+                    if (toName != null) {
+                        attributes.put(toName, attributeValue);
+                    } else {
+                        attributes.put(name, attributeValue);
+                    }
+                }
+            } catch (RuntimeException e) {
+                if (!ignore) {
+                    throw e;
+                } else if (log.isDebugEnabled()) {
+                    log.debug("Ignoring Tiles Exception", e);
+                }
+            }
+        } else if (!ignore) {
+            throw new NoSuchAttributeException(
+                    "Error importing attributes. " + "Attribute '" + name
+                            + "' is null");
+        }
+    }
+
+    /**
+     * Imports all the attributes.
+     *
+     * @param names The names of the attributes to be imported.
+     * @param container The Tiles container to use.
+     * @param attributeContext The context from which the attributes will be
+     * got.
+     * @param attributes The map of the attributes to fill.
+     * @param ignore If <code>true</code> and the attribute is not found, or an
+     * exception happens, the problem will be ignored.
+     * @param request The request.
+     */
+    private void importAttributes(Collection<String> names,
+            TilesContainer container, AttributeContext attributeContext,
+            Map<String, Object> attributes, boolean ignore,
+            Request request) {
+        if (names == null || names.isEmpty()) {
+            return;
+        }
+
+        for (String name : names) {
+            if (name == null && !ignore) {
+                throw new NoSuchAttributeException(
+                        "Error importing attributes. "
+                                + "Attribute with null key found.");
+            } else if (name == null) {
+                continue;
+            }
+
+            importSingleAttribute(container, attributeContext, name, name,
+                    ignore, attributes, request);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/InsertAttributeModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/InsertAttributeModel.java
new file mode 100644
index 0000000..708e81a
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/InsertAttributeModel.java
@@ -0,0 +1,205 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.io.IOException;
+import java.util.Deque;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.Request;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * <strong>Inserts the value of an attribute into the page.</strong>
+ * </p>
+ * <p>
+ * This tag can be flexibly used to insert the value of an attribute into a
+ * page. As in other usages in Tiles, every attribute can be determined to have
+ * a "type", either set explicitly when it was defined, or "computed". If the
+ * type is not explicit, then if the attribute value is a valid definition, it
+ * will be inserted as such. Otherwise, if it begins with a "/" character, it
+ * will be treated as a "template". Finally, if it has not otherwise been
+ * assigned a type, it will be treated as a String and included without any
+ * special handling.
+ * </p>
+ *
+ * <p>
+ * <strong>Example : </strong>
+ * </p>
+ *
+ * <pre>
+ * &lt;code&gt;
+ *           &lt;tiles:insertAttribute name=&quot;body&quot; /&gt;
+ *         &lt;/code&gt;
+ * </pre>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class InsertAttributeModel {
+
+    /**
+     * The logging object.
+     */
+    private Logger log = LoggerFactory.getLogger(getClass());
+
+    /**
+     * The attribute resolver to use.
+     */
+    private AttributeResolver attributeResolver;
+
+    /**
+     * Constructor that uses the defaut attribute resolver.
+     *
+     * @since 3.0.0
+     */
+    public InsertAttributeModel() {
+        this(new DefaultAttributeResolver());
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param attributeResolver The attribute resolver to use.
+     * @since 2.2.0
+     */
+    public InsertAttributeModel(AttributeResolver attributeResolver) {
+        this.attributeResolver = attributeResolver;
+    }
+
+    /**
+     * Executes the operation.
+     * @param ignore If <code>true</code>, if an exception happens during
+     * rendering, of if the attribute is null, the problem will be ignored.
+     * @param preparer The preparer to invoke before rendering the attribute.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param defaultValue The default value of the attribute. To use only if
+     * the attribute was not computed.
+     * @param defaultValueRole The default comma-separated list of roles. To use
+     * only if the attribute was not computed.
+     * @param defaultValueType The default type of the attribute. To use only if
+     * the attribute was not computed.
+     * @param name The name of the attribute.
+     * @param value The attribute to use immediately, if not null.
+     * @param flush If <code>true</code>, the response will be flushed after the insert.
+     * @param request The request.
+     * @param modelBody The body.
+     * @throws IOException If an I/O error happens during rendering.
+     * @since 2.2.0
+     */
+    public void execute(boolean ignore, String preparer,
+            String role, Object defaultValue, String defaultValueRole,
+            String defaultValueType, String name, Attribute value,
+            boolean flush, Request request, ModelBody modelBody) throws IOException {
+        TilesContainer container = TilesAccess.getCurrentContainer(request);
+        Deque<Object> composeStack = ComposeStackUtil.getComposeStack(request);
+        Attribute attribute = resolveAttribute(container, ignore, preparer,
+                role, defaultValue, defaultValueRole, defaultValueType, name,
+                value, request);
+        if (attribute != null) {
+            composeStack.push(attribute);
+        }
+        modelBody.evaluateWithoutWriting();
+        container = TilesAccess.getCurrentContainer(request);
+        if (attribute != null) {
+            attribute = (Attribute) composeStack.pop();
+        }
+        renderAttribute(container, ignore, attribute, request);
+        if (flush) {
+            request.getWriter().flush();
+        }
+    }
+
+    /**
+     * Resolves the attribute. and starts the context.
+     *
+     * @param container The Tiles container to use.
+     * @param ignore If <code>true</code>, if an exception happens during
+     * rendering, of if the attribute is null, the problem will be ignored.
+     * @param preparer The preparer to invoke before rendering the attribute.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param defaultValue The default value of the attribute. To use only if
+     * the attribute was not computed.
+     * @param defaultValueRole The default comma-separated list of roles. To use
+     * only if the attribute was not computed.
+     * @param defaultValueType The default type of the attribute. To use only if
+     * the attribute was not computed.
+     * @param name The name of the attribute.
+     * @param value The attribute to use immediately, if not null.
+     * @param request The request.
+     * @return The resolved attribute.
+     */
+    private Attribute resolveAttribute(TilesContainer container,
+            boolean ignore, String preparer, String role, Object defaultValue,
+            String defaultValueRole, String defaultValueType, String name,
+            Attribute value, Request request) {
+        if (preparer != null) {
+            container.prepare(preparer, request);
+        }
+        Attribute attribute = attributeResolver.computeAttribute(container,
+                value, name, role, ignore, defaultValue, defaultValueRole,
+                defaultValueType, request);
+        container.startContext(request);
+        return attribute;
+    }
+
+    /**
+     * Renders the attribute as a string.
+     * @param container The Tiles container to use.
+     * @param ignore If <code>true</code>, if an exception happens during
+     * rendering, of if the attribute is null, the problem will be ignored.
+     * @param attribute The attribute to use, previously resolved.
+     * @param request The request.
+     *
+     * @throws IOException If an I/O error happens during rendering.
+     */
+    private void renderAttribute(TilesContainer container, boolean ignore,
+            Attribute attribute, Request request) throws IOException {
+        try {
+            if (attribute == null && ignore) {
+                return;
+            }
+            container.render(attribute, request);
+        } catch (IOException e) {
+            if (!ignore) {
+                throw e;
+            } else if (log.isDebugEnabled()) {
+                log.debug("Ignoring exception", e);
+            }
+        } catch (RuntimeException e) {
+            if (!ignore) {
+                throw e;
+            } else if (log.isDebugEnabled()) {
+                log.debug("Ignoring exception", e);
+            }
+        } finally {
+            container.endContext(request);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/InsertDefinitionModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/InsertDefinitionModel.java
new file mode 100644
index 0000000..1797b15
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/InsertDefinitionModel.java
@@ -0,0 +1,140 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.io.IOException;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.annotation.Parameter;
+import org.apache.tiles.request.Request;
+
+/**
+ * <p>
+ * <strong>Insert a definition.</strong>
+ * </p>
+ * <p>
+ * Insert a definition with the possibility to override and specify parameters
+ * (called attributes). A definition can be seen as a (partially or totally)
+ * filled template that can override or complete attribute values.
+ * <code>&lt;tiles:insertDefinition&gt;</code> allows to define these attributes
+ * and pass them to the inserted jsp page, called template. Attributes are
+ * defined using nested tag <code>&lt;tiles:putAttribute&gt;</code> or
+ * <code>&lt;tiles:putListAttribute&gt;</code>.
+ * </p>
+ * <p>
+ * You must specify <code>name</code> tag attribute, for inserting a definition
+ * from definitions factory.
+ * </p>
+ * <p>
+ * <strong>Example : </strong>
+ * </p>
+ *
+ * <pre>
+ * &lt;code&gt;
+ *           &lt;tiles:insertDefinition name=&quot;.my.tiles.defininition flush=&quot;true&quot;&gt;
+ *              &lt;tiles:putAttribute name=&quot;title&quot; value=&quot;My first page&quot; /&gt;
+ *              &lt;tiles:putAttribute name=&quot;header&quot; value=&quot;/common/header.jsp&quot; /&gt;
+ *              &lt;tiles:putAttribute name=&quot;footer&quot; value=&quot;/common/footer.jsp&quot; /&gt;
+ *              &lt;tiles:putAttribute name=&quot;menu&quot; value=&quot;/basic/menu.jsp&quot; /&gt;
+ *              &lt;tiles:putAttribute name=&quot;body&quot; value=&quot;/basic/helloBody.jsp&quot; /&gt;
+ *           &lt;/tiles:insertDefinition&gt;
+ *         &lt;/code&gt;
+ * </pre>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class InsertDefinitionModel {
+
+    /**
+     * Executes the operation.
+     * @param definitionName The name of the definition to render.
+     * @param template If specified, this template will be used instead of the
+     * one used by the definition.
+     * @param templateType The type of the template attribute.
+     * @param templateExpression The expression to evaluate to get the value of the template.
+     * @param role A comma-separated list of roles. If present, the definition
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param preparer The preparer to use to invoke before the definition is
+     * rendered. If specified, it overrides the preparer specified in the
+     * definition itself.
+     * @param flush If <code>true</code>, the response will be flushed after the insert.
+     * @param request The request.
+     * @param modelBody The body.
+     * @throws IOException If something goes wrong.
+     * @since 2.2.0
+     */
+    public void execute(
+            @Parameter(name = "name", required = true) String definitionName,
+            String template, String templateType, String templateExpression,
+            String role, String preparer, boolean flush, Request request, ModelBody modelBody)
+            throws IOException {
+        TilesContainer container = TilesAccess.getCurrentContainer(request);
+        container.startContext(request);
+        modelBody.evaluateWithoutWriting();
+        container = TilesAccess.getCurrentContainer(request);
+        renderDefinition(container, definitionName, template, templateType,
+                templateExpression, role, preparer, flush, request);
+    }
+
+    /**
+     * Renders a definition.
+     *
+     * @param container The container to use.
+     * @param definitionName The name of the definition to render.
+     * @param template If specified, this template will be used instead of the
+     * one used by the definition.
+     * @param templateType The type of the template attribute.
+     * @param templateExpression The expression to evaluate to get the value of the template.
+     * @param role A comma-separated list of roles. If present, the definition
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param preparer The preparer to use to invoke before the definition is
+     * rendered. If specified, it overrides the preparer specified in the
+     * definition itself.
+     * @param flush If <code>true</code>, the response will be flushed after the insert.
+     * @param request The request.
+     * @throws IOException If something goes wrong.
+     */
+    private void renderDefinition(TilesContainer container,
+            String definitionName, String template, String templateType,
+            String templateExpression, String role, String preparer,
+            boolean flush, Request request) throws IOException {
+        try {
+            AttributeContext attributeContext = container
+                    .getAttributeContext(request);
+            Attribute templateAttribute = Attribute.createTemplateAttribute(template,
+                    templateExpression, templateType, role);
+            attributeContext.setPreparer(preparer);
+            attributeContext.setTemplateAttribute(templateAttribute);
+            container.render(definitionName, request);
+            if (flush) {
+                request.getWriter().flush();
+            }
+        } finally {
+            container.endContext(request);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/InsertTemplateModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/InsertTemplateModel.java
new file mode 100644
index 0000000..b17ed68
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/InsertTemplateModel.java
@@ -0,0 +1,134 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.io.IOException;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.annotation.Parameter;
+import org.apache.tiles.request.Request;
+
+/**
+ * <p>
+ * <strong>Insert a template.</strong>
+ * </p>
+ * <p>
+ * Insert a template with the possibility to pass parameters (called
+ * attributes). A template can be seen as a procedure that can take parameters
+ * or attributes. <code>&lt;tiles:insertTemplate&gt;</code> allows to define
+ * these attributes and pass them to the inserted jsp page, called template.
+ * Attributes are defined using nested tag
+ * <code>&lt;tiles:putAttribute&gt;</code> or
+ * <code>&lt;tiles:putListAttribute&gt;</code>.
+ * </p>
+ * <p>
+ * You must specify <code>template</code> attribute, for inserting a template
+ * </p>
+ *
+ * <p>
+ * <strong>Example : </strong>
+ * </p>
+ *
+ * <pre>
+ * &lt;code&gt;
+ *           &lt;tiles:insertTemplate template=&quot;/basic/myLayout.jsp&quot; flush=&quot;true&quot;&gt;
+ *              &lt;tiles:putAttribute name=&quot;title&quot; value=&quot;My first page&quot; /&gt;
+ *              &lt;tiles:putAttribute name=&quot;header&quot; value=&quot;/common/header.jsp&quot; /&gt;
+ *              &lt;tiles:putAttribute name=&quot;footer&quot; value=&quot;/common/footer.jsp&quot; /&gt;
+ *              &lt;tiles:putAttribute name=&quot;menu&quot; value=&quot;/basic/menu.jsp&quot; /&gt;
+ *              &lt;tiles:putAttribute name=&quot;body&quot; value=&quot;/basic/helloBody.jsp&quot; /&gt;
+ *           &lt;/tiles:insertTemplate&gt;
+ *         &lt;/code&gt;
+ * </pre>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class InsertTemplateModel {
+
+    /**
+     * Executes the operation.
+     * @param template The template to render.
+     * @param templateType The type of the template attribute.
+     * @param templateExpression The expression to evaluate to get the value of the template.
+     * @param role A comma-separated list of roles. If present, the template
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param preparer The preparer to use to invoke before the definition is
+     * rendered. If specified, it overrides the preparer specified in the
+     * definition itself.
+     * @param flush If <code>true</code>, the response will be flushed after the insert.
+     * @param request The request.
+     * @param modelBody The body.
+     * @throws IOException If something goes wrong.
+     * @since 2.2.0
+     */
+    public void execute(@Parameter(required = true) String template,
+            String templateType, String templateExpression, String role,
+            String preparer, boolean flush, Request request, ModelBody modelBody)
+            throws IOException {
+        TilesContainer container = TilesAccess.getCurrentContainer(request);
+        container.startContext(request);
+        modelBody.evaluateWithoutWriting();
+        container = TilesAccess.getCurrentContainer(request);
+        renderTemplate(container, template, templateType, templateExpression,
+                role, preparer, flush, request);
+    }
+
+    /**
+     * Renders a template.
+     *
+     * @param container The container to use.
+     * @param template The template to render.
+     * @param templateType The type of the template attribute.
+     * @param templateExpression The expression to evaluate to get the value of the template.
+     * @param role A comma-separated list of roles. If present, the template
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param preparer The preparer to use to invoke before the definition is
+     * rendered. If specified, it overrides the preparer specified in the
+     * definition itself.
+     * @param flush If <code>true</code>, the response will be flushed after the insert.
+     * @param request The request.
+     * @throws IOException If something goes wrong.
+     */
+    private void renderTemplate(TilesContainer container, String template,
+            String templateType, String templateExpression, String role,
+            String preparer, boolean flush, Request request) throws IOException {
+        try {
+            AttributeContext attributeContext = container
+                    .getAttributeContext(request);
+            Attribute templateAttribute = Attribute.createTemplateAttribute(template,
+                    templateExpression, templateType, role);
+            attributeContext.setPreparer(preparer);
+            attributeContext.setTemplateAttribute(templateAttribute);
+            container.renderContext(request);
+            if (flush) {
+                request.getWriter().flush();
+            }
+        } finally {
+            container.endContext(request);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/NoSuchAttributeException.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/NoSuchAttributeException.java
new file mode 100644
index 0000000..b2f6e5b
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/NoSuchAttributeException.java
@@ -0,0 +1,72 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.template;
+
+import org.apache.tiles.TilesException;
+
+/**
+ * Indicates that a named attribute has not been found.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class NoSuchAttributeException extends TilesException {
+
+    /**
+     * Constructor.
+     *
+     * @since 2.2.0
+     */
+    public NoSuchAttributeException() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @since 2.2.0
+     */
+    public NoSuchAttributeException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e The exception to be wrapped.
+     * @since 2.2.0
+     */
+    public NoSuchAttributeException(Exception e) {
+        super(e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The detail message.
+     * @param e The exception to be wrapped.
+     * @since 2.2.0
+     */
+    public NoSuchAttributeException(String message, Exception e) {
+        super(message, e);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/PutAttributeModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/PutAttributeModel.java
new file mode 100644
index 0000000..aa6551c
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/PutAttributeModel.java
@@ -0,0 +1,154 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.io.IOException;
+import java.util.Deque;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.Expression;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.annotation.Parameter;
+import org.apache.tiles.request.Request;
+
+/**
+ * <p>
+ * <strong>Put an attribute in enclosing attribute container tag.</strong>
+ * </p>
+ * <p>
+ * Enclosing attribute container tag can be :
+ * <ul>
+ * <li>&lt;initContainer&gt;</li>
+ * <li>&lt;definition&gt;</li>
+ * <li>&lt;insertAttribute&gt;</li>
+ * <li>&lt;insertDefinition&gt;</li>
+ * <li>&lt;putListAttribute&gt;</li>
+ * </ul>
+ * (or any other tag which implements the <code>PutAttributeTagParent</code>
+ * interface. Exception is thrown if no appropriate tag can be found.
+ * </p>
+ * <p>
+ * Put tag can have following atributes :
+ * <ul>
+ * <li>name : Name of the attribute</li>
+ * <li>value : value to put as attribute</li>
+ * <li>type : value type. Possible type are : string (value is used as direct
+ * string), template (value is used as a page url to insert), definition (value
+ * is used as a definition name to insert), object (value is used as it is)</li>
+ * <li>role : Role to check when 'insertAttribute' will be called.</li>
+ * </ul>
+ * </p>
+ * <p>
+ * Value can also come from tag body. Tag body is taken into account only if
+ * value is not set by one of the tag attributes. In this case Attribute type is
+ * "string", unless tag body define another type.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class PutAttributeModel {
+
+    /**
+     * Executes the operation.
+     * @param name The name of the attribute to put.
+     * @param value The value of the attribute. Use this parameter, or
+     * expression, or body.
+     * @param expression The expression to calculate the value from. Use this
+     * parameter, or value, or body.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param type The type (renderer) of the attribute.
+     * @param cascade If <code>true</code> the attribute will be cascaded to all nested attributes.
+     * @param request The request.
+     * @param modelBody The body.
+     * @throws IOException If the body cannot be evaluated.
+     * @since 2.2.0
+     */
+    public void execute(@Parameter(required = true) String name, Object value,
+            String expression, String role, String type, boolean cascade,
+            Request request, ModelBody modelBody) throws IOException {
+        Deque<Object> composeStack = ComposeStackUtil.getComposeStack(request);
+        Attribute attribute = new Attribute();
+        composeStack.push(attribute);
+        String currentBody = modelBody.evaluateAsString();
+        TilesContainer container = TilesAccess.getCurrentContainer(request);
+        attribute = (Attribute) composeStack.pop();
+        putAttributeInParent(attribute, container, composeStack, name,
+                value, expression, currentBody, role, type, cascade, request);
+    }
+
+    /**
+     * Determines the parent and puts the attribute inside it.
+     *
+     * @param attribute The attribute to put;
+     * @param container The Tiles container to use.
+     * @param composeStack The composing stack.
+     * @param name The name of the attribute to put.
+     * @param value The value of the attribute. Use this parameter, or
+     * expression, or body.
+     * @param expression The expression to calculate the value from. Use this
+     * parameter, or value, or body.
+     * @param body The body of the tag. Use this parameter, or value, or
+     * expression.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param type The type (renderer) of the attribute.
+     * @param cascade If <code>true</code> the attribute will be cascaded to all nested attributes.
+     * @param request The request.
+     */
+    private void putAttributeInParent(Attribute attribute,
+            TilesContainer container, Deque<Object> composeStack, String name,
+            Object value, String expression, String body, String role,
+            String type, boolean cascade, Request request) {
+        AttributeContext attributeContext = null;
+        if (!composeStack.isEmpty()) {
+            Object obj = composeStack.peek();
+            if (obj instanceof AttributeContext) {
+                attributeContext = (AttributeContext) obj;
+            }
+        }
+        if (attributeContext == null) {
+            attributeContext = container.getAttributeContext(request);
+        }
+        if (value != null) {
+            attribute.setValue(value);
+        } else if (attribute.getValue() == null && body != null) {
+            attribute.setValue(body);
+        }
+        if (expression != null) {
+            attribute.setExpressionObject(Expression
+                    .createExpressionFromDescribedExpression(expression));
+        }
+        if (role != null) {
+            attribute.setRole(role);
+        }
+        if (type != null) {
+            attribute.setRenderer(type);
+        }
+
+        attributeContext.putAttribute(name, attribute, cascade);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/PutListAttributeModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/PutListAttributeModel.java
new file mode 100644
index 0000000..6401443
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/PutListAttributeModel.java
@@ -0,0 +1,87 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import java.io.IOException;
+import java.util.Deque;
+
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.Definition;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.annotation.Parameter;
+import org.apache.tiles.request.Request;
+
+/**
+ * <p>
+ * <strong>Declare a list that will be pass as attribute to tile. </strong>
+ * </p>
+ * <p>
+ * Declare a list that will be pass as attribute to tile. List elements are
+ * added using the tags 'addAttribute' or 'addListAttribute'. This tag can only
+ * be used inside 'insertTemplate', 'insertDefinition', 'definition' tags.
+ * </p>
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class PutListAttributeModel {
+
+    /**
+     * Executes the model.
+     *
+     * @param name The name of the attribute to put.
+     * @param role A comma-separated list of roles. If present, the attribute
+     * will be rendered only if the current user belongs to one of the roles.
+     * @param inherit If <code>true</code>, the list attribute will use, as first elements, the
+     * list contained in the list attribute, put with the same name, of the containing definition.
+     * @param cascade If <code>true</code> the attribute will be cascaded to all nested attributes.
+     * @param request The request.
+     * @param modelBody The body.
+     * @throws IOException If the body cannot be evaluated.
+     */
+    public void execute(@Parameter(required = true) String name, String role,
+            boolean inherit, boolean cascade, Request request,
+            ModelBody modelBody) throws IOException {
+        Deque<Object> composeStack = ComposeStackUtil.getComposeStack(request);
+        ListAttribute listAttribute = new ListAttribute();
+        listAttribute.setRole(role);
+        listAttribute.setInherit(inherit);
+        composeStack.push(listAttribute);
+        modelBody.evaluateWithoutWriting();
+        TilesContainer container = TilesAccess.getCurrentContainer(request);
+        listAttribute = (ListAttribute) composeStack.pop();
+        AttributeContext attributeContext = null;
+        if (!composeStack.isEmpty()) {
+            Object obj = composeStack.peek();
+            if (obj instanceof Definition) {
+                attributeContext = (AttributeContext) obj;
+            }
+        }
+        if (attributeContext == null) {
+            attributeContext = container.getAttributeContext(request);
+        }
+        attributeContext.putAttribute(name, listAttribute, cascade);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/SetCurrentContainerModel.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/SetCurrentContainerModel.java
new file mode 100644
index 0000000..5f7b014
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/SetCurrentContainerModel.java
@@ -0,0 +1,44 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.template;
+
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.Request;
+
+/**
+ * Selects a container to be used as the "current" container.
+ *
+ * @version $Rev$ $Date$
+ * @since 3.0.0
+ */
+public class SetCurrentContainerModel {
+
+    /**
+     * Executes the model.
+     *
+     * @param containerKey The key of the container to be used as "current". If
+     * <code>null</code>, the default one will be used.
+     * @param request The request.
+     */
+    public void execute(String containerKey, Request request) {
+        TilesAccess.setCurrentContainer(request, containerKey);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/package-info.java b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/package-info.java
new file mode 100644
index 0000000..828b7ac
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/main/java/org/apache/tiles/template/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id: package-info.java 1049711 2010-12-15 21:12:00Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Tiles template classes, that enable to write support code for template languages (JSP, FreeMarker, Velocity).
+ */
+package org.apache.tiles.template;
diff --git a/TILES_3_0_X/tiles-template/src/site/site.xml b/TILES_3_0_X/tiles-template/src/site/site.xml
new file mode 100644
index 0000000..5f63630
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Template Technologies Support">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/AddAttributeModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/AddAttributeModelTest.java
new file mode 100644
index 0000000..17c9006
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/AddAttributeModelTest.java
@@ -0,0 +1,111 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link AddAttributeModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AddAttributeModelTest {
+
+    /**
+     * The model to test.
+     */
+    private AddAttributeModel model;
+
+    /** Sets up the test. */
+    @Before
+    public void setUp() {
+        model = new AddAttributeModel();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.AddAttributeModel
+     * #execute(java.lang.Object, java.lang.String, java.lang.String, java.lang.String,
+     * Request, ModelBody)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecute() throws IOException {
+        Request request = createMock(Request.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+        Deque<Object> composeStack = new ArrayDeque<Object>();
+        ListAttribute listAttribute = new ListAttribute();
+        Attribute attribute;
+        composeStack.push(listAttribute);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+
+        expect(request.getContext("request")).andReturn(requestScope).times(2);
+        expect(modelBody.evaluateAsString()).andReturn(null);
+        expect(modelBody.evaluateAsString()).andReturn("myBody");
+
+        replay(request, modelBody);
+        model.execute("myValue", "myExpression", "myRole", "myType",
+                request, modelBody);
+        List<Attribute> attributes = listAttribute.getValue();
+        assertEquals(1, attributes.size());
+        attribute = attributes.iterator().next();
+        assertEquals("myValue", attribute.getValue());
+        assertEquals("myExpression", attribute.getExpressionObject().getExpression());
+        assertEquals("myRole", attribute.getRole());
+        assertEquals("myType", attribute.getRenderer());
+
+        composeStack.clear();
+        listAttribute = new ListAttribute();
+        attribute = new Attribute();
+        composeStack.push(listAttribute);
+        composeStack.push(attribute);
+
+        model.execute(null, "myExpression", "myRole", "myType", request,
+                modelBody);
+        attributes = listAttribute.getValue();
+        assertEquals(1, attributes.size());
+        attribute = attributes.iterator().next();
+        assertEquals("myBody", attribute.getValue());
+        assertEquals("myExpression", attribute.getExpressionObject()
+                .getExpression());
+        assertEquals("myRole", attribute.getRole());
+        assertEquals("myType", attribute.getRenderer());
+        verify(request, modelBody);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/AddListAttributeModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/AddListAttributeModelTest.java
new file mode 100644
index 0000000..a60e89e
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/AddListAttributeModelTest.java
@@ -0,0 +1,88 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link AddListAttributeModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AddListAttributeModelTest {
+
+    /**
+     * The model to test.
+     */
+    private AddListAttributeModel model;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        model = new AddListAttributeModel();
+    }
+
+    /**
+     * Test method for
+     * {@link AddListAttributeModel#execute(String, Request, ModelBody)}
+     * .
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecute() throws IOException {
+        Deque<Object> composeStack = new ArrayDeque<Object>();
+        Request request = createMock(Request.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        ModelBody modelBody = createMock(ModelBody.class);
+
+        modelBody.evaluateWithoutWriting();
+        requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+        expect(request.getContext("request")).andReturn(requestScope);
+
+        replay(request, modelBody);
+        ListAttribute parent = new ListAttribute();
+        composeStack.push(parent);
+        model.execute("myRole", request, modelBody);
+        assertEquals(1, composeStack.size());
+        assertEquals(parent, composeStack.pop());
+        assertEquals(1, parent.getValue().size());
+        ListAttribute listAttribute = (ListAttribute) parent.getValue().get(0);
+        assertEquals("myRole", listAttribute.getRole());
+        verify(request, modelBody);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/ComposeStackUtilTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/ComposeStackUtilTest.java
new file mode 100644
index 0000000..d857adc
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/ComposeStackUtilTest.java
@@ -0,0 +1,125 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.ArrayDeque;
+import java.util.Date;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.request.Request;
+import org.apache.tiles.template.ComposeStackUtil;
+import org.junit.Test;
+
+/**
+ * Tests {@link ComposeStackUtil}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ComposeStackUtilTest {
+
+    /**
+     * An integer value.
+     */
+    private static final int INT_VALUE = 3;
+
+    /**
+     * A long value.
+     */
+    private static final long LONG_VALUE = 2L;
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ComposeStackUtil
+     * #findAncestorWithClass(java.util.Stack, java.lang.Class)}.
+     */
+    @Test
+    public void testFindAncestorWithClass() {
+        Deque<Object> composeStack = new ArrayDeque<Object>();
+        Integer integerValue = new Integer(1);
+        Long longValue = new Long(LONG_VALUE);
+        String stringValue = "my value";
+        Integer integerValue2 = new Integer(INT_VALUE);
+        composeStack.push(integerValue);
+        composeStack.push(longValue);
+        composeStack.push(stringValue);
+        composeStack.push(integerValue2);
+        assertEquals(integerValue2, ComposeStackUtil.findAncestorWithClass(composeStack, Integer.class));
+        assertEquals(longValue, ComposeStackUtil.findAncestorWithClass(composeStack, Long.class));
+        assertEquals(stringValue, ComposeStackUtil.findAncestorWithClass(composeStack, String.class));
+        assertEquals(integerValue2, ComposeStackUtil.findAncestorWithClass(composeStack, Object.class));
+        assertNull(ComposeStackUtil.findAncestorWithClass(composeStack, Date.class));
+    }
+
+    /**
+     * Tests {@link ComposeStackUtil#getComposeStack(org.apache.tiles.request.Request)}.
+     */
+    @Test
+    public void testGetComposeStackNull() {
+        Request request = createMock(Request.class);
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        expect(request.getContext("request")).andReturn(requestScope);
+
+        replay(request);
+        assertSame(ComposeStackUtil.getComposeStack(request),
+                requestScope.get(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME));
+        verify(request);
+    }
+
+    /**
+     * Tests {@link ComposeStackUtil#getComposeStack(org.apache.tiles.request.Request)}.
+     */
+    @Test
+    public void testGetComposeStackNotNull() {
+        Request request = createMock(Request.class);
+        @SuppressWarnings("unchecked")
+        Deque<Object> composeStack = createMock(Deque.class);
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+        expect(request.getContext("request")).andReturn(requestScope);
+
+        replay(request, composeStack);
+        assertSame(composeStack, ComposeStackUtil.getComposeStack(request));
+        verify(request, composeStack);
+    }
+
+    /**
+     * Tests {@link ComposeStackUtil#getComposeStack(org.apache.tiles.request.Request)}.
+     */
+    @Test
+    public void testGetComposeStackNoNull() {
+        Request request = createMock(Request.class);
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        expect(request.getContext("request")).andReturn(requestScope);
+
+        replay(request);
+        assertSame(ComposeStackUtil.getComposeStack(request),
+                requestScope.get(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME));
+        verify(request);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/DefaultAttributeResolverTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/DefaultAttributeResolverTest.java
new file mode 100644
index 0000000..98ac3fe
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/DefaultAttributeResolverTest.java
@@ -0,0 +1,163 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.Expression;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link DefaultAttributeResolver}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefaultAttributeResolverTest {
+
+    /**
+     * The resolver to test.
+     */
+    private DefaultAttributeResolver resolver;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        resolver = new DefaultAttributeResolver();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.DefaultAttributeResolver
+     * #computeAttribute(org.apache.tiles.TilesContainer, org.apache.tiles.Attribute,
+     * java.lang.String, java.lang.String, boolean, java.lang.Object, java.lang.String,
+     * java.lang.String, Request)}.
+     */
+    @Test
+    public void testComputeAttributeInContext() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Request request = createMock(Request.class);
+        Attribute attribute = new Attribute("myValue", Expression
+                .createExpression("myExpression", null), "myRole", "myRenderer");
+
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(attribute);
+
+        replay(container, attributeContext, request);
+        assertEquals(attribute, resolver.computeAttribute(container, null,
+                "myName", null, false, null, null, null, request));
+        verify(container, attributeContext, request);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.DefaultAttributeResolver
+     * #computeAttribute(org.apache.tiles.TilesContainer, org.apache.tiles.Attribute,
+     * java.lang.String, java.lang.String, boolean, java.lang.Object, java.lang.String,
+     * java.lang.String, Request)}.
+     */
+    @Test
+    public void testComputeAttributeInCall() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        Attribute attribute = new Attribute("myValue", Expression
+                .createExpression("myExpression", null), "myRole", "myRenderer");
+
+        replay(container, request);
+        assertEquals(attribute, resolver.computeAttribute(container, attribute,
+                null, null, false, null, null, null, request));
+        verify(container, request);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.DefaultAttributeResolver
+     * #computeAttribute(org.apache.tiles.TilesContainer, org.apache.tiles.Attribute,
+     * java.lang.String, java.lang.String, boolean, java.lang.Object, java.lang.String,
+     * java.lang.String, Request)}.
+     */
+    @Test
+    public void testComputeAttributeDefault() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(null);
+
+        replay(container, attributeContext, request);
+        Attribute attribute = resolver.computeAttribute(container, null,
+                "myName", null, false, "defaultValue", "defaultRole",
+                "defaultType", request);
+        assertEquals("defaultValue", attribute.getValue());
+        assertEquals("defaultRole", attribute.getRole());
+        assertEquals("defaultType", attribute.getRenderer());
+        verify(container, attributeContext, request);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.DefaultAttributeResolver
+     * #computeAttribute(org.apache.tiles.TilesContainer, org.apache.tiles.Attribute,
+     * java.lang.String, java.lang.String, boolean, java.lang.Object, java.lang.String,
+     * java.lang.String, Request)}.
+     */
+    @Test(expected = NoSuchAttributeException.class)
+    public void testComputeAttributeException() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Request request = createMock(Request.class);
+
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(null);
+
+        replay(container, attributeContext, request);
+        resolver.computeAttribute(container, null, "myName", null, false, null,
+                "defaultRole", "defaultType", request);
+        verify(container, attributeContext, request);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.DefaultAttributeResolver
+     * #computeAttribute(org.apache.tiles.TilesContainer, org.apache.tiles.Attribute,
+     * java.lang.String, java.lang.String, boolean, java.lang.Object, java.lang.String,
+     * java.lang.String, Request)}.
+     */
+    @Test
+    public void testComputeAttributeIgnore() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Request request = createMock(Request.class);
+
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(null);
+
+        replay(container, attributeContext, request);
+        assertNull(resolver.computeAttribute(container, null, "myName", null, true, null,
+                "defaultRole", "defaultType", request));
+        verify(container, attributeContext, request);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/DefinitionModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/DefinitionModelTest.java
new file mode 100644
index 0000000..08d73e5
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/DefinitionModelTest.java
@@ -0,0 +1,96 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.mgmt.MutableTilesContainer;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link DefinitionModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefinitionModelTest {
+
+    /**
+     * The model to test.
+     */
+    private DefinitionModel model;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        model = new DefinitionModel();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.DefinitionModel
+     * #execute(java.lang.String, java.lang.String,
+     * java.lang.String, java.lang.String, java.lang.String, Request, ModelBody)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecute() throws IOException {
+        MutableTilesContainer container = createMock(MutableTilesContainer.class);
+        Request request = createMock(Request.class);
+        Deque<Object> composeStack = new ArrayDeque<Object>();
+        Attribute attribute = new Attribute();
+        composeStack.push(attribute);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+
+        modelBody.evaluateWithoutWriting();
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        container.register((Definition) notNull(), eq(request));
+
+        replay(container, request, modelBody, applicationContext);
+        model.execute("myName", "myTemplate", "myRole", "myExtends",
+                "myPreparer", request, modelBody);
+        assertEquals(1, composeStack.size());
+        attribute = (Attribute) composeStack.peek();
+        assertEquals("definition", attribute.getRenderer());
+        verify(container, request, modelBody, applicationContext);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/GetAsStringModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/GetAsStringModelTest.java
new file mode 100644
index 0000000..800af45
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/GetAsStringModelTest.java
@@ -0,0 +1,144 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link GetAsStringModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class GetAsStringModelTest {
+
+    /**
+     * The mock resolver.
+     */
+    private AttributeResolver resolver;
+
+    /**
+     * The model to test.
+     */
+    private GetAsStringModel model;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        resolver = createMock(AttributeResolver.class);
+        model = new GetAsStringModel(resolver);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.GetAsStringModel
+     * #execute(boolean, java.lang.String, java.lang.String,
+     * java.lang.Object, java.lang.String, java.lang.String, java.lang.String,
+     * org.apache.tiles.Attribute, Request, ModelBody)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecute() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        Attribute attribute = new Attribute("myValue");
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Request request = createMock(Request.class);
+        Writer writer = createMock(Writer.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Deque<Object> composeStack = new ArrayDeque<Object>();
+        requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+
+        modelBody.evaluateWithoutWriting();
+        expect(request.getApplicationContext()).andReturn(applicationContext).times(2);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(request.getWriter()).andReturn(writer);
+        container.prepare("myPreparer", request);
+        expect(resolver.computeAttribute(container, attribute, "myName", "myRole", false, "myDefaultValue",
+                "myDefaultValueRole", "myDefaultValueType", request)).andReturn(attribute);
+        expect(container.startContext(request)).andReturn(attributeContext);
+        writer.write("myValue");
+        container.endContext(request);
+
+        replay(resolver, container, writer, request, applicationContext, modelBody);
+        model.execute(false, "myPreparer", "myRole", "myDefaultValue", "myDefaultValueRole", "myDefaultValueType",
+                "myName", attribute, request, modelBody);
+        verify(resolver, container, writer, request, applicationContext, modelBody);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.GetAsStringModel
+     * #execute(boolean, java.lang.String, java.lang.String,
+     * java.lang.Object, java.lang.String, java.lang.String, java.lang.String,
+     * org.apache.tiles.Attribute, Request, ModelBody)} when ignore flag is set.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecuteIgnore() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Request request = createMock(Request.class);
+        Writer writer = createMock(Writer.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Deque<Object> composeStack = new ArrayDeque<Object>();
+        requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+
+        modelBody.evaluateWithoutWriting();
+        expect(request.getApplicationContext()).andReturn(applicationContext).times(2);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(request.getWriter()).andReturn(writer);
+        container.prepare("myPreparer", request);
+        expect(resolver.computeAttribute(container, null, "myName", "myRole", true, "myDefaultValue",
+                "myDefaultValueRole", "myDefaultValueType", request)).andReturn(null);
+        expect(container.startContext(request)).andReturn(attributeContext);
+        container.endContext(request);
+
+        replay(resolver, container, writer, request, applicationContext, modelBody);
+        model.execute(true, "myPreparer", "myRole", "myDefaultValue", "myDefaultValueRole", "myDefaultValueType",
+                "myName", null, request, modelBody);
+        verify(resolver, container, writer, request, applicationContext, modelBody);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/ImportAttributeModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/ImportAttributeModelTest.java
new file mode 100644
index 0000000..b3a0beb
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/ImportAttributeModelTest.java
@@ -0,0 +1,320 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link ImportAttributeModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ImportAttributeModelTest {
+
+    /**
+     * The size of the attributes collection.
+     */
+    private static final int ATTRIBUTES_SIZE = 4;
+
+    /**
+     * The model to test.
+     */
+    private ImportAttributeModel model;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        model = new ImportAttributeModel();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ImportAttributeModel
+     * #execute(String, String, String, boolean, Request).
+     */
+    @Test
+    public void testExecuteSingle() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Attribute attribute = new Attribute();
+        Request request = createMock(Request.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(attribute);
+        expect(container.evaluate(attribute, request)).andReturn("myEvaluatedValue");
+
+        replay(container, attributeContext, request, applicationContext);
+        model.execute("myName", "request", null, false, request);
+        Map<String, Object> attributes = requestScope;
+        assertEquals(2, attributes.size());
+        assertEquals("myEvaluatedValue", attributes.get("myName"));
+        verify(container, attributeContext, request, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ImportAttributeModel
+     * #execute(String, String, String, boolean, Request).
+     */
+    @Test
+    public void testExecuteSingleToName() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Attribute attribute = new Attribute();
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(attribute);
+        expect(container.evaluate(attribute, request)).andReturn("myEvaluatedValue");
+
+        replay(container, attributeContext, request, applicationContext);
+        model.execute("myName", "request", "myToName", false, request);
+        Map<String, Object> attributes = requestScope;
+        assertEquals(2, attributes.size());
+        assertEquals("myEvaluatedValue", attributes.get("myToName"));
+        verify(container, attributeContext, request, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ImportAttributeModel
+     * #execute(String, String, String, boolean, Request).
+     */
+    @Test
+    public void testExecuteAll() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Attribute attribute1 = new Attribute("myValue1");
+        Attribute attribute2 = new Attribute("myValue2");
+        Attribute attribute3 = new Attribute("myValue3");
+        Set<String> cascadedNames = new HashSet<String>();
+        cascadedNames.add("myName1");
+        cascadedNames.add("myName2");
+        Set<String> localNames = new HashSet<String>();
+        localNames.add("myName1");
+        localNames.add("myName3");
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getCascadedAttributeNames()).andReturn(cascadedNames);
+        expect(attributeContext.getLocalAttributeNames()).andReturn(localNames);
+        expect(attributeContext.getAttribute("myName1")).andReturn(attribute1).times(2);
+        expect(attributeContext.getAttribute("myName2")).andReturn(attribute2);
+        expect(attributeContext.getAttribute("myName3")).andReturn(attribute3);
+        expect(container.evaluate(attribute1, request)).andReturn("myEvaluatedValue1").times(2);
+        expect(container.evaluate(attribute2, request)).andReturn("myEvaluatedValue2");
+        expect(container.evaluate(attribute3, request)).andReturn("myEvaluatedValue3");
+
+        replay(container, attributeContext, request, applicationContext);
+        model.execute(null, "request", null, false, request);
+        Map<String, Object> attributes = requestScope;
+        assertEquals(ATTRIBUTES_SIZE, attributes.size());
+        assertEquals("myEvaluatedValue1", attributes.get("myName1"));
+        assertEquals("myEvaluatedValue2", attributes.get("myName2"));
+        assertEquals("myEvaluatedValue3", attributes.get("myName3"));
+        verify(container, attributeContext, request, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ImportAttributeModel
+     * #execute(String, String, String, boolean, Request).
+     */
+    @Test(expected = NoSuchAttributeException.class)
+    public void testExecuteSingleNullAttributeException() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(null);
+
+        replay(container, attributeContext, request, applicationContext);
+        try {
+            model.execute("myName", "request", null, false, request);
+        } finally {
+            verify(container, attributeContext, request, applicationContext);
+        }
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ImportAttributeModel
+     * #execute(String, String, String, boolean, Request).
+     */
+    @Test(expected = NoSuchAttributeException.class)
+    public void testExecuteSingleNullAttributeValueException() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Attribute attribute = new Attribute();
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(attribute);
+        expect(container.evaluate(attribute, request)).andReturn(null);
+
+        replay(container, attributeContext, request, applicationContext);
+        try {
+            model.execute("myName", "request", null, false, request);
+        } finally {
+            verify(container, attributeContext, request, applicationContext);
+        }
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ImportAttributeModel
+     * #execute(String, String, String, boolean, Request).
+     */
+    @Test(expected = RuntimeException.class)
+    public void testExecuteSingleRuntimeException() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Attribute attribute = new Attribute();
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(attribute);
+        expect(container.evaluate(attribute, request)).andThrow(new RuntimeException());
+
+        replay(container, attributeContext, request, applicationContext);
+        try {
+            model.execute("myName", "request", null, false, request);
+        } finally {
+            verify(container, attributeContext, request, applicationContext);
+        }
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ImportAttributeModel
+     * #execute(String, String, String, boolean, Request).
+     */
+    @Test
+    public void testExecuteSingleNullAttributeIgnore() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(null);
+
+        replay(container, attributeContext, request, applicationContext);
+        model.execute("myName", "request", null, true, request);
+        verify(container, attributeContext, request, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ImportAttributeModel
+     * #execute(String, String, String, boolean, Request).
+     */
+    @Test
+    public void testExecuteSingleNullAttributeValueIgnore() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Attribute attribute = new Attribute();
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(attribute);
+        expect(container.evaluate(attribute, request)).andReturn(null);
+
+        replay(container, attributeContext, request, applicationContext);
+        model.execute("myName", "request", null, true, request);
+        verify(container, attributeContext, request, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.ImportAttributeModel
+     * #execute(String, String, String, boolean, Request).
+     */
+    @Test
+    public void testExecuteSingleRuntimeIgnore() {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Attribute attribute = new Attribute();
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myName")).andReturn(attribute);
+        expect(container.evaluate(attribute, request)).andThrow(new RuntimeException());
+
+        replay(container, attributeContext, request, applicationContext);
+        model.execute("myName", "request", null, true, request);
+        verify(container, attributeContext, request, applicationContext);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/InsertAttributeModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/InsertAttributeModelTest.java
new file mode 100644
index 0000000..2a717f8
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/InsertAttributeModelTest.java
@@ -0,0 +1,135 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+
+import java.io.IOException;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link InsertAttributeModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class InsertAttributeModelTest {
+
+    /**
+     * The mock resolver.
+     */
+    private AttributeResolver resolver;
+
+    /**
+     * The model to test.
+     */
+    private InsertAttributeModel model;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        resolver = createMock(AttributeResolver.class);
+        model = new InsertAttributeModel(resolver);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.InsertAttributeModel
+     * #execute(boolean, String, String, Object, String, String, String,
+     * Attribute, boolean, Request, ModelBody)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecute() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        Attribute attribute = new Attribute("myValue");
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+
+        modelBody.evaluateWithoutWriting();
+        expect(request.getApplicationContext()).andReturn(applicationContext).times(2);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+
+        container.prepare("myPreparer", request);
+        expect(resolver.computeAttribute(container, attribute, "myName", "myRole", false, "myDefaultValue",
+                "myDefaultValueRole", "myDefaultValueType", request)).andReturn(attribute);
+        expect(container.startContext(request)).andReturn(attributeContext);
+        container.endContext(request);
+        container.render(attribute, request);
+
+        replay(resolver, container, request, applicationContext, modelBody);
+        model.execute(false, "myPreparer", "myRole", "myDefaultValue", "myDefaultValueRole",
+                "myDefaultValueType", "myName", attribute, false, request, modelBody);
+        verify(resolver, container, request, applicationContext, modelBody);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.InsertAttributeModel
+     * #execute(boolean, String, String, Object, String, String, String,
+     * Attribute, boolean, Request, ModelBody)} when ignore flag is set.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecuteIgnore() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Deque<Object> composeStack = new ArrayDeque<Object>();
+        requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+
+        modelBody.evaluateWithoutWriting();
+        expect(request.getApplicationContext()).andReturn(applicationContext).times(2);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+
+        container.prepare("myPreparer", request);
+        expect(resolver.computeAttribute(container, null, "myName", "myRole", true, "myDefaultValue",
+                "myDefaultValueRole", "myDefaultValueType", request)).andReturn(null);
+        expect(container.startContext(request)).andReturn(attributeContext);
+        container.endContext(request);
+
+        replay(resolver, container, request, applicationContext, modelBody);
+        model.execute(true, "myPreparer", "myRole", "myDefaultValue", "myDefaultValueRole",
+                "myDefaultValueType", "myName", null, false, request, modelBody);
+        verify(resolver, container, request, applicationContext, modelBody);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/InsertDefinitionModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/InsertDefinitionModelTest.java
new file mode 100644
index 0000000..692b934
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/InsertDefinitionModelTest.java
@@ -0,0 +1,94 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link InsertDefinitionModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class InsertDefinitionModelTest {
+
+    /**
+     * The model to test.
+     */
+    private InsertDefinitionModel model;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        model = new InsertDefinitionModel();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.InsertDefinitionModel
+     * #execute(java.lang.String, java.lang.String, String,
+     * String, java.lang.String, java.lang.String, boolean, Request, ModelBody)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecute() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+
+        modelBody.evaluateWithoutWriting();
+        expect(request.getApplicationContext()).andReturn(applicationContext).times(2);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.startContext(request)).andReturn(attributeContext);
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        container.endContext(request);
+        attributeContext.setPreparer("myPreparer");
+        attributeContext.setTemplateAttribute((Attribute) notNull());
+        container.render("myDefinitionName", request);
+
+        replay(container, attributeContext, request, applicationContext, modelBody);
+        model.execute("myDefinitionName", "myTemplate", "myTemplateType",
+                "myTemplateExpression", "myRole", "myPreparer",
+                false, request, modelBody);
+        verify(container, attributeContext, request, applicationContext, modelBody);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/InsertTemplateModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/InsertTemplateModelTest.java
new file mode 100644
index 0000000..99b4fc1
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/InsertTemplateModelTest.java
@@ -0,0 +1,91 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link InsertTemplateModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class InsertTemplateModelTest {
+
+    /**
+     * The model to test.
+     */
+    private InsertTemplateModel model;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        model = new InsertTemplateModel();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.InsertTemplateModel
+     * #execute(String, String, String, String, String, boolean, Request, ModelBody)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecute() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+
+        modelBody.evaluateWithoutWriting();
+        expect(request.getApplicationContext()).andReturn(applicationContext).times(2);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.startContext(request)).andReturn(attributeContext);
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        container.endContext(request);
+        attributeContext.setPreparer("myPreparer");
+        attributeContext.setTemplateAttribute((Attribute) notNull());
+        container.renderContext(request);
+
+        replay(container, attributeContext, request, applicationContext, modelBody);
+        model.execute("myTemplate", "myTemplateType", "myTemplateExpression",
+                "myRole", "myPreparer", false, request, modelBody);
+        verify(container, attributeContext, request, applicationContext, modelBody);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/PutAttributeModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/PutAttributeModelTest.java
new file mode 100644
index 0000000..dafdf76
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/PutAttributeModelTest.java
@@ -0,0 +1,93 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+
+import java.io.IOException;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link PutAttributeModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class PutAttributeModelTest {
+
+    /**
+     * The model to test.
+     */
+    private PutAttributeModel model;
+
+    /** Sets up the test. */
+    @Before
+    public void setUp() {
+        model = new PutAttributeModel();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.PutAttributeModel
+     * #execute(String, Object, String, String, String,
+     * boolean, Request, ModelBody)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecuteListAttribute() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        Request request = createMock(Request.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Deque<Object> composeStack = new ArrayDeque<Object>();
+        ListAttribute listAttribute = new ListAttribute();
+        composeStack.push(listAttribute);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        attributeContext.putAttribute(eq("myName"), (Attribute) notNull(), eq(false));
+        expect(modelBody.evaluateAsString()).andReturn(null);
+
+        replay(container, attributeContext, request, applicationContext, modelBody);
+        model.execute("myName", "myValue", "myExpression", "myRole",
+                "myType", false, request, modelBody);
+        verify(container, attributeContext, request, applicationContext, modelBody);
+    }
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/PutListAttributeModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/PutListAttributeModelTest.java
new file mode 100644
index 0000000..c147a6b
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/PutListAttributeModelTest.java
@@ -0,0 +1,93 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.ListAttribute;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link PutListAttributeModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class PutListAttributeModelTest {
+
+    /**
+     * The model to test.
+     */
+    private PutListAttributeModel model;
+
+    /**
+     * Sets up the test.
+     */
+    @Before
+    public void setUp() {
+        model = new PutListAttributeModel();
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.template.PutListAttributeModel
+     * #execute(String, String, boolean, boolean, Request, ModelBody)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testExecute() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        Request request = createMock(Request.class);
+        Deque<Object> composeStack = new ArrayDeque<Object>();
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(ComposeStackUtil.COMPOSE_STACK_ATTRIBUTE_NAME, composeStack);
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        ModelBody modelBody = createMock(ModelBody.class);
+
+        modelBody.evaluateWithoutWriting();
+        expect(request.getApplicationContext()).andReturn(applicationContext);
+        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
+        expect(container.getAttributeContext(request)).andReturn(attributeContext);
+        attributeContext.putAttribute(eq("myName"), isA(ListAttribute.class), eq(false));
+
+        replay(container, attributeContext, request, modelBody);
+        model.execute("myName", "myRole", false, false, request, modelBody);
+        assertEquals(0, composeStack.size());
+        verify(container, attributeContext, request, modelBody);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/SetCurrentContainerModelTest.java b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/SetCurrentContainerModelTest.java
new file mode 100644
index 0000000..efacd43
--- /dev/null
+++ b/TILES_3_0_X/tiles-template/src/test/java/org/apache/tiles/template/SetCurrentContainerModelTest.java
@@ -0,0 +1,85 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.template;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tiles.NoSuchContainerException;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.junit.Test;
+
+/**
+ * Tests {@link SetCurrentContainerModel}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SetCurrentContainerModelTest {
+
+    /**
+     * Test method for {@link SetCurrentContainerModel#execute(String, Request)}.
+     */
+    @Test
+    public void testSetCurrentContainer() {
+        Request request = createMock(Request.class);
+        ApplicationContext context = createMock(ApplicationContext.class);
+        TilesContainer container = createMock(TilesContainer.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+        attribs.put("myKey", container);
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+        expect(request.getContext("request")).andReturn(requestScope);
+        expect(request.getApplicationContext()).andReturn(context);
+        replay(request, context, container);
+        SetCurrentContainerModel model = new SetCurrentContainerModel();
+        model.execute("myKey", request);
+        assertEquals(container, requestScope.get(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME));
+        verify(request, context, container);
+    }
+
+    /**
+     * Test method for {@link SetCurrentContainerModel#execute(String, Request)}.
+     */
+    @Test(expected = NoSuchContainerException.class)
+    public void testSetCurrentContainerException() {
+        Request request = createMock(Request.class);
+        ApplicationContext context = createMock(ApplicationContext.class);
+        Map<String, Object> attribs = new HashMap<String, Object>();
+
+        expect(request.getApplicationContext()).andReturn(context);
+        expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
+        replay(request, context);
+        try {
+            SetCurrentContainerModel model = new SetCurrentContainerModel();
+            model.execute("myKey", request);
+        } finally {
+            verify(request, context);
+        }
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-test-pom/pom.xml b/TILES_3_0_X/tiles-test-pom/pom.xml
new file mode 100644
index 0000000..d35f727
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>tiles-parent</artifactId>
+    <groupId>org.apache.tiles</groupId>
+    <version>3.0.1</version>
+  </parent>
+  <artifactId>tiles-test-pom</artifactId>
+  <packaging>pom</packaging>
+  <name>Tiles test webapp module collector</name>
+  <description>Collects all the modules of the Tiles test web application.</description>
+  <modules>
+    <module>tiles-test-common</module>
+    <module>tiles-test-alt</module>
+    <module>tiles-test-db</module>
+  	<module>tiles-test</module>
+  </modules>
+</project>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/src/site/site.xml b/TILES_3_0_X/tiles-test-pom/src/site/site.xml
new file mode 100644
index 0000000..ac9f5cc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Test Webapp Module Collector">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/pom.xml b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/pom.xml
new file mode 100644
index 0000000..c387670
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>tiles-test-pom</artifactId>
+    <groupId>org.apache.tiles</groupId>
+    <version>3.0.1</version>
+  </parent>
+  <artifactId>tiles-test-alt</artifactId>
+  <name>Tiles - Test webapp alternate configuration</name>
+  <description>Alternate configuration for the test webapp.</description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestFile>${tiles.manifestfile}</manifestFile>
+            <manifest>
+              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+            </manifest>
+            <manifestEntries>
+              <Tiles-Initializer>org.apache.tiles.test.alt.TestAlternateTilesInitializer</Tiles-Initializer>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+       <groupId>org.apache.tiles</groupId>
+       <artifactId>tiles-test-common</artifactId>
+       <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>2.5</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/java/org/apache/tiles/test/alt/TestAlternateTilesContainerFactory.java b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/java/org/apache/tiles/test/alt/TestAlternateTilesContainerFactory.java
new file mode 100644
index 0000000..b164b4d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/java/org/apache/tiles/test/alt/TestAlternateTilesContainerFactory.java
@@ -0,0 +1,63 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.test.alt;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO;
+import org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.test.factory.TestTilesContainerFactory;
+
+/**
+ * Test alternate Tiles container factory to customize Tiles behaviour.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestAlternateTilesContainerFactory extends TestTilesContainerFactory {
+
+    /**
+     * The number of URLs to load..
+     */
+    private static final int URL_COUNT = 3;
+
+    /** {@inheritDoc} */
+    @Override
+    protected List<ApplicationResource> getSources(ApplicationContext applicationContext) {
+        List<ApplicationResource> urls = new ArrayList<ApplicationResource>(URL_COUNT);
+        urls.add(applicationContext.getResource("classpath:/org/apache/tiles/test/alt/defs/tiles-alt-defs.xml"));
+        urls.add(applicationContext.getResource("classpath:/org/apache/tiles/test/alt/defs/tiles-alt-freemarker-defs.xml"));
+        urls.add(applicationContext.getResource("classpath:/org/apache/tiles/test/alt/defs/tiles-alt-velocity-defs.xml"));
+        return urls;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected BaseLocaleUrlDefinitionDAO instantiateLocaleDefinitionDao(
+            ApplicationContext applicationContext,
+            LocaleResolver resolver) {
+        return new CachingLocaleUrlDefinitionDAO(applicationContext);
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/java/org/apache/tiles/test/alt/TestAlternateTilesInitializer.java b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/java/org/apache/tiles/test/alt/TestAlternateTilesInitializer.java
new file mode 100644
index 0000000..291b639
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/java/org/apache/tiles/test/alt/TestAlternateTilesInitializer.java
@@ -0,0 +1,59 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.test.alt;
+
+import javax.servlet.ServletContext;
+
+import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.servlet.wildcard.WildcardServletApplicationContext;
+import org.apache.tiles.startup.AbstractTilesInitializer;
+
+/**
+ * Test Tiles initializer for Tiles initialization of the alternate container.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestAlternateTilesInitializer extends AbstractTilesInitializer {
+
+    /** {@inheritDoc} */
+    @Override
+    protected AbstractTilesContainerFactory createContainerFactory(
+            ApplicationContext context) {
+        return new TestAlternateTilesContainerFactory();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected String getContainerKey(
+            ApplicationContext applicationContext) {
+        return "alternate";
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected ApplicationContext createTilesApplicationContext(
+            ApplicationContext preliminaryContext) {
+        return new WildcardServletApplicationContext(
+                (ServletContext) preliminaryContext.getContext());
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/java/org/apache/tiles/test/alt/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/java/org/apache/tiles/test/alt/package.html
new file mode 100644
index 0000000..1a1be20
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/java/org/apache/tiles/test/alt/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>Alternate configuration for Tiles test webapp</title>
+</head>
+<body>
+An alternate configuration of the Tiles test webapp.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/META-INF/MANIFEST.MF b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..2c37250
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0

+Archiver-Version: Plexus Archiver

+Created-By: 1.6.0_16 (Sun Microsystems Inc.)

+Built-By: antonio

+Build-Jdk: 1.6.0_16

+Specification-Title: Tiles - Test webapp alternate configuration

+Specification-Version: 2.2.1-SNAPSHOT

+Specification-Vendor: Apache Software Foundation

+Implementation-Title: Tiles - Test webapp alternate configuration

+Implementation-Version: 2.2.1-SNAPSHOT

+Implementation-Vendor-Id: org.apache

+Implementation-Vendor: Apache Software Foundation

+Tiles-Initializer: org.apache.tiles.test.alt.TestAlternateTilesInitial

+ izer

+Export-Package: org.apache.tiles.test.alt;version="2.2.1.SNAPSHOT"

+Tool: Bnd-0.0.311

+Bundle-Name: Tiles - Test webapp alternate configuration

+Bundle-Vendor: Apache Software Foundation

+Bundle-Version: 2.2.1.SNAPSHOT

+Bnd-LastModified: 1254151613654

+Bundle-ManifestVersion: 2

+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt

+Bundle-Description: Alternate configuration for the test webapp.

+Import-Package: org.apache.tiles,org.apache.tiles.context,org.apache.t

+ iles.definition,org.apache.tiles.definition.dao,org.apache.tiles.fact

+ ory,org.apache.tiles.locale,org.apache.tiles.startup,org.apache.tiles

+ .test.alt;version="2.2",org.apache.tiles.test.factory

+Bundle-SymbolicName: org.apache.tiles-test-alt

+Bundle-DocURL: http://tiles.apache.org/framework/tiles-test-pom/tiles-

+ test-alt

+

diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/defs/tiles-alt-defs.xml b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/defs/tiles-alt-defs.xml
new file mode 100644
index 0000000..b75fe3c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/defs/tiles-alt-defs.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+
+<tiles-definitions>
+  <definition name="test.definition" template="/layout.jsp">
+      <put-attribute name="title"  value="This definition is from an alternate container."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+  <definition name="WILDCARD:test.definition*.message*" template="/layout{1}.jsp">
+      <put-attribute name="title"  value="This definition has a message: {2}."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+  <definition name="REGEXP:test\.regexp\.definition(.*)\.message(.*)" template="/layout{1}.jsp">
+      <put-attribute name="title"  value="This definition has a message: {2}."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/defs/tiles-alt-freemarker-defs.xml b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/defs/tiles-alt-freemarker-defs.xml
new file mode 100644
index 0000000..e230658
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/defs/tiles-alt-freemarker-defs.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+
+<tiles-definitions>
+  <definition name="freemarker.test.definition" template="/freemarker/layout.ftl">
+      <put-attribute name="title"  value="This definition is from an alternate container."/>
+      <put-attribute name="header" value="/freemarker/header.ftl"/>
+      <put-attribute name="body"   value="/freemarker/body.ftl"/>
+  </definition>
+  <definition name="freemarker.test.definition.alt" template="/freemarker/layout.ftl">
+      <put-attribute name="title"  value="This definition is from an alternate container."/>
+      <put-attribute name="header" value="/freemarker/header.ftl"/>
+      <put-attribute name="body"   value="/org/apache/tiles/test/alt/freemarker/body.ftl"/>
+  </definition>
+  <definition name="WILDCARD:freemarker.test.definition*.message*" template="/freemarker/layout{1}.ftl">
+      <put-attribute name="title"  value="This definition has a message: {2}."/>
+      <put-attribute name="header" value="/freemarker/header.ftl"/>
+      <put-attribute name="body"   value="/freemarker/body.ftl"/>
+  </definition>
+  <definition name="REGEXP:freemarker\.test\.regexp\.definition(.*)\.message(.*)" template="/freemarker/layout{1}.ftl">
+      <put-attribute name="title"  value="This definition has a message: {2}."/>
+      <put-attribute name="header" value="/freemarker/header.ftl"/>
+      <put-attribute name="body"   value="/freemarker/body.ftl"/>
+  </definition>
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/defs/tiles-alt-velocity-defs.xml b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/defs/tiles-alt-velocity-defs.xml
new file mode 100644
index 0000000..f26dffe
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/defs/tiles-alt-velocity-defs.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+
+<tiles-definitions>
+  <definition name="velocity.test.definition" template="/velocity/layout.vm">
+      <put-attribute name="title"  value="This definition is from an alternate container."/>
+      <put-attribute name="header" value="/velocity/header.vm"/>
+      <put-attribute name="body"   value="/velocity/body.vm"/>
+  </definition>
+  <definition name="velocity.test.definition.alt" template="/velocity/layout.vm">
+      <put-attribute name="title"  value="This definition is from an alternate container."/>
+      <put-attribute name="header" value="/velocity/header.vm"/>
+      <put-attribute name="body"   value="/org/apache/tiles/test/alt/velocity/body.vm"/>
+  </definition>
+  <definition name="WILDCARD:velocity.test.definition*.message*" template="/velocity/layout{1}.vm">
+      <put-attribute name="title"  value="This definition has a message: {2}."/>
+      <put-attribute name="header" value="/velocity/header.vm"/>
+      <put-attribute name="body"   value="/velocity/body.vm"/>
+  </definition>
+  <definition name="REGEXP:velocity\.test\.regexp\.definition(.*)\.message(.*)" template="/velocity/layout{1}.vm">
+      <put-attribute name="title"  value="This definition has a message: {2}."/>
+      <put-attribute name="header" value="/velocity/header.vm"/>
+      <put-attribute name="body"   value="/velocity/body.vm"/>
+  </definition>
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/freemarker/body.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/freemarker/body.ftl
new file mode 100644
index 0000000..584a864
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/freemarker/body.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<div align="center"><b><i>This body is loaded from the "alt" module.</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/freemarker/testinsertdefinition_alt.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/freemarker/testinsertdefinition_alt.ftl
new file mode 100644
index 0000000..f822296
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/freemarker/testinsertdefinition_alt.ftl
@@ -0,0 +1,25 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.setCurrentContainer containerKey="alternate" />
+<@tiles.insertDefinition name="freemarker.test.definition.alt" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/velocity/body.vm b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/velocity/body.vm
new file mode 100644
index 0000000..abcd51b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/velocity/body.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id: body.vm 782137 2009-06-05 21:18:52Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<div align="center"><b><i>This body is loaded from the "alt" module.</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/velocity/testinsertdefinition_alt.vm b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/velocity/testinsertdefinition_alt.vm
new file mode 100644
index 0000000..648bc01
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-alt/src/main/resources/org/apache/tiles/test/alt/velocity/testinsertdefinition_alt.vm
@@ -0,0 +1,23 @@
+#*
+ * $Id: testinsertdefinition.vm 782137 2009-06-05 21:18:52Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+$tiles.setCurrentContainer("alternate")
+#tiles_insertDefinition({"name" : "velocity.test.definition.alt"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-common/pom.xml b/TILES_3_0_X/tiles-test-pom/tiles-test-common/pom.xml
new file mode 100644
index 0000000..be9ae32
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-common/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>tiles-test-pom</artifactId>
+    <groupId>org.apache.tiles</groupId>
+    <version>3.0.1</version>
+  </parent>
+  <groupId>org.apache.tiles</groupId>
+  <artifactId>tiles-test-common</artifactId>
+  <version>3.0.1</version>
+  <name>Tiles - Test webapp common classes</name>
+  <description>Common classes between modules of the test webapp.</description>
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>tiles-extras</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-common/src/main/java/org/apache/tiles/test/factory/TestTilesContainerFactory.java b/TILES_3_0_X/tiles-test-pom/tiles-test-common/src/main/java/org/apache/tiles/test/factory/TestTilesContainerFactory.java
new file mode 100644
index 0000000..1e057bd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-common/src/main/java/org/apache/tiles/test/factory/TestTilesContainerFactory.java
@@ -0,0 +1,69 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.factory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.evaluator.AttributeEvaluatorFactory;
+import org.apache.tiles.extras.complete.CompleteAutoloadTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.ApplicationResource;
+import org.apache.tiles.request.render.BasicRendererFactory;
+import org.apache.tiles.test.renderer.ReverseStringRenderer;
+
+
+/**
+ * Test Tiles container factory to customize Tiles behaviour.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestTilesContainerFactory extends CompleteAutoloadTilesContainerFactory {
+
+    /** {@inheritDoc} */
+    @Override
+    protected void registerAttributeRenderers(
+            BasicRendererFactory rendererFactory,
+            ApplicationContext applicationContext,
+            TilesContainer container,
+            AttributeEvaluatorFactory attributeEvaluatorFactory) {
+        super.registerAttributeRenderers(rendererFactory, applicationContext, container,
+                attributeEvaluatorFactory);
+        ReverseStringRenderer renderer = new ReverseStringRenderer();
+        rendererFactory.registerRenderer("reversed", renderer);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected List<ApplicationResource> getSources(ApplicationContext applicationContext) {
+        List<ApplicationResource> urls = new ArrayList<ApplicationResource>();
+        urls.addAll(applicationContext
+                .getResources("/WEB-INF/**/tiles-defs*.xml"));
+        urls.add(applicationContext.getResource(
+                "classpath:/org/apache/tiles/classpath-defs.xml"));
+        urls.add(applicationContext.getResource(
+                "classpath:/org/apache/tiles/freemarker-classpath-defs.xml"));
+        urls.add(applicationContext.getResource(
+            "classpath:/org/apache/tiles/velocity-classpath-defs.xml"));
+        return urls;
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-common/src/main/java/org/apache/tiles/test/renderer/ReverseStringRenderer.java b/TILES_3_0_X/tiles-test-pom/tiles-test-common/src/main/java/org/apache/tiles/test/renderer/ReverseStringRenderer.java
new file mode 100644
index 0000000..67a699b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-common/src/main/java/org/apache/tiles/test/renderer/ReverseStringRenderer.java
@@ -0,0 +1,50 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.renderer;
+
+import java.io.IOException;
+
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.render.Renderer;
+
+/**
+ * A simple test <code>AttributeRenderer</code>.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ReverseStringRenderer implements Renderer {
+
+    /** {@inheritDoc} */
+    @Override
+    public void render(String value, Request request) throws IOException {
+        char[] array = value.toCharArray();
+        char[] newArray = new char[array.length];
+        for (int i = 0; i < array.length; i++) {
+            newArray[array.length - i - 1] = array[i];
+        }
+        request.getWriter().write(String.valueOf(newArray));
+    }
+
+    @Override
+    public boolean isRenderable(String path, Request request) {
+        return true;
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-common/src/main/java/org/apache/tiles/test/renderer/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test-common/src/main/java/org/apache/tiles/test/renderer/package.html
new file mode 100644
index 0000000..810bb9b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-common/src/main/java/org/apache/tiles/test/renderer/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>Tiles renderer test package</title>
+</head>
+<body>
+Test classes to check renderer functionality.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-db/pom.xml b/TILES_3_0_X/tiles-test-pom/tiles-test-db/pom.xml
new file mode 100644
index 0000000..ea0e593
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-db/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>tiles-test-pom</artifactId>
+    <groupId>org.apache.tiles</groupId>
+    <version>3.0.1</version>
+  </parent>
+  <artifactId>tiles-test-db</artifactId>
+  <name>Tiles - Test webapp database configuration</name>
+  <description>Tiles configuration that uses a database.</description>
+  <dependencies>
+    <dependency>
+       <groupId>org.apache.tiles</groupId>
+       <artifactId>tiles-test-common</artifactId>
+       <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-jdbc</artifactId>
+      <version>2.5.6</version>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestFile>${tiles.manifestfile}</manifestFile>
+            <manifest>
+              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+            </manifest>
+            <manifestEntries>
+              <Tiles-Initializer>org.apache.tiles.test.db.TestDbTilesInitializer</Tiles-Initializer>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/LocaleDbDefinitionDAO.java b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/LocaleDbDefinitionDAO.java
new file mode 100644
index 0000000..5ad76f4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/LocaleDbDefinitionDAO.java
@@ -0,0 +1,256 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.test.db;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.definition.dao.DefinitionDAO;
+import org.apache.tiles.request.locale.LocaleUtil;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.jdbc.core.support.JdbcDaoSupport;
+
+/**
+ * Stub definition DAO to demonstrate that Tiles definitions can be stored in a
+ * Database.
+ *
+ * @version $Rev$ $Date$
+ */
+public class LocaleDbDefinitionDAO extends JdbcDaoSupport implements
+        DefinitionDAO<Locale> {
+
+    /**
+     * Selects a customization by its name.
+     */
+    private static final String SELECT_CUSTOMIZATION_BY_NAME_SQL =
+        "select ID, PARENT_ID, NAME from CUSTOMIZATION "
+            + "where NAME = ? ";
+
+    /**
+     * Selects a customization by its Id.
+     */
+    private static final String SELECT_CUSTOMIZATION_BY_ID_SQL =
+        "select ID, PARENT_ID, NAME from CUSTOMIZATION "
+            + "where ID = ? ";
+
+    /**
+     * Selects a definition by its name and a customization Id.
+     */
+    private static final String SELECT_DEFINITION_SQL =
+        "select ID, PARENT_NAME, NAME, PREPARER, TEMPLATE from DEFINITION "
+            + "where NAME = ? and CUSTOMIZATION_ID = ? ";
+
+    /**
+     * Selects attributes of a definition, given the definition Id.
+     */
+    private static final String SELECT_ATTRIBUTES_SQL =
+        "select ID, NAME, TYPE, VALUE, CASCADE_ATTRIBUTE from ATTRIBUTE "
+            + "where DEFINITION_ID = ? ";
+
+    /**
+     * Maps a row of a {@link ResultSet} to a {@link Definition}.
+     */
+    private final DefinitionRowMapper definitionRowMapper = new DefinitionRowMapper();
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    public Definition getDefinition(String name, Locale locale) {
+        List<Map<String, Object>> customizations = null;
+        Long customizationId = null, parentCustomizationId = null;
+        do {
+            customizations = getJdbcTemplate().queryForList(
+                    SELECT_CUSTOMIZATION_BY_NAME_SQL,
+                    new Object[] { locale.toString() });
+            if (!customizations.isEmpty()) {
+                Map<String, Object> customization = customizations.get(0);
+                customizationId = ((Number) customization.get("ID")).longValue();
+                parentCustomizationId = numberToLong((Number) customization.get("PARENT_ID"));
+            } else {
+                locale = LocaleUtil.getParentLocale(locale);
+            }
+        } while (customizations.isEmpty());
+
+        return getDefinition(name, customizationId, parentCustomizationId,
+                locale);
+    }
+
+    /** {@inheritDoc} */
+    public Map<String, Definition> getDefinitions(Locale locale) {
+        throw new UnsupportedOperationException(
+                "Currently the 'getDefinitions' method is not supported");
+    }
+
+    /**
+     * Loads a definition from the DB.
+     *
+     * @param name The name of the definition.
+     * @param baseCustomizationId The id of the customization item.
+     * @param baseParentCustomizationId The id of the parent customization item.
+     * @param locale The locale.
+     * @return The definition.
+     */
+    @SuppressWarnings("unchecked")
+    protected DbDefinition getDefinition(String name, Long baseCustomizationId,
+            Long baseParentCustomizationId, @SuppressWarnings("unused") Locale locale) {
+        DbDefinition definition = null;
+        Long customizationId = baseCustomizationId;
+        Long parentCustomizationId = baseParentCustomizationId;
+        List<DbDefinition> definitions = null;
+        boolean finished = false;
+        do {
+            definitions = getJdbcTemplate()
+                    .query(SELECT_DEFINITION_SQL,
+                            new Object[] { name, customizationId },
+                            definitionRowMapper);
+            if (definitions.isEmpty()) {
+                if (parentCustomizationId != null) {
+                    Map<String, Object> customization = getJdbcTemplate().queryForMap(
+                            SELECT_CUSTOMIZATION_BY_ID_SQL,
+                            new Object[] { parentCustomizationId });
+                    customizationId = ((Number) customization.get("ID")).longValue();
+                    parentCustomizationId = numberToLong((Number) customization.get("PARENT_ID"));
+                } else {
+                    finished = true;
+                }
+            } else {
+                definition = definitions.get(0);
+                finished = true;
+            }
+        } while (!finished);
+
+        if (definition != null) {
+            AttributeRowMapper attributeRowMapper = new AttributeRowMapper(definition);
+            getJdbcTemplate().query(SELECT_ATTRIBUTES_SQL,
+                    new Object[] { definition.getId() }, attributeRowMapper);
+        }
+        return definition;
+    }
+
+    /**
+     * Returns a {@link Long} object only if the number is not null.
+     *
+     * @param number The number to convert.
+     * @return The number converted into {@link Long} if not null,
+     * <code>null</code> otherwise.
+     */
+    private static Long numberToLong(Number number) {
+        Long retValue = null;
+        if (number != null) {
+            retValue = number.longValue();
+        }
+        return retValue;
+    }
+
+    /**
+     * A definition with the new property "id".
+     */
+    private static class DbDefinition extends Definition {
+
+        /**
+         * The id of the definition.
+         */
+        private Long id;
+
+        /**
+         * The default constructor.
+         */
+        public DbDefinition() {
+            super();
+        }
+
+        /**
+         * Returns the Id of the definition.
+         *
+         * @return The id.
+         */
+        public Long getId() {
+            return id;
+        }
+
+        /**
+         * Sets the id of the definition.
+         *
+         * @param id The id to set
+         */
+        public void setId(Long id) {
+            this.id = id;
+        }
+
+    }
+
+    /**
+     * Maps a row of a {@link ResultSet} to a {@link Definition}.
+     */
+    private static final class DefinitionRowMapper implements RowMapper {
+
+        /** {@inheritDoc} */
+        public Object mapRow(ResultSet rs, int row) throws SQLException {
+            DbDefinition definition = new DbDefinition();
+            definition.setId(numberToLong((Number) rs.getObject("ID")));
+            definition.setName(rs.getString("NAME"));
+            definition.setTemplateAttribute(Attribute
+                    .createTemplateAttribute(rs.getString("TEMPLATE")));
+            definition.setPreparer(rs.getString("PREPARER"));
+            definition.setExtends(rs.getString("PARENT_NAME"));
+            return definition;
+        }
+
+    }
+
+    /**
+     * Maps a row of a {@link ResultSet} to an {@link Attribute}. It stores the
+     * attributes directly in their definition.
+     */
+    private static final class AttributeRowMapper implements RowMapper {
+
+        /**
+         * The definition in which the attributes will be stored.
+         */
+        private Definition definition;
+
+        /**
+         * Constructor.
+         *
+         * @param definition The definition in which the attributes will be
+         * stored.
+         */
+        private AttributeRowMapper(Definition definition) {
+            this.definition = definition;
+        }
+
+        /** {@inheritDoc} */
+        public Object mapRow(ResultSet rs, int row) throws SQLException {
+            Attribute attribute = new Attribute();
+            attribute.setRenderer(rs.getString("TYPE"));
+            attribute.setValue(rs.getString("VALUE"));
+            definition.putAttribute(rs.getString("NAME"), attribute, rs
+                    .getBoolean("CASCADE_ATTRIBUTE"));
+            return attribute;
+        }
+
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/TestDbTilesContainerFactory.java b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/TestDbTilesContainerFactory.java
new file mode 100644
index 0000000..6cb63c4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/TestDbTilesContainerFactory.java
@@ -0,0 +1,58 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.test.db;
+
+import java.util.Locale;
+
+import javax.sql.DataSource;
+
+import org.apache.tiles.definition.LocaleDefinitionsFactory;
+import org.apache.tiles.definition.dao.DefinitionDAO;
+import org.apache.tiles.factory.BasicTilesContainerFactory;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.request.ApplicationContext;
+
+
+/**
+ * Test alternate Tiles container factory that uses a DB to store definitions.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestDbTilesContainerFactory extends BasicTilesContainerFactory {
+
+    /** {@inheritDoc} */
+    @Override
+    protected DefinitionDAO<Locale> createLocaleDefinitionDao(ApplicationContext applicationContext,
+            LocaleResolver resolver) {
+        LocaleDbDefinitionDAO definitionDao = new LocaleDbDefinitionDAO();
+        definitionDao.setDataSource((DataSource) applicationContext
+                .getApplicationScope().get("dataSource"));
+        return definitionDao;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected LocaleDefinitionsFactory instantiateDefinitionsFactory(
+            ApplicationContext applicationContext, LocaleResolver resolver) {
+        return new LocaleDefinitionsFactory();
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/TestDbTilesInitializer.java b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/TestDbTilesInitializer.java
new file mode 100644
index 0000000..fa2b0bd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/TestDbTilesInitializer.java
@@ -0,0 +1,48 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.test.db;
+
+import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.startup.AbstractTilesInitializer;
+
+/**
+ * Test Tiles initializer for Tiles initialization of the db-based container.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestDbTilesInitializer extends AbstractTilesInitializer {
+
+    /** {@inheritDoc} */
+    @Override
+    protected AbstractTilesContainerFactory createContainerFactory(
+            ApplicationContext context) {
+        return new TestDbTilesContainerFactory();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected String getContainerKey(
+            ApplicationContext applicationContext) {
+        return "db";
+    }
+}
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/package.html
new file mode 100644
index 0000000..eab996d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/java/org/apache/tiles/test/db/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>DB configuration for Tiles test webapp</title>
+</head>
+<body>
+A configuration based on a DBMS of the Tiles test webapp.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/resources/META-INF/MANIFEST.MF b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..039fba1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test-db/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0

+Archiver-Version: Plexus Archiver

+Created-By: 1.6.0_16 (Sun Microsystems Inc.)

+Built-By: antonio

+Build-Jdk: 1.6.0_16

+Specification-Title: Tiles - Test webapp database configuration

+Specification-Version: 2.2.1-SNAPSHOT

+Specification-Vendor: Apache Software Foundation

+Implementation-Title: Tiles - Test webapp database configuration

+Implementation-Version: 2.2.1-SNAPSHOT

+Implementation-Vendor-Id: org.apache

+Implementation-Vendor: Apache Software Foundation

+Tiles-Initializer: org.apache.tiles.test.db.TestDbTilesInitializer

+Export-Package: org.apache.tiles.test.db;version="2.2.1.SNAPSHOT"

+Tool: Bnd-0.0.311

+Bundle-Name: Tiles - Test webapp database configuration

+Bundle-Vendor: Apache Software Foundation

+Bundle-Version: 2.2.1.SNAPSHOT

+Bnd-LastModified: 1254151614318

+Bundle-ManifestVersion: 2

+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt

+Bundle-Description: Tiles configuration that uses a database.

+Import-Package: javax.sql,org.apache.tiles,org.apache.tiles.context,or

+ g.apache.tiles.definition,org.apache.tiles.definition.dao,org.apache.

+ tiles.factory,org.apache.tiles.freemarker.context,org.apache.tiles.lo

+ cale,org.apache.tiles.test.db;version="2.2",org.apache.tiles.util,org

+ .apache.tiles.velocity.context,org.springframework.jdbc.core,org.spri

+ ngframework.jdbc.core.support

+Bundle-SymbolicName: org.apache.tiles-test-db

+Bundle-DocURL: http://tiles.apache.org/framework/tiles-test-pom/tiles-

+ test-db

+

diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/pom.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/pom.xml
new file mode 100644
index 0000000..a7a483f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/pom.xml
@@ -0,0 +1,465 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+   <parent>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-test-pom</artifactId>
+      <version>3.0.1</version>
+   </parent>
+
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>tiles-test</artifactId>
+   <packaging>war</packaging>
+   <name>Tiles - Apps - Test</name>
+   <description>Tiles Test web application: tests Tiles functionality.
+   </description>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.tiles</groupId>
+         <artifactId>tiles-test-common</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.tiles</groupId>
+         <artifactId>tiles-test-alt</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.tiles</groupId>
+         <artifactId>tiles-test-db</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.tiles</groupId>
+         <artifactId>tiles-extras</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.tiles</groupId>
+         <artifactId>tiles-request-portlet</artifactId>
+         <version>${tiles.request.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-jdk14</artifactId>
+        <version>1.5.8</version>
+      </dependency>
+
+      <dependency>
+         <groupId>javax.servlet</groupId>
+         <artifactId>servlet-api</artifactId>
+         <version>2.5</version>
+         <scope>provided</scope>
+      </dependency>
+      <dependency>
+         <groupId>javax.servlet.jsp</groupId>
+         <artifactId>jsp-api</artifactId>
+         <version>2.1</version>
+         <scope>provided</scope>
+      </dependency>
+      <dependency>
+         <groupId>javax.portlet</groupId>
+         <artifactId>portlet-api</artifactId>
+         <version>2.0</version>
+         <scope>provided</scope>
+      </dependency>
+      <dependency>
+         <groupId>javax.servlet</groupId>
+         <artifactId>jstl</artifactId>
+         <version>1.2</version>
+         <scope>runtime</scope>
+      </dependency>
+      <dependency>
+        <groupId>hsqldb</groupId>
+        <artifactId>hsqldb</artifactId>
+        <version>1.8.0.10</version>
+      </dependency>
+      <dependency>
+        <groupId>commons-io</groupId>
+        <artifactId>commons-io</artifactId>
+        <version>1.4</version>
+      </dependency>
+      <dependency>
+        <groupId>org.springframework</groupId>
+        <artifactId>spring-jdbc</artifactId>
+        <version>2.5.6</version>
+        <exclusions>
+          <exclusion>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      <dependency>
+          <groupId>org.apache.portals.pluto</groupId>
+          <artifactId>pluto-taglib</artifactId>
+          <version>2.0.0</version>
+          <scope>provided</scope>
+      </dependency>
+   </dependencies>
+
+   <build>
+       <plugins>
+          <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-war-plugin</artifactId>
+              <version>2.1-beta-1</version>
+              <configuration>
+                  <webResources>
+                      <resource>
+                          <directory>.</directory>
+                          <targetPath>META-INF</targetPath>
+                          <includes>
+                              <include>LICENSE.txt</include>
+                              <include>NOTICE.txt</include>
+                          </includes>
+                      </resource>
+                  </webResources>
+                  <archive>
+                      <manifest>
+                          <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                          <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                      </manifest>
+                      <manifestEntries>
+                          <Tiles-Initializer>org.apache.tiles.test.init.TestTilesInitializer</Tiles-Initializer>
+                      </manifestEntries>
+                  </archive>
+               </configuration>
+           </plugin>
+           <plugin>
+               <groupId>org.codehaus.cargo</groupId>
+               <artifactId>cargo-maven2-plugin</artifactId>
+               <version>1.0.5</version>
+               <configuration>
+                   <container>
+                       <containerId>jetty7x</containerId>
+                       <type>embedded</type>
+                   </container>
+               </configuration>
+           </plugin>
+       </plugins>
+     <finalName>${project.artifactId}</finalName>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-ssh</artifactId>
+        <version>1.0</version>
+      </extension>
+    </extensions>
+   </build>
+
+    <profiles>
+        <profile>
+            <id>selenium</id>
+            <activation>
+                <property>
+                    <name>selenium</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>dependency-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>unpack-selenium</id>
+                                <phase>generate-resources</phase>
+                                <goals>
+                                    <goal>unpack</goal>
+                                </goals>
+                                <configuration>
+                                    <artifactItems>
+                                        <artifactItem>
+                                            <groupId>org.openqa.selenium.core</groupId>
+                                            <artifactId>selenium-core</artifactId>
+                                            <version>1.0-beta-1</version>
+                                        </artifactItem>
+                                    </artifactItems>
+                                    <outputDirectory>${project.build.directory}/selenium</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>copy-selenium</id>
+                                <phase>process-resources</phase>
+                                <configuration>
+                                    <tasks>
+                                        <copy todir="${project.build.directory}/${project.artifactId}/selenium/core">
+                                            <fileset dir="${project.build.directory}/selenium/core" />
+                                        </copy>
+                                        <copy todir="${project.build.directory}/${project.artifactId}/selenium/tests">
+                                            <fileset dir="src/test/selenium" />
+                                        </copy>
+                                    </tasks>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+            <repositories>
+                <repository>
+                    <id>OpenQA</id>
+                    <url>http://nexus.openqa.org/content/repositories/releases/</url>
+                </repository>
+            </repositories>
+        </profile>
+
+        <profile>
+            <id>run-selenium</id>
+            <activation>
+                <property>
+                    <name>run-selenium</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.cargo</groupId>
+                        <artifactId>cargo-maven2-plugin</artifactId>
+                         <configuration>
+                            <container>
+                                <containerId>jetty7x</containerId>
+                                <type>embedded</type>
+                            </container>
+                            <wait>false</wait>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>start-container</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>start</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>stop-container</id>
+                                <phase>post-integration-test</phase>
+                                <goals>
+                                    <goal>stop</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                   </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>selenium-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>run-tests</id>
+                                <phase>integration-test</phase>
+                                <goals>
+                                    <goal>selenese</goal>
+                                </goals>
+                                <configuration>
+                                    <background>true</background>
+                                    <browser>*firefox</browser>
+                                    <startURL>http://localhost:8080/tiles-test/</startURL>
+                                    <suite>src/test/selenium/TestSuite.html</suite>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <!-- Skip the normal tests, we'll run them in the integration-test phase -->
+                            <skip>true</skip>
+                        </configuration>
+
+                        <executions>
+                            <execution>
+                                <phase>integration-test</phase>
+                                <goals>
+                                    <goal>test</goal>
+                                </goals>
+                                <configuration>
+                                    <skip>false</skip>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>hostedqa</id>
+            <dependencies>
+                <dependency>
+                    <groupId>com.hostedqa</groupId>
+                    <artifactId>hostedqa-remote-ant</artifactId>
+                    <version>1.6.2</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+            <repositories>
+                <repository>
+                    <id>codehaus</id>
+                    <name>codehaus</name>
+                    <url>http://repository.codehaus.org</url>
+                </repository>
+                <repository>
+                    <id>maven-hostedqa</id>
+                    <name>maven-hostedqa</name>
+                    <snapshots>
+                        <enabled>true</enabled>
+                        <updatePolicy>always</updatePolicy>
+                        <checksumPolicy>ignore</checksumPolicy>
+                    </snapshots>
+                    <releases>
+                        <enabled>true</enabled>
+                    </releases>
+                    <url>http://maven.hostedqa.com</url>
+                </repository>
+            </repositories>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <taskdef resource="hostedqatasks" classpathref="maven.plugin.classpath" />
+                                        <upload file="${project.build.directory}/${project.build.finalName}.war" account="tiles" email="${tiles.hostedqa.email}" password="${tiles.hostedqa.password}" resourceId="${hostedqa.resourceId}" />
+
+                                        <playsuite clientConfigs="${hostedqa.clientConfigs}" appConfigs="${hostedqa.appConfigs}" account="tiles" email="${tiles.hostedqa.email}" password="${tiles.hostedqa.password}">
+                                            <fileSet dir="${basedir}/src/test/selenium" excludes="TestSuite.html" />
+                                        </playsuite>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>com.hostedqa</groupId>
+                                <artifactId>hostedqa-remote-ant</artifactId>
+                                <version>1.6.2</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                </plugins>
+            </build>
+            <properties>
+                <hostedqa.resourceId>53</hostedqa.resourceId>
+                <hostedqa.clientConfigs>303</hostedqa.clientConfigs>
+                <hostedqa.appConfigs>121</hostedqa.appConfigs>
+            </properties>
+        </profile>
+        <profile>
+            <id>apache-release</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>rat-maven-plugin</artifactId>
+                        <version>1.0-alpha-3</version>
+                        <executions>
+                            <execution>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>check</goal>
+                                </goals>
+                                <configuration>
+                                    <addDefaultLicenseMatchers>false</addDefaultLicenseMatchers>
+                                    <licenseMatchers>
+                                        <classNames>
+                                            <className>rat.analysis.license.ApacheSoftwareLicense20</className>
+                                        </classNames>
+                                    </licenseMatchers>
+                                    <includes>
+                                        <include>pom.xml</include>
+                                        <include>src/**</include>
+                                    </includes>
+                                    <excludes>
+                                        <exclude>**/*.sql</exclude>
+                                        <exclude>**/*MANIFEST.MF</exclude>
+                                    </excludes>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>wagon-maven-plugin</artifactId>
+                        <version>1.0-beta-4</version>
+                        <executions>
+                            <execution>
+                                <phase>deploy</phase>
+                                <goals>
+                                    <goal>upload</goal>
+                                </goals>
+                                <configuration>
+                                    <fromDir>${settings.localRepository}/org/apache/tiles/tiles-test/${project.version}</fromDir>
+                                    <includes>tiles-test-${project.version}.war*</includes>
+                                    <toDir>${project.version}</toDir>
+                                    <serverId>tiles.build</serverId>
+                                    <url>scp://people.apache.org/www/people.apache.org/builds/tiles</url>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    <repositories>
+        <repository>
+            <id>codehaus</id>
+            <name>codehaus</name>
+            <url>http://repository.codehaus.org</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+    </repositories>
+    <pluginRepositories>
+        <pluginRepository>
+            <id>codehaus</id>
+            <name>codehaus</name>
+            <url>http://repository.codehaus.org</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </pluginRepository>
+    </pluginRepositories>
+</project>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/etc/db/project/tiles.architect b/TILES_3_0_X/tiles-test-pom/tiles-test/src/etc/db/project/tiles.architect
new file mode 100644
index 0000000..4a68575
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/etc/db/project/tiles.architect
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<architect-project version="1.0" appversion="0.9.10">
+ <project-name>tiles</project-name>
+ <project-data-sources>
+  <data-source id="DS0">
+   <property key="Logical" value="Not Configured" />
+  </data-source>
+  <data-source id="DS2">
+   <property key="Connection Type" value="HSQLDB" />
+   <property key="Logical" value="Tiles in file" />
+   <property key="JDBC URL" value="jdbc:hsqldb:file:/home/antonio/javadev/db/tiles;shutdown=true" />
+   <property key="UID" value="sa" />
+   <property key="PWD" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.database" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.port" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.hostname" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.repos.login" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.repos.password" value="" />
+  </data-source>
+  <data-source id="DS2">
+   <property key="Connection Type" value="HSQLDB" />
+   <property key="Logical" value="Tiles in file" />
+   <property key="JDBC URL" value="jdbc:hsqldb:file:/home/antonio/javadev/db/tiles;shutdown=true" />
+   <property key="UID" value="sa" />
+   <property key="PWD" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.database" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.port" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.hostname" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.repos.login" value="" />
+   <property key="ca.sqlpower.architect.etl.kettle.repos.password" value="" />
+  </data-source>
+ </project-data-sources>
+ <source-databases>
+  <database id="DB0" populated="true" dbcs-ref="DS2" name="Tiles in file" physicalName="Tiles in memory" >
+   <schema id="SCH1" populated="false" name="INFORMATION_SCHEMA" nativeTerm="schema" physicalName="INFORMATION_SCHEMA" />
+   <schema id="SCH2" populated="true" name="PUBLIC" nativeTerm="schema" physicalName="PUBLIC" >
+    <table id="TAB3" populated="true" name="ATTRIBUTE" objectType="TABLE" physicalName="ATTRIBUTE" >
+     <folder id="FOL4" populated="false" name="Columns" physicalName="Columns" type="1" />
+     <folder id="FOL5" populated="false" name="Exported Keys" physicalName="Exported Keys" type="3" />
+     <folder id="FOL6" populated="false" name="Imported Keys" physicalName="Imported Keys" type="2" />
+     <folder id="FOL7" populated="false" name="Indices" physicalName="Indices" type="4" />
+    </table>
+    <table id="TAB8" populated="true" name="ATTRIBUTE_VISIBLE_FOR" objectType="TABLE" physicalName="ATTRIBUTE_VISIBLE_FOR" >
+     <folder id="FOL9" populated="false" name="Columns" physicalName="Columns" type="1" />
+     <folder id="FOL10" populated="false" name="Exported Keys" physicalName="Exported Keys" type="3" />
+     <folder id="FOL11" populated="false" name="Imported Keys" physicalName="Imported Keys" type="2" />
+     <folder id="FOL12" populated="false" name="Indices" physicalName="Indices" type="4" />
+    </table>
+    <table id="TAB13" populated="true" name="CUSTOMIZATION" objectType="TABLE" physicalName="CUSTOMIZATION" >
+     <folder id="FOL14" populated="false" name="Columns" physicalName="Columns" type="1" />
+     <folder id="FOL15" populated="false" name="Exported Keys" physicalName="Exported Keys" type="3" />
+     <folder id="FOL16" populated="false" name="Imported Keys" physicalName="Imported Keys" type="2" />
+     <folder id="FOL17" populated="false" name="Indices" physicalName="Indices" type="4" />
+    </table>
+    <table id="TAB18" populated="true" name="DEFINITION" objectType="TABLE" physicalName="DEFINITION" >
+     <folder id="FOL19" populated="false" name="Columns" physicalName="Columns" type="1" />
+     <folder id="FOL20" populated="false" name="Exported Keys" physicalName="Exported Keys" type="3" />
+     <folder id="FOL21" populated="false" name="Imported Keys" physicalName="Imported Keys" type="2" />
+     <folder id="FOL22" populated="false" name="Indices" physicalName="Indices" type="4" />
+    </table>
+    <table id="TAB23" populated="true" name="ROLE" objectType="TABLE" physicalName="ROLE" >
+     <folder id="FOL24" populated="false" name="Columns" physicalName="Columns" type="1" />
+     <folder id="FOL25" populated="false" name="Exported Keys" physicalName="Exported Keys" type="3" />
+     <folder id="FOL26" populated="false" name="Imported Keys" physicalName="Imported Keys" type="2" />
+     <folder id="FOL27" populated="false" name="Indices" physicalName="Indices" type="4" />
+    </table>
+    <table id="TAB28" populated="true" name="VISIBLE_FOR" objectType="TABLE" physicalName="VISIBLE_FOR" >
+     <folder id="FOL29" populated="false" name="Columns" physicalName="Columns" type="1" />
+     <folder id="FOL30" populated="false" name="Exported Keys" physicalName="Exported Keys" type="3" />
+     <folder id="FOL31" populated="false" name="Imported Keys" physicalName="Imported Keys" type="2" />
+     <folder id="FOL32" populated="false" name="Indices" physicalName="Indices" type="4" />
+    </table>
+   </schema>
+   <relationships>
+   </relationships>
+  </database>
+  <database id="DB33" populated="true" dbcs-ref="DS2" name="Tiles in file" physicalName="Tiles in file" >
+   <schema id="SCH34" populated="true" name="INFORMATION_SCHEMA" nativeTerm="schema" physicalName="INFORMATION_SCHEMA" >
+   </schema>
+   <schema id="SCH35" populated="true" name="PUBLIC" nativeTerm="schema" physicalName="PUBLIC" >
+   </schema>
+   <relationships>
+   </relationships>
+  </database>
+ </source-databases>
+ <target-database dbcs-ref="DS0">
+  <table id="TAB36" populated="true" name="Definition" objectType="TABLE" physicalName="Definition" remarks="" >
+   <folder id="FOL37" populated="true" name="Columns" physicalName="Columns" type="1" >
+    <column id="COL38" populated="true" autoIncrement="false" autoIncrementSequenceName="Definition_seq" name="id" nullable="0" physicalName="id" precision="12" primaryKeySeq="0" referenceCount="2" remarks="" scale="0" type="2" />
+    <column id="COL39" populated="true" autoIncrement="false" autoIncrementSequenceName="Definition_name_seq" name="name" nullable="0" physicalName="name" precision="255" referenceCount="1" remarks="" scale="0" type="12" />
+    <column id="COL40" populated="true" autoIncrement="false" autoIncrementSequenceName="Definition_preparer_seq" name="preparer" nullable="1" physicalName="preparer" precision="1000" referenceCount="1" remarks="" scale="0" type="12" />
+    <column id="COL41" populated="true" autoIncrement="false" autoIncrementSequenceName="Definition_template_seq" name="template" nullable="1" physicalName="template" precision="1000" referenceCount="1" remarks="" scale="0" type="12" />
+    <column id="COL42" populated="true" autoIncrement="false" autoIncrementSequenceName="Definition_Customization_id_seq" name="Customization_id" nullable="0" physicalName="Customization_id" precision="12" referenceCount="1" remarks="" scale="0" type="2" />
+    <column id="COL43" populated="true" autoIncrement="false" autoIncrementSequenceName="Definition_parent_name_seq" name="parent_name" nullable="1" physicalName="parent_name" precision="255" referenceCount="1" remarks="" scale="0" type="12" />
+   </folder>
+   <folder id="FOL44" populated="true" name="Exported Keys" physicalName="Exported Keys" type="3" >
+   </folder>
+   <folder id="FOL45" populated="true" name="Imported Keys" physicalName="Imported Keys" type="2" >
+   </folder>
+   <folder id="FOL46" populated="true" name="Indices" physicalName="Indices" type="4" >
+    <index id="IDX47" populated="true" clustered="false" name="Definition_pk" physicalName="Definition_pk" primaryKeyIndex="true" unique="true" >
+     <index-column id="IDC48" populated="true" ascendingOrDescending="UNSPECIFIED" column-ref="COL38" name="id" physicalName="id" />
+    </index>
+    <index id="IDX49" populated="true" clustered="false" name="Definition_idx" physicalName="Definition_idx" primaryKeyIndex="false" unique="false" >
+     <index-column id="IDC50" populated="true" ascendingOrDescending="ASCENDING" column-ref="COL39" name="name" physicalName="name" />
+    </index>
+   </folder>
+  </table>
+  <table id="TAB51" populated="true" name="Attribute" objectType="TABLE" physicalName="Attribute" remarks="" >
+   <folder id="FOL52" populated="true" name="Columns" physicalName="Columns" type="1" >
+    <column id="COL53" populated="true" autoIncrement="false" autoIncrementSequenceName="Attribute_seq" name="id" nullable="0" physicalName="id" precision="12" primaryKeySeq="0" referenceCount="2" remarks="" scale="0" type="2" />
+    <column id="COL54" populated="true" autoIncrement="false" autoIncrementSequenceName="Attribute_name_seq" name="name" nullable="0" physicalName="name" precision="255" referenceCount="1" remarks="" scale="0" type="12" />
+    <column id="COL55" populated="true" autoIncrement="false" autoIncrementSequenceName="Attribute_type_seq" name="type" nullable="1" physicalName="type" precision="255" referenceCount="1" remarks="" scale="0" type="12" />
+    <column id="COL56" populated="true" autoIncrement="false" autoIncrementSequenceName="Attribute_value_seq" name="value" nullable="0" physicalName="value" precision="1000" referenceCount="1" remarks="" scale="0" type="12" />
+    <column id="COL57" populated="true" autoIncrement="false" autoIncrementSequenceName="Attribute_cascade_attribute_seq" name="cascade_attribute" nullable="0" physicalName="cascade_attribute" precision="10" referenceCount="1" remarks="" scale="0" type="16" />
+    <column id="COL58" populated="true" autoIncrement="false" autoIncrementSequenceName="Attribute_Definition_id_seq" name="Definition_id" nullable="1" physicalName="Definition_id" precision="12" referenceCount="1" remarks="" scale="0" type="2" />
+    <column id="COL59" populated="true" autoIncrement="false" autoIncrementSequenceName="Attribute_seq" name="Parent_id" nullable="1" physicalName="Parent_id" precision="12" referenceCount="1" remarks="" scale="0" type="2" />
+   </folder>
+   <folder id="FOL60" populated="true" name="Exported Keys" physicalName="Exported Keys" type="3" >
+   </folder>
+   <folder id="FOL61" populated="true" name="Imported Keys" physicalName="Imported Keys" type="2" >
+   </folder>
+   <folder id="FOL62" populated="true" name="Indices" physicalName="Indices" type="4" >
+    <index id="IDX63" populated="true" clustered="false" name="Attribute_pk" physicalName="Attribute_pk" primaryKeyIndex="true" unique="true" >
+     <index-column id="IDC64" populated="true" ascendingOrDescending="UNSPECIFIED" column-ref="COL53" name="id" physicalName="id" />
+    </index>
+   </folder>
+  </table>
+  <table id="TAB65" populated="true" name="Role" objectType="TABLE" physicalName="Role" remarks="" >
+   <folder id="FOL66" populated="true" name="Columns" physicalName="Columns" type="1" >
+    <column id="COL67" populated="true" autoIncrement="false" autoIncrementSequenceName="Role_seq" name="id" nullable="0" physicalName="id" precision="12" primaryKeySeq="0" referenceCount="1" remarks="" scale="0" type="2" />
+    <column id="COL68" populated="true" autoIncrement="false" autoIncrementSequenceName="Role_name_seq" name="name" nullable="0" physicalName="name" precision="255" referenceCount="1" remarks="" scale="0" type="12" />
+   </folder>
+   <folder id="FOL69" populated="true" name="Exported Keys" physicalName="Exported Keys" type="3" >
+   </folder>
+   <folder id="FOL70" populated="true" name="Imported Keys" physicalName="Imported Keys" type="2" >
+   </folder>
+   <folder id="FOL71" populated="true" name="Indices" physicalName="Indices" type="4" >
+    <index id="IDX72" populated="true" clustered="false" name="Role_pk" physicalName="Role_pk" primaryKeyIndex="true" unique="true" >
+     <index-column id="IDC73" populated="true" ascendingOrDescending="UNSPECIFIED" column-ref="COL67" name="id" physicalName="id" />
+    </index>
+    <index id="IDX74" populated="true" clustered="false" name="Role_idx" physicalName="Role_idx" primaryKeyIndex="false" unique="false" >
+     <index-column id="IDC75" populated="true" ascendingOrDescending="ASCENDING" column-ref="COL68" name="name" physicalName="name" />
+    </index>
+   </folder>
+  </table>
+  <table id="TAB76" populated="true" name="Customization" objectType="TABLE" physicalName="Customization" remarks="" >
+   <folder id="FOL77" populated="true" name="Columns" physicalName="Columns" type="1" >
+    <column id="COL78" populated="true" autoIncrement="false" autoIncrementSequenceName="Customization_seq" name="id" nullable="0" physicalName="id" precision="12" primaryKeySeq="0" referenceCount="1" remarks="" scale="0" type="2" />
+    <column id="COL79" populated="true" autoIncrement="false" autoIncrementSequenceName="Customization_seq" name="Parent_id" nullable="1" physicalName="Parent_id" precision="12" referenceCount="1" remarks="" scale="0" type="2" />
+    <column id="COL80" populated="true" autoIncrement="false" autoIncrementSequenceName="Customization_name_seq" name="name" nullable="0" physicalName="name" precision="255" referenceCount="1" remarks="" scale="0" type="12" />
+   </folder>
+   <folder id="FOL81" populated="true" name="Exported Keys" physicalName="Exported Keys" type="3" >
+   </folder>
+   <folder id="FOL82" populated="true" name="Imported Keys" physicalName="Imported Keys" type="2" >
+   </folder>
+   <folder id="FOL83" populated="true" name="Indices" physicalName="Indices" type="4" >
+    <index id="IDX84" populated="true" clustered="false" name="Customization_pk" physicalName="Customization_pk" primaryKeyIndex="true" unique="true" >
+     <index-column id="IDC85" populated="true" ascendingOrDescending="UNSPECIFIED" column-ref="COL78" name="id" physicalName="id" />
+    </index>
+    <index id="IDX86" populated="true" clustered="false" name="Customization_idx" physicalName="Customization_idx" primaryKeyIndex="false" unique="false" >
+     <index-column id="IDC87" populated="true" ascendingOrDescending="ASCENDING" column-ref="COL80" name="name" physicalName="name" />
+    </index>
+    <index id="IDX88" populated="true" clustered="false" name="Customization_idx1" physicalName="Customization_idx1" primaryKeyIndex="false" unique="false" >
+     <index-column id="IDC89" populated="true" ascendingOrDescending="ASCENDING" column-ref="COL80" name="name" physicalName="name" />
+    </index>
+   </folder>
+  </table>
+  <table id="TAB90" populated="true" name="Visible_for" objectType="TABLE" physicalName="Visible_for" remarks="" >
+   <folder id="FOL91" populated="true" name="Columns" physicalName="Columns" type="1" >
+    <column id="COL92" populated="true" autoIncrement="false" autoIncrementSequenceName="Definition_seq" name="Definition_id" nullable="0" physicalName="Definition_id" precision="12" primaryKeySeq="0" referenceCount="1" remarks="" scale="0" type="2" />
+    <column id="COL93" populated="true" autoIncrement="false" autoIncrementSequenceName="Role_seq" name="Role_id" nullable="0" physicalName="Role_id" precision="12" primaryKeySeq="1" referenceCount="1" remarks="" scale="0" type="2" />
+   </folder>
+   <folder id="FOL94" populated="true" name="Exported Keys" physicalName="Exported Keys" type="3" >
+   </folder>
+   <folder id="FOL95" populated="true" name="Imported Keys" physicalName="Imported Keys" type="2" >
+   </folder>
+   <folder id="FOL96" populated="true" name="Indices" physicalName="Indices" type="4" >
+    <index id="IDX97" populated="true" clustered="false" name="Visible_for_pk" physicalName="Visible_for_pk" primaryKeyIndex="true" unique="true" >
+     <index-column id="IDC98" populated="true" ascendingOrDescending="UNSPECIFIED" column-ref="COL92" name="Definition_id" physicalName="Definition_id" />
+     <index-column id="IDC99" populated="true" ascendingOrDescending="UNSPECIFIED" column-ref="COL93" name="Role_id" physicalName="Role_id" />
+    </index>
+   </folder>
+  </table>
+  <table id="TAB100" populated="true" name="Attribute_visible_for" objectType="TABLE" physicalName="Attribute_visible_for" remarks="" >
+   <folder id="FOL101" populated="true" name="Columns" physicalName="Columns" type="1" >
+    <column id="COL102" populated="true" autoIncrement="false" autoIncrementSequenceName="Attribute_seq" name="Attribute_id" nullable="0" physicalName="Attribute_id" precision="12" primaryKeySeq="0" referenceCount="1" remarks="" scale="0" type="2" />
+    <column id="COL103" populated="true" autoIncrement="false" autoIncrementSequenceName="Role_seq" name="Role_id" nullable="0" physicalName="Role_id" precision="12" primaryKeySeq="1" referenceCount="1" remarks="" scale="0" type="2" />
+   </folder>
+   <folder id="FOL104" populated="true" name="Exported Keys" physicalName="Exported Keys" type="3" >
+   </folder>
+   <folder id="FOL105" populated="true" name="Imported Keys" physicalName="Imported Keys" type="2" >
+   </folder>
+   <folder id="FOL106" populated="true" name="Indices" physicalName="Indices" type="4" >
+    <index id="IDX107" populated="true" clustered="false" name="Attribute_visible_for_pk" physicalName="Attribute_visible_for_pk" primaryKeyIndex="true" unique="true" >
+     <index-column id="IDC108" populated="true" ascendingOrDescending="UNSPECIFIED" column-ref="COL102" name="Attribute_id" physicalName="Attribute_id" />
+     <index-column id="IDC109" populated="true" ascendingOrDescending="UNSPECIFIED" column-ref="COL103" name="Role_id" physicalName="Role_id" />
+    </index>
+   </folder>
+  </table>
+  <relationships>
+   <relationship id="REL110" populated="true" deferrability="7" deleteRule="0" fk-table-ref="TAB51" fkCardinality="7" identifying="false" name="Definition_Attribute_fk" physicalName="Definition_Attribute_fk" pk-table-ref="TAB36" pkCardinality="3" updateRule="0" >
+    <column-mapping id="CMP111" populated="true" fk-column-ref="COL58" name="Column Mapping" physicalName="Column Mapping" pk-column-ref="COL38" />
+   </relationship>
+   <relationship id="REL112" populated="true" deferrability="7" deleteRule="0" fk-table-ref="TAB90" fkCardinality="7" identifying="true" name="Definition_Visible_for_fk" physicalName="Definition_Visible_for_fk" pk-table-ref="TAB36" pkCardinality="2" updateRule="0" >
+    <column-mapping id="CMP113" populated="true" fk-column-ref="COL92" name="Column Mapping" physicalName="Column Mapping" pk-column-ref="COL38" />
+   </relationship>
+   <relationship id="REL114" populated="true" deferrability="7" deleteRule="0" fk-table-ref="TAB36" fkCardinality="7" identifying="true" name="Customization_Definition_fk" physicalName="Customization_Definition_fk" pk-table-ref="TAB76" pkCardinality="2" updateRule="0" >
+    <column-mapping id="CMP115" populated="true" fk-column-ref="COL42" name="Column Mapping" physicalName="Column Mapping" pk-column-ref="COL78" />
+   </relationship>
+   <relationship id="REL116" populated="true" deferrability="7" deleteRule="0" fk-table-ref="TAB51" fkCardinality="7" identifying="false" name="Attribute_Attribute_fk" physicalName="Attribute_Attribute_fk" pk-table-ref="TAB51" pkCardinality="3" updateRule="0" >
+    <column-mapping id="CMP117" populated="true" fk-column-ref="COL59" name="Column Mapping" physicalName="Column Mapping" pk-column-ref="COL53" />
+   </relationship>
+   <relationship id="REL118" populated="true" deferrability="7" deleteRule="0" fk-table-ref="TAB100" fkCardinality="7" identifying="true" name="Attribute_Attribute_visible_for_fk" physicalName="Attribute_Attribute_visible_for_fk" pk-table-ref="TAB51" pkCardinality="2" updateRule="0" >
+    <column-mapping id="CMP119" populated="true" fk-column-ref="COL102" name="Column Mapping" physicalName="Column Mapping" pk-column-ref="COL53" />
+   </relationship>
+   <reference ref-id="REL110" />
+   <reference ref-id="REL116" />
+   <relationship id="REL120" populated="true" deferrability="7" deleteRule="0" fk-table-ref="TAB90" fkCardinality="7" identifying="true" name="Role_Visible_for_fk" physicalName="Role_Visible_for_fk" pk-table-ref="TAB65" pkCardinality="2" updateRule="0" >
+    <column-mapping id="CMP121" populated="true" fk-column-ref="COL93" name="Column Mapping" physicalName="Column Mapping" pk-column-ref="COL67" />
+   </relationship>
+   <relationship id="REL122" populated="true" deferrability="7" deleteRule="0" fk-table-ref="TAB100" fkCardinality="7" identifying="true" name="Role_Attribute_visible_for_fk" physicalName="Role_Attribute_visible_for_fk" pk-table-ref="TAB65" pkCardinality="2" updateRule="0" >
+    <column-mapping id="CMP123" populated="true" fk-column-ref="COL103" name="Column Mapping" physicalName="Column Mapping" pk-column-ref="COL67" />
+   </relationship>
+   <reference ref-id="REL114" />
+   <relationship id="REL124" populated="true" deferrability="7" deleteRule="0" fk-table-ref="TAB76" fkCardinality="7" identifying="false" name="Customization_Customization_fk" physicalName="Customization_Customization_fk" pk-table-ref="TAB76" pkCardinality="3" updateRule="0" >
+    <column-mapping id="CMP125" populated="true" fk-column-ref="COL79" name="Column Mapping" physicalName="Column Mapping" pk-column-ref="COL78" />
+   </relationship>
+   <reference ref-id="REL124" />
+   <reference ref-id="REL112" />
+   <reference ref-id="REL120" />
+   <reference ref-id="REL118" />
+   <reference ref-id="REL122" />
+  </relationships>
+ </target-database>
+ <ddl-generator type="ca.sqlpower.architect.ddl.HSQLDBDDLGenerator" allow-connection="false" target-schema="public"> </ddl-generator>
+ <create-kettle-job-settings filePath="" jobName="" schemaName="" kettleJoinType="0" savingToFile="true" />
+ <play-pen zoom="1.0" viewportX="0" viewportY="0" relationship-style="rectilinear">
+  <table-pane table-ref="TAB36" x="234" y="51" />
+  <table-pane table-ref="TAB51" x="700" y="53" />
+  <table-pane table-ref="TAB65" x="729" y="488" />
+  <table-pane table-ref="TAB76" x="217" y="457" />
+  <table-pane table-ref="TAB90" x="481" y="321" />
+  <table-pane table-ref="TAB100" x="748" y="319" />
+  <table-link relationship-ref="REL110" pk-x="187" pk-y="45" fk-x="0" fk-y="43" orientation="33" />
+  <table-link relationship-ref="REL116" pk-x="33" pk-y="143" fk-x="0" fk-y="82" orientation="36" />
+  <table-link relationship-ref="REL114" pk-x="56" pk-y="0" fk-x="39" fk-y="120" orientation="72" />
+  <table-link relationship-ref="REL124" pk-x="70" pk-y="79" fk-x="0" fk-y="39" orientation="36" />
+  <table-link relationship-ref="REL112" pk-x="95" pk-y="120" fk-x="0" fk-y="28" orientation="36" />
+  <table-link relationship-ref="REL120" pk-x="0" pk-y="33" fk-x="44" fk-y="63" orientation="66" />
+  <table-link relationship-ref="REL118" pk-x="70" pk-y="143" fk-x="84" fk-y="0" orientation="132" />
+  <table-link relationship-ref="REL122" pk-x="64" pk-y="0" fk-x="45" fk-y="63" orientation="72" />
+ </play-pen>
+ <profiles topNCount="10">
+  </profiles>
+</architect-project>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/exception/TilesTestRuntimeException.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/exception/TilesTestRuntimeException.java
new file mode 100644
index 0000000..adabdee
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/exception/TilesTestRuntimeException.java
@@ -0,0 +1,65 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.test.exception;
+
+/**
+ * Runtime exception used during the execution of the test web application.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesTestRuntimeException extends RuntimeException {
+
+    /**
+     * Constructor.
+     */
+    public TilesTestRuntimeException() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message of the exception.
+     */
+    public TilesTestRuntimeException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param cause The cause of the exception.
+     */
+    public TilesTestRuntimeException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message of the exception.
+     * @param cause The cause of the exception.
+     */
+    public TilesTestRuntimeException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/exception/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/exception/package.html
new file mode 100644
index 0000000..54446b8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/exception/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>Tiles test exceptions</title>
+</head>
+<body>
+Exceptions raised during the execution of the test web application.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/filter/SecurityWrappingFilter.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/filter/SecurityWrappingFilter.java
new file mode 100644
index 0000000..8eb4cab
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/filter/SecurityWrappingFilter.java
@@ -0,0 +1,86 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.filter;
+
+import java.io.IOException;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+
+/**
+ * Filter that wraps an HttpServletRequest to override "isUserInRole".
+ *
+ * @version $Rev$ $Date$
+ */
+public class SecurityWrappingFilter implements Filter {
+
+    /**
+     * The role that the current user is supposed to use.
+     */
+    public static final String GOOD_ROLE = "goodrole";
+
+    /** {@inheritDoc} */
+    public void init(FilterConfig filterConfig) throws ServletException {
+        // No operation
+    }
+
+    /** {@inheritDoc} */
+    public void doFilter(ServletRequest servletRequest,
+            ServletResponse servletResponse, FilterChain filterChain)
+            throws IOException, ServletException {
+        HttpServletRequest wrappedRequest = new SecurityWrapperHttpServletRequest(
+                (HttpServletRequest) servletRequest);
+        filterChain.doFilter(wrappedRequest, servletResponse);
+    }
+
+    /** {@inheritDoc} */
+    public void destroy() {
+        // No operation
+    }
+
+    /**
+     * Request wrapper that overrides "isUserInRole" method.
+     *
+     * @version $Rev$ $Date$
+     */
+    private static class SecurityWrapperHttpServletRequest extends
+            HttpServletRequestWrapper {
+        /**
+         * Constructor.
+         *
+         * @param request The HTTP servlet request.
+         */
+        public SecurityWrapperHttpServletRequest(HttpServletRequest request) {
+            super(request);
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        public boolean isUserInRole(String role) {
+            return GOOD_ROLE.equals(role);
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/filter/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/filter/package.html
new file mode 100644
index 0000000..8104a78
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/filter/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>Tiles filter test package</title>
+</head>
+<body>
+Contains filter to be used in the test web application.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/init/InitContextListener.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/init/InitContextListener.java
new file mode 100644
index 0000000..41efda0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/init/InitContextListener.java
@@ -0,0 +1,138 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.test.init;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.sql.DataSource;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.tiles.test.exception.TilesTestRuntimeException;
+import org.hsqldb.jdbc.jdbcDataSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Initializes the data source of the DB.
+ *
+ * @version $Rev$ $Date$
+ */
+public class InitContextListener implements ServletContextListener {
+
+    /**
+     * The logging object.
+     */
+    private final Logger log = LoggerFactory
+            .getLogger(InitContextListener.class);
+
+    /** {@inheritDoc} */
+    public void contextInitialized(ServletContextEvent event) {
+        DataSource dataSource = createDataSource();
+        event.getServletContext().setAttribute("dataSource", dataSource);
+        String[] commands = getSQLCommands();
+        executeCommands(dataSource, commands);
+    }
+
+    /** {@inheritDoc} */
+    public void contextDestroyed(ServletContextEvent event) {
+        // Do nothing
+    }
+
+    /**
+     * Creates the data source to use.
+     *
+     * @return The data source.
+     */
+    private DataSource createDataSource() {
+        jdbcDataSource dataSource = new jdbcDataSource();
+        dataSource.setDatabase("jdbc:hsqldb:mem:tiles");
+        dataSource.setUser("sa");
+        dataSource.setPassword("");
+        return dataSource;
+    }
+
+    /**
+     * Loads and returns the SQL commands to initialize the DB.
+     *
+     * @return The SQL commands to execute.
+     */
+    private String[] getSQLCommands() {
+        InputStream stream = getClass().getResourceAsStream(
+                "/org/apache/tiles/test/db/schema.sql");
+        String text;
+        try {
+            text = IOUtils.toString(stream);
+        } catch (IOException e) {
+            throw new TilesTestRuntimeException("Cannot read schema SQL text", e);
+        } finally {
+            try {
+                stream.close();
+            } catch (IOException e) {
+                log.error("Error during close of the stream containing the SQL schema", e);
+            }
+        }
+        return text.split(";");
+    }
+
+    /**
+     * Execute SQL commands.
+     *
+     * @param dataSource The data source to use.
+     * @param commands The commands to execute.
+     */
+    private void executeCommands(DataSource dataSource, String[] commands) {
+        Connection conn = null;
+        Statement stmt = null;
+        try {
+            conn = dataSource.getConnection();
+            for (int i = 0; i < commands.length; i++) {
+                stmt = conn.createStatement();
+                stmt.executeUpdate(commands[i]);
+            }
+            conn.commit();
+        } catch (SQLException e) {
+            try {
+                conn.rollback();
+            } catch (SQLException e1) {
+                log.error("Error during rollback", e);
+            }
+            throw new TilesTestRuntimeException("Error during execution of SQL commands", e);
+        } finally {
+            try {
+                if (conn != null) {
+                    conn.close();
+                }
+                if (stmt != null) {
+                    stmt.close();
+                }
+            } catch (SQLException e) {
+                log.error("Error during closing resources", e);
+            }
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/init/TestTilesInitializer.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/init/TestTilesInitializer.java
new file mode 100644
index 0000000..3e5b0d5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/init/TestTilesInitializer.java
@@ -0,0 +1,53 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.test.init;
+
+import javax.servlet.ServletContext;
+
+import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.servlet.wildcard.WildcardServletApplicationContext;
+import org.apache.tiles.startup.AbstractTilesInitializer;
+import org.apache.tiles.test.factory.TestTilesContainerFactory;
+
+/**
+ * Test Tiles initializer for Tiles initialization of the default container.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestTilesInitializer extends AbstractTilesInitializer {
+
+    /** {@inheritDoc} */
+    @Override
+    protected AbstractTilesContainerFactory createContainerFactory(
+            ApplicationContext context) {
+        return new TestTilesContainerFactory();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected ApplicationContext createTilesApplicationContext(
+            ApplicationContext preliminaryContext) {
+        return new WildcardServletApplicationContext(
+                (ServletContext) preliminaryContext.getContext());
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/init/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/init/package.html
new file mode 100644
index 0000000..3617584
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/init/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>Tiles test initialization.</title>
+</head>
+<body>
+Initialization classes used in the test web application.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/TestPortlet.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/TestPortlet.java
new file mode 100644
index 0000000..431b61c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/TestPortlet.java
@@ -0,0 +1,154 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.portlet;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletURL;
+import javax.portlet.ProcessAction;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.portlet.RenderPortletRequest;
+
+/**
+ * Test Portlet.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestPortlet extends GenericPortlet {
+
+    /** {@inheritDoc} */
+    @Override
+    protected void doView(RenderRequest request, RenderResponse response)
+            throws PortletException, IOException {
+        PortletSession portletSession = request.getPortletSession();
+        String definition = (String) portletSession.getAttribute("definition");
+        if (definition != null) {
+            portletSession.removeAttribute("definition");
+            TilesContainer container = getCurrentContainer(request,
+                    getPortletContext());
+            Request currentRequest = new RenderPortletRequest(container
+                    .getApplicationContext(), getPortletContext(), request,
+                    response);
+            if (container.isValidDefinition(definition, currentRequest)) {
+                container.render(definition, currentRequest);
+                addBackLink(response);
+            } else {
+                PortletRequestDispatcher dispatcher = getPortletContext()
+                        .getRequestDispatcher(
+                                "/WEB-INF/jsp/nosuchdefinition.jsp");
+                dispatcher.forward(request, response);
+                addBackLink(response);
+            }
+        } else {
+            PortletRequestDispatcher dispatcher = getPortletContext()
+                    .getRequestDispatcher("/WEB-INF/jsp/index.jsp");
+            dispatcher.forward(request, response);
+        }
+    }
+
+
+    /**
+     * Puts the definition name in a session attribue.
+     *
+     * @param request The portlet request.
+     * @param response The portlet response.
+     */
+    @ProcessAction(name = "showDefinition")
+    public void showDefinition(ActionRequest request, ActionResponse response) {
+        request.getPortletSession().setAttribute("definition",
+                request.getParameter("definition"));
+    }
+
+    /**
+     * Adds a link to the response to go back.
+     *
+     * @param response The portlet response.
+     * @throws IOException If something goes wrong.
+     */
+    private void addBackLink(RenderResponse response) throws IOException {
+        PrintWriter writer = response.getWriter();
+        writer.append("<a href=\"");
+        PortletURL url = response.createRenderURL();
+        writer.append(url.toString());
+        writer.append("\"> Back to definition selection</a>");
+    }
+
+    /**
+     * Returns the current container that has been set, or the default one.
+     *
+     * @param request The request to use.
+     * @param context The portlet context to use.
+     * @return The current Tiles container to use in web pages.
+     * @since 2.1.0
+     */
+    private static TilesContainer getCurrentContainer(
+            javax.portlet.PortletRequest request, PortletContext context) {
+        TilesContainer container = (TilesContainer) request
+                .getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME);
+        if (container == null) {
+            container = getContainer(context);
+            request.setAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME,
+                    container);
+        }
+
+        return container;
+    }
+
+    /**
+     * Returns a specific Tiles container.
+     *
+     * @param context The portlet context to use.
+     * @param key The key under which the container is stored. If null, the
+     * default container will be returned.
+     * @return The requested Tiles container.
+     * @since 2.1.2
+     */
+    private static TilesContainer getContainer(PortletContext context, String key) {
+        if (key == null) {
+            key = TilesAccess.CONTAINER_ATTRIBUTE;
+        }
+        return (TilesContainer) context.getAttribute(key);
+    }
+
+    /**
+     * Returns the default Tiles container.
+     *
+     * @param context The portlet context to use.
+     * @return The default Tiles container.
+     * @since 2.1.2
+     */
+    private static TilesContainer getContainer(PortletContext context) {
+        return getContainer(context, TilesAccess.CONTAINER_ATTRIBUTE);
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/package.html
new file mode 100644
index 0000000..dad1908
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/portlet/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>Test portlets.</title>
+</head>
+<body>
+Test portlets for Tiles evaluation.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/AttributeViewPreparer.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/AttributeViewPreparer.java
new file mode 100644
index 0000000..01304ce
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/AttributeViewPreparer.java
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.preparer;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.request.Request;
+
+/**
+ * A <code>ViewPreparer</code> that stores an attribute.
+ *
+ * @version $Rev$ $Date$
+ */
+public class AttributeViewPreparer implements ViewPreparer {
+
+    /** {@inheritDoc} */
+    public void execute(Request tilesContext,
+            AttributeContext attributeContext) {
+        attributeContext.putAttribute(
+            "body",
+            new Attribute("This is the value added by the AttributeViewPreparer"));
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/RequestSettingViewPreparer.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/RequestSettingViewPreparer.java
new file mode 100644
index 0000000..9f9f198
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/RequestSettingViewPreparer.java
@@ -0,0 +1,46 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.preparer;
+
+import java.util.Map;
+
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.request.Request;
+
+/**
+ * A simple test <code>ViewPreparer</code> to put a request attribute, that
+ * will be used with the EL evaluator.
+ *
+ * @version $Rev$ $Date$
+ */
+public class RequestSettingViewPreparer implements ViewPreparer {
+
+    /** {@inheritDoc} */
+    public void execute(Request tilesContext,
+            AttributeContext attributeContext) {
+        Map<String, Object> requestScope = tilesContext.getContext("request");
+        requestScope.put("body", "test.inner.definition");
+        requestScope.put("layout", "/layout.jsp");
+        requestScope.put("doNotShow", "DO NOT SHOW!!!");
+        requestScope.put("doNotShowBody", "${requestScope.doNotShow}");
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/TestViewPreparer.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/TestViewPreparer.java
new file mode 100644
index 0000000..23f4f60
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/TestViewPreparer.java
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.preparer;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.preparer.ViewPreparer;
+import org.apache.tiles.request.Request;
+
+/**
+ * A simple test <code>ViewPreparer</code>.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestViewPreparer implements ViewPreparer {
+
+    /** {@inheritDoc} */
+    public void execute(Request tilesContext,
+            AttributeContext attributeContext) {
+        attributeContext.putAttribute(
+            "body",
+            new Attribute("This is the value added by the ViewPreparer"));
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/package.html
new file mode 100644
index 0000000..2732073
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/preparer/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>Tiles preparer test package</title>
+</head>
+<body>
+Test classes to check preparer functionality.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/IncludingServlet.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/IncludingServlet.java
new file mode 100644
index 0000000..9dbdbb5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/IncludingServlet.java
@@ -0,0 +1,72 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.servlet;
+
+import java.io.IOException;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Sample servlet that includes a page specified by the <code>include</code>
+ * init parameter.
+ *
+ * @version $Rev$ $Date$
+ */
+public class IncludingServlet extends HttpServlet {
+
+    /**
+     * Init parameter value, that indicates the path to include.
+     */
+    private String include;
+
+    /**
+     * Initializes the servlet, reading the <code>include</code> init
+     * parameter.
+     *
+     * @param config The servlet configuration object to use.
+     * @throws ServletException Thrown by
+     * {@link HttpServlet#init(ServletConfig)}
+     */
+    @Override
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+
+        include = config.getInitParameter("include");
+    }
+
+    /**
+     * Processes the request, including the specified page.
+     *
+     * @param request The request object.
+     * @param response The response object.
+     * @throws ServletException Thrown by the {@link #include} method.
+     * @throws IOException Thrown by the {@link #include} method.
+     */
+    @Override
+    protected void doGet(HttpServletRequest request,
+            HttpServletResponse response) throws ServletException, IOException {
+        request.getRequestDispatcher(include).include(request, response);
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/SelectLocaleServlet.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/SelectLocaleServlet.java
new file mode 100644
index 0000000..ed98c3f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/SelectLocaleServlet.java
@@ -0,0 +1,109 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.servlet;
+
+import java.util.Locale;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.locale.impl.DefaultLocaleResolver;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.servlet.ServletRequest;
+
+/**
+ * Servlet able to let a user choose a locale.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SelectLocaleServlet extends HttpServlet {
+
+    /**
+     * The key of the container to use.
+     */
+    private String containerKey;
+
+    /**
+     * The name of the definition to render.
+     */
+    private String definitionName;
+
+    /** {@inheritDoc} */
+    @Override
+    public void init(ServletConfig config) throws ServletException {
+        super.init(config);
+        containerKey = config
+                .getInitParameter("org.apache.tiles.test.servlet.ServletConfig.CONTAINER_KEY");
+        definitionName = config
+                .getInitParameter("org.apache.tiles.test.servlet.ServletConfig.DEFINITION_NAME");
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void doGet(HttpServletRequest request,
+            HttpServletResponse response) {
+        process(request, response);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void doPost(HttpServletRequest request,
+            HttpServletResponse response) {
+        process(request, response);
+    }
+
+    /**
+     * Processes the request.
+     *
+     * @param request The request object.
+     * @param response The response object.
+     */
+    private void process(HttpServletRequest request,
+            HttpServletResponse response) {
+        String localeParameter = request.getParameter("locale");
+        HttpSession session = request.getSession();
+        Locale locale = null;
+        if (localeParameter != null && localeParameter.trim().length() > 0) {
+            String[] localeStrings = localeParameter.split("_");
+            if (localeStrings.length == 1) {
+                locale = new Locale(localeStrings[0]);
+            } else if (localeStrings.length == 2) {
+                locale = new Locale(localeStrings[0], localeStrings[1]);
+            } else if (localeStrings.length > 2) {
+                locale = new Locale(localeStrings[0], localeStrings[1], localeStrings[2]);
+            }
+        }
+        session.setAttribute(DefaultLocaleResolver.LOCALE_KEY, locale);
+        ApplicationContext applicationContext = org.apache.tiles.request.servlet.ServletUtil
+                .getApplicationContext(getServletContext());
+        Request currentRequest = new ServletRequest(applicationContext, request, response);
+        TilesAccess.setCurrentContainer(currentRequest, containerKey);
+        TilesContainer container = TilesAccess.getCurrentContainer(currentRequest);
+        container.render(definitionName, currentRequest);
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/package.html
new file mode 100644
index 0000000..ecdf30f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/servlet/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>Tiles servlet test package</title>
+</head>
+<body>
+Test servlet classes.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/velocity/ExceptionTool.java b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/velocity/ExceptionTool.java
new file mode 100644
index 0000000..5434cf8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/velocity/ExceptionTool.java
@@ -0,0 +1,38 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tiles.test.velocity;
+
+/**
+ * Tool to generate exceptions.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ExceptionTool {
+
+    /**
+     * Throws an exception.
+     *
+     * @return Nothing.
+     */
+    public String throwRuntimeException() {
+        throw new RuntimeException("It is an exception!");
+    }
+}
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/velocity/package.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/velocity/package.html
new file mode 100644
index 0000000..b0de056
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/velocity/package.html
@@ -0,0 +1,30 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+    <title>Tiles Velocity test package</title>
+</head>
+<body>
+Velocity tools and utilities.
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/LICENSE.txt b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/META-INF/MANIFEST.MF b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b479d32
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0

+Archiver-Version: Plexus Archiver

+Created-By: Apache Maven

+Built-By: antonio

+Build-Jdk: 1.6.0_16

+Specification-Title: Tiles - Apps - Test

+Specification-Version: 2.2.1-SNAPSHOT

+Specification-Vendor: Apache Software Foundation

+Implementation-Title: Tiles - Apps - Test

+Implementation-Version: 2.2.1-SNAPSHOT

+Implementation-Vendor-Id: org.apache.tiles

+Implementation-Vendor: Apache Software Foundation

+Tiles-Initializer: org.apache.tiles.test.init.TestTilesInitializer

+

diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/NOTICE.txt b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..aef6d99
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/NOTICE.txt
@@ -0,0 +1,6 @@
+   Apache Tiles
+   Copyright 1999-2009 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+   Spring (http://www.springframework.org/).
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/classpath-defs.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/classpath-defs.xml
new file mode 100644
index 0000000..459aa39
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/classpath-defs.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+<!DOCTYPE tiles-definitions PUBLIC
+    "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+    "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+    <definition name="classpath.definition" template="/layout.jsp">
+        <put-attribute name="title" value="This is the title."/>
+        <put-attribute name="header" value="/header.jsp"/>
+        <put-attribute name="body" value="/classpath.jsp"/>
+    </definition>
+</tiles-definitions>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/freemarker-classpath-defs.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/freemarker-classpath-defs.xml
new file mode 100644
index 0000000..f63b910
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/freemarker-classpath-defs.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+<!DOCTYPE tiles-definitions PUBLIC
+    "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+    "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+    <definition name="freemarker.classpath.definition" template="/freemarker/layout.ftl">
+        <put-attribute name="title" value="This is the title."/>
+        <put-attribute name="header" value="/freemarker/header.ftl"/>
+        <put-attribute name="body" value="/freemarker/classpath.ftl"/>
+    </definition>
+</tiles-definitions>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/test/db/schema.sql b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/test/db/schema.sql
new file mode 100644
index 0000000..d79143e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/test/db/schema.sql
@@ -0,0 +1,146 @@
+
+CREATE TABLE public.Definition (
+                id NUMERIC(12,0) NOT NULL,
+                name VARCHAR(255) NOT NULL,
+                preparer VARCHAR(1000) NULL,
+                template VARCHAR(1000) NULL,
+                Customization_id NUMERIC(12,0) NOT NULL,
+                parent_name VARCHAR(255) NULL,
+                CONSTRAINT Definition_pk PRIMARY KEY (id)
+);
+
+CREATE INDEX public.Definition_idx
+ ON public.Definition
+ ( name ASC );
+
+CREATE TABLE public.Attribute (
+                id NUMERIC(12,0) NOT NULL,
+                name VARCHAR(255) NOT NULL,
+                type VARCHAR(255) NULL,
+                value VARCHAR(1000) NOT NULL,
+                cascade_attribute BOOLEAN NOT NULL,
+                Definition_id NUMERIC(12,0) NULL,
+                Parent_id NUMERIC(12,0) NULL,
+                CONSTRAINT Attribute_pk PRIMARY KEY (id)
+);
+
+CREATE TABLE public.Role (
+                id NUMERIC(12,0) NOT NULL,
+                name VARCHAR(255) NOT NULL,
+                CONSTRAINT Role_pk PRIMARY KEY (id)
+);
+
+CREATE INDEX public.Role_idx
+ ON public.Role
+ ( name ASC );
+
+CREATE TABLE public.Customization (
+                id NUMERIC(12,0) NOT NULL,
+                Parent_id NUMERIC(12,0) NULL,
+                name VARCHAR(255) NOT NULL,
+                CONSTRAINT Customization_pk PRIMARY KEY (id)
+);
+
+CREATE INDEX public.Customization_idx
+ ON public.Customization
+ ( name ASC );
+
+CREATE INDEX public.Customization_idx1
+ ON public.Customization
+ ( name ASC );
+
+CREATE TABLE public.Visible_for (
+                Definition_id NUMERIC(12,0) NOT NULL,
+                Role_id NUMERIC(12,0) NOT NULL,
+                CONSTRAINT Visible_for_pk PRIMARY KEY (Definition_id, Role_id)
+);
+
+CREATE TABLE public.Attribute_visible_for (
+                Attribute_id NUMERIC(12,0) NOT NULL,
+                Role_id NUMERIC(12,0) NOT NULL,
+                CONSTRAINT Attribute_visible_for_pk PRIMARY KEY (Attribute_id, Role_id)
+);
+
+
+ALTER TABLE public.Attribute ADD CONSTRAINT Definition_Attribute_fk
+FOREIGN KEY (Definition_id)
+REFERENCES public.Definition (id)
+;
+
+
+ALTER TABLE public.Visible_for ADD CONSTRAINT Definition_Visible_for_fk
+FOREIGN KEY (Definition_id)
+REFERENCES public.Definition (id)
+;
+
+
+ALTER TABLE public.Attribute ADD CONSTRAINT Attribute_Attribute_fk
+FOREIGN KEY (Parent_id)
+REFERENCES public.Attribute (id)
+;
+
+
+ALTER TABLE public.Attribute_visible_for ADD CONSTRAINT Attribute_Attribute_visible_for_fk
+FOREIGN KEY (Attribute_id)
+REFERENCES public.Attribute (id)
+;
+
+
+ALTER TABLE public.Visible_for ADD CONSTRAINT Role_Visible_for_fk
+FOREIGN KEY (Role_id)
+REFERENCES public.Role (id)
+;
+
+
+ALTER TABLE public.Attribute_visible_for ADD CONSTRAINT Role_Attribute_visible_for_fk
+FOREIGN KEY (Role_id)
+REFERENCES public.Role (id)
+;
+
+
+ALTER TABLE public.Definition ADD CONSTRAINT Customization_Definition_fk
+FOREIGN KEY (Customization_id)
+REFERENCES public.Customization (id)
+;
+
+
+ALTER TABLE public.Customization ADD CONSTRAINT Customization_Customization_fk
+FOREIGN KEY (Parent_id)
+REFERENCES public.Customization (id)
+;
+
+INSERT INTO "PUBLIC"."CUSTOMIZATION" (ID,PARENT_ID,NAME) VALUES (0,null,'');
+INSERT INTO "PUBLIC"."CUSTOMIZATION" (ID,PARENT_ID,NAME) VALUES (1,0,'en');
+INSERT INTO "PUBLIC"."CUSTOMIZATION" (ID,PARENT_ID,NAME) VALUES (2,1,'en_GB');
+INSERT INTO "PUBLIC"."CUSTOMIZATION" (ID,PARENT_ID,NAME) VALUES (3,1,'en_US');
+INSERT INTO "PUBLIC"."CUSTOMIZATION" (ID,PARENT_ID,NAME) VALUES (4,0,'fr');
+INSERT INTO "PUBLIC"."CUSTOMIZATION" (ID,PARENT_ID,NAME) VALUES (5,0,'it');
+
+INSERT INTO "PUBLIC"."DEFINITION" (ID,PARENT_NAME,NAME,PREPARER,TEMPLATE,CUSTOMIZATION_ID) VALUES (0,null,'test.localized.definition',null,'/layout.jsp',0);
+INSERT INTO "PUBLIC"."DEFINITION" (ID,PARENT_NAME,NAME,PREPARER,TEMPLATE,CUSTOMIZATION_ID) VALUES (2,null,'test.localized.definition',null,'/layout.jsp',2);
+INSERT INTO "PUBLIC"."DEFINITION" (ID,PARENT_NAME,NAME,PREPARER,TEMPLATE,CUSTOMIZATION_ID) VALUES (3,null,'test.localized.definition',null,'/layout.jsp',3);
+INSERT INTO "PUBLIC"."DEFINITION" (ID,PARENT_NAME,NAME,PREPARER,TEMPLATE,CUSTOMIZATION_ID) VALUES (4,null,'test.localized.definition',null,'/layout.jsp',4);
+INSERT INTO "PUBLIC"."DEFINITION" (ID,PARENT_NAME,NAME,PREPARER,TEMPLATE,CUSTOMIZATION_ID) VALUES (5,null,'test.localized.definition',null,'/layout.jsp',5);
+
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (0,'title',null,'Default locale',0,0,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (1,'header',null,'/header.jsp',0,0,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (2,'body',null,'/defaultlocale_db.jsp',0,0,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (3,'title',null,'British English locale',0,2,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (4,'header',null,'/header.jsp',0,2,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (5,'body',null,'/defaultlocale_db.jsp',0,2,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (6,'title',null,'American English locale',0,3,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (7,'header',null,'/header.jsp',0,3,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (8,'body',null,'/defaultlocale_db.jsp',0,3,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (9,'title',null,'French locale',0,4,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (10,'header',null,'/header.jsp',0,4,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (11,'body',null,'/defaultlocale_db.jsp',0,4,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (12,'title',null,'Italian locale',0,5,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (13,'header',null,'/header.jsp',0,5,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (14,'body',null,'/defaultlocale_db.jsp',0,5,null);
+
+INSERT INTO "PUBLIC"."DEFINITION" (ID,PARENT_NAME,NAME,PREPARER,TEMPLATE,CUSTOMIZATION_ID) VALUES (6,null,'test.definition',null,'/layout.jsp',0);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (15,'title',null,'This is the title.',0,6,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (16,'header',null,'/header.jsp',0,6,null);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (17,'body',null,'/body.jsp',0,6,null);
+INSERT INTO "PUBLIC"."DEFINITION" (ID,PARENT_NAME,NAME,PREPARER,TEMPLATE,CUSTOMIZATION_ID) VALUES (7,'test.definition','test.definition.extended',null,null,0);
+INSERT INTO "PUBLIC"."ATTRIBUTE" (ID,NAME,TYPE,VALUE,CASCADE_ATTRIBUTE,DEFINITION_ID,PARENT_ID) VALUES (18,'title',null,'This is an extended definition.',0,7,null);
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/velocity-classpath-defs.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/velocity-classpath-defs.xml
new file mode 100644
index 0000000..aba67d5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/resources/org/apache/tiles/velocity-classpath-defs.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+<!DOCTYPE tiles-definitions PUBLIC
+    "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+    "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+    <definition name="velocity.classpath.definition" template="/velocity/layout.vm">
+        <put-attribute name="title" value="This is the title."/>
+        <put-attribute name="header" value="/velocity/header.vm"/>
+        <put-attribute name="body" value="/velocity/classpath.vm"/>
+    </definition>
+</tiles-definitions>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/VM_global_library.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/VM_global_library.vm
new file mode 100644
index 0000000..7e8277d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/VM_global_library.vm
@@ -0,0 +1,60 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+##   http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+
+## Display all queued Struts errors
+#macro (errorMarkup)
+    #if ($errors.exist() )
+        <ul>
+        #foreach ($e in $errors.all )
+            $e
+        #end
+        </ul>
+    #end
+#end
+
+## Display all queued Struts errors for a particular property
+#macro (errorMarkupForProperty $property)
+    #if ($errors.exist($property) )
+        <ul>
+        #foreach ($er in $errors.get($property))
+            $er
+        #end
+        </ul>
+    #end
+#end
+
+## Display all queued Struts errors
+#macro (messageMarkup)
+    #if ($messages.exist() )
+        <ul>
+        #foreach ($m in $messages.all )
+            $m
+        #end
+        </ul>
+    #end
+#end
+
+## Display all queued Struts action messages for a particular property
+#macro (messageMarkupForProperty $property)
+    #if ($messages.exist($property) )
+        <ul>
+        #foreach ($m in $messages.get($property))
+            $m
+        #end
+        </ul>
+    #end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs-1.1.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs-1.1.xml
new file mode 100644
index 0000000..d32c6f1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs-1.1.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+       "http://struts.apache.org/dtds/tiles-config_1_1.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <definition name="freemarker.test.definition.old_format" template="/freemarker/layout.ftl">
+      <put name="title"  value="This is a definition configured in 1.1 format."/>
+      <put name="header" value="/freemarker/header.ftl"/>
+      <put name="body"   value="/freemarker/body.ftl"/>
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs.xml
new file mode 100644
index 0000000..6aa3095
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs.xml
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="freemarker.test.inner.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is a configured inner definition."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.definition.ignore" template="/freemarker/layout_ignore.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.definition.freemarker" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.definition.flush" template="/freemarker/layout_flush.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.definition.exception" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/exception.ftl" type="freemarker" />
+      <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.composite.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   value="test.inner.definition"/>
+  </definition>
+
+  <definition name="freemarker.test.putAttributes" template="/freemarker/putattributeslayout.ftl" templateType="freemarker">
+    <put-attribute name="stringTest" value="This is a string" type="string" />
+    <put-list-attribute name="list">
+      <add-attribute value="valueOne" type="string" />
+      <add-attribute value="valueTwo" type="string" />
+      <add-attribute value="valueThree" type="string" />
+    </put-list-attribute>
+  </definition>
+
+  <definition name="freemarker.test.putAttributes.inherit" extends="freemarker.test.putAttributes">
+    <put-list-attribute name="list" inherit="true">
+      <add-attribute value="valueFour" type="string" />
+    </put-list-attribute>
+  </definition>
+
+  <definition name="freemarker.test.putAllAttributes" template="/freemarker/putallattributeslayout.ftl" templateType="freemarker">
+    <put-attribute name="one" value="There should be three more strings" type="string" />
+    <put-attribute name="two" value="One" type="string" />
+    <put-attribute name="three" value="Two" type="string" />
+    <put-attribute name="four" value="Three" type="string" />
+  </definition>
+
+  <definition name="freemarker.preparer.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+  </definition>
+
+    <definition name="freemarker.testdispatchservlet" extends="test.definition"/>
+
+  <definition name="freemarker.preparer.definition.configured" extends="preparer.definition" preparer="org.apache.tiles.test.preparer.TestViewPreparer" />
+
+  <definition name="freemarker.test.localized.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title" value="Default locale" />
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body" value="/freemarker/defaultlocale.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.definition.appears" extends="test.definition">
+      <put-attribute name="title"  value="This definition appears."/>
+  </definition>
+
+  <definition name="freemarker.test.definition.does_not_appear" extends="test.definition">
+      <put-attribute name="title"  value="This definition does
+       not appear."/>
+  </definition>
+
+  <definition name="freemarker.test.definition.appears.configured"
+    extends="test.definition.appears" role="goodrole" />
+
+  <definition name="freemarker.test.definition.does_not_appear.configured"
+    extends="test.definition.does_not_appear" role="badrole" />
+
+  <definition name="freemarker.test.definition.roles" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" role="goodrole" />
+      <put-attribute name="body"   value="/freemarker/body.ftl" role="badrole" />
+  </definition>
+
+  <definition name="freemarker.test.definition.roles.tags" template="/freemarker/layout_roles.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+  </definition>
+
+  <!-- Tests for cascaded attributes -->
+  <definition name="freemarker.test.overridden.cascaded.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/freemarker/alternate-header.ftl" cascade="true"/>
+      <put-attribute name="body"   value="test.inner.definition"/>
+  </definition>
+
+  <definition name="freemarker.test.inner.cascadable.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.cascaded.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/freemarker/header.ftl" cascade="true"/>
+      <put-attribute name="body"   value="test.inner.cascadable.definition"/>
+  </definition>
+
+  <definition name="freemarker.test.cascaded.template.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/freemarker/header.ftl" cascade="true"/>
+      <put-attribute name="body"   value="/freemarker/layout_nobody.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.cascaded.list.definition" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/freemarker/header.ftl" cascade="true"/>
+      <put-attribute name="body"   value="/freemarker/putattributeslayout.ftl" type="freemarker" />
+      <put-attribute name="stringTest" value="This is a string" type="string" cascade="true" />
+      <put-list-attribute name="list" cascade="true">
+        <add-attribute value="valueOne" type="string" />
+        <add-attribute value="valueTwo" type="string" />
+        <add-attribute value="valueThree" type="string" />
+      </put-list-attribute>
+  </definition>
+
+  <definition name="freemarker.test.reversed.definition" template="/freemarker/layout_alt_title.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title." type="reversed"/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.nesting.definitions" template="/freemarker/layout.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body">
+          <definition template="/freemarker/layout.ftl" templateType="freemarker">
+              <put-attribute name="title"  value="This is a nested definition."/>
+              <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+              <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+          </definition>
+      </put-attribute>
+  </definition>
+
+  <definition name="freemarker.test.nesting.list.definitions" template="/freemarker/layout_list.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-list-attribute name="list">
+          <add-attribute>
+              <definition template="/freemarker/layout.ftl" templateType="freemarker">
+                  <put-attribute name="title"  value="This is a nested definition."/>
+                  <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+                  <put-attribute name="body"   value="/freemarker/body.ftl" type="freemarker" />
+              </definition>
+          </add-attribute>
+      </put-list-attribute>
+  </definition>
+
+  <definition name="freemarker.test.composite.el.definition" templateExpression="${layout}"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   expression="${requestScope.body}"/>
+  </definition>
+
+  <definition name="freemarker.test.composite.mvel.definition" templateExpression="MVEL:layout"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   expression="MVEL:requestScope.body"/>
+  </definition>
+
+  <definition name="freemarker.test.composite.ognl.definition" templateExpression="OGNL:layout"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   expression="OGNL:requestScope.body"/>
+  </definition>
+
+  <definition name="freemarker.test.composite.el.doNotShow.definition" templateExpression="${layout}"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured definition."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   expression="${requestScope.doNotShowBody}"/>
+  </definition>
+
+  <definition name="freemarker.test.definition.attribute.preparer" template="/freemarker/layout_preparer.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.openbody.definition" template="/freemarker/layout_closebody.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/freemarker/header.ftl" type="freemarker" />
+      <put-attribute name="body"   value="/freemarker/layout.ftl" type="freemarker" />
+  </definition>
+
+  <definition name="freemarker.test.defaultvalues.definition" template="/freemarker/layout_default.ftl" templateType="freemarker">
+      <put-attribute name="title"  value="This is the title."/>
+  </definition>
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_en_GB.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_en_GB.xml
new file mode 100644
index 0000000..7f9543c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_en_GB.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="freemarker.test.localized.definition" template="/freemarker/layout.ftl">
+      <put-attribute name="title" value="British English locale" />
+      <put-attribute name="header" value="/freemarker/header.ftl" />
+      <put-attribute name="body" value="/freemarker/defaultlocale.ftl" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_en_US.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_en_US.xml
new file mode 100644
index 0000000..aa15c32
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_en_US.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="freemarker.test.localized.definition" template="/freemarker/layout.ftl">
+      <put-attribute name="title" value="American English locale" />
+      <put-attribute name="header" value="/freemarker/header.ftl" />
+      <put-attribute name="body" value="/freemarker/defaultlocale.ftl" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_fr.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_fr.xml
new file mode 100644
index 0000000..5eb394e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_fr.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="freemarker.test.localized.definition" template="/freemarker/layout.ftl">
+      <put-attribute name="title" value="French locale" />
+      <put-attribute name="header" value="/freemarker/header.ftl" />
+      <put-attribute name="body" value="/freemarker/defaultlocale.ftl" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_it.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_it.xml
new file mode 100644
index 0000000..79b0c69
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/freemarker/tiles-defs_it.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="freemarker.test.localized.definition" template="/freemarker/layout.ftl">
+      <put-attribute name="title" value="Italian locale" />
+      <put-attribute name="header" value="/freemarker/header.ftl" />
+      <put-attribute name="body" value="/freemarker/defaultlocale.ftl" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/jsp/index.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/jsp/index.jsp
new file mode 100644
index 0000000..3f3f0ae
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/jsp/index.jsp
@@ -0,0 +1,43 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<%@taglib prefix="portlet" uri="http://java.sun.com/portlet_2_0" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<portlet:defineObjects/>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+<p>Type a definition name to render it.</p>
+<form action="<portlet:actionURL name='showDefinition' />" method="post">
+	<label for="definitionName">Definition name:</label><input id="definitionName" type="text" name="definition" />
+	<input type="submit" value="Render" />
+</form>
+
+
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/jsp/nosuchdefinition.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/jsp/nosuchdefinition.jsp
new file mode 100644
index 0000000..8f6490f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/jsp/nosuchdefinition.jsp
@@ -0,0 +1,35 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+No definition here!
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/portlet.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/portlet.xml
new file mode 100644
index 0000000..cfc28d8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/portlet.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<portlet-app
+  xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+  version="2.0">
+
+  <portlet>
+    <portlet-name>TestPortlet</portlet-name>
+    <display-name>TestPortlet</display-name>
+    <portlet-class>
+      org.apache.tiles.test.portlet.TestPortlet
+    </portlet-class>
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>VIEW</portlet-mode>
+    </supports>
+    <portlet-info>
+      <title>TestPortlet</title>
+    </portlet-info>
+  </portlet>
+</portlet-app>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs-1.1.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs-1.1.xml
new file mode 100644
index 0000000..71f49fd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs-1.1.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+       "http://struts.apache.org/dtds/tiles-config_1_1.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <definition name="test.definition.old_format" template="/layout.jsp">
+      <put name="title"  value="This is a definition configured in 1.1 format."/>
+      <put name="header" value="/header.jsp"/>
+      <put name="body"   value="/body.jsp"/>
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
new file mode 100644
index 0000000..32411b7
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="test.inner.definition" template="/layout.jsp">
+      <put-attribute name="title"  value="This is a configured inner definition."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+
+  <definition name="test.definition" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+
+  <definition name="test.definition.ignore" template="/layout_ignore.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+
+  <definition name="test.definition.freemarker" template="/layout.ftl">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+
+  <definition name="test.definition.flush" template="/layout_flush.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+
+  <definition name="test.definition.exception" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/exception.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+
+  <definition name="test.composite.definition" template="/layout.jsp">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="test.inner.definition"/>
+  </definition>
+
+  <definition name="test.putAttributes" template="/putattributeslayout.jsp">
+    <put-attribute name="stringTest" value="This is a string" type="string" />
+    <put-list-attribute name="list">
+      <add-attribute value="valueOne" type="string" />
+      <add-attribute value="valueTwo" type="string" />
+      <add-attribute value="valueThree" type="string" />
+    </put-list-attribute>
+  </definition>
+
+  <definition name="test.putAttributes.inherit" extends="test.putAttributes">
+    <put-list-attribute name="list" inherit="true">
+      <add-attribute value="valueFour" type="string" />
+    </put-list-attribute>
+  </definition>
+
+  <definition name="test.putAttributes.inherit" extends="test.putAttributes">
+    <put-list-attribute name="list" inherit="true">
+      <add-attribute value="valueFour" type="string" />
+    </put-list-attribute>
+  </definition>
+
+  <definition name="test.putAttributes.inherit" extends="test.putAttributes">
+    <put-list-attribute name="list" inherit="true">
+      <add-attribute value="valueFour" type="string" />
+    </put-list-attribute>
+  </definition>
+
+  <definition name="test.putAllAttributes" template="/putallattributeslayout.jsp">
+    <put-attribute name="one" value="There should be three more strings" type="string" />
+    <put-attribute name="two" value="One" type="string" />
+    <put-attribute name="three" value="Two" type="string" />
+    <put-attribute name="four" value="Three" type="string" />
+  </definition>
+
+  <definition name="preparer.definition" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp"/>
+  </definition>
+
+    <definition name="testdispatchservlet" extends="test.definition"/>
+
+  <definition name="preparer.definition.configured" extends="preparer.definition" preparer="org.apache.tiles.test.preparer.TestViewPreparer" />
+
+  <definition name="test.localized.definition" template="/layout.jsp">
+      <put-attribute name="title" value="Default locale" />
+      <put-attribute name="header" value="/header.jsp" />
+      <put-attribute name="body" value="/defaultlocale.jsp" />
+  </definition>
+
+  <definition name="test.definition.appears" extends="test.definition">
+      <put-attribute name="title"  value="This definition appears."/>
+  </definition>
+
+  <definition name="test.definition.does_not_appear" extends="test.definition">
+      <put-attribute name="title"  value="This definition does
+       not appear."/>
+  </definition>
+
+  <definition name="test.definition.appears.configured"
+    extends="test.definition.appears" role="goodrole" />
+
+  <definition name="test.definition.does_not_appear.configured"
+    extends="test.definition.does_not_appear" role="badrole" />
+
+  <definition name="test.definition.roles" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp" role="goodrole" />
+      <put-attribute name="body"   value="/body.jsp" role="badrole" />
+  </definition>
+
+  <definition name="test.definition.roles.tags" template="/layout_roles.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp" />
+      <put-attribute name="body"   value="/body.jsp" />
+  </definition>
+
+  <!-- Tests for cascaded attributes -->
+  <definition name="test.overridden.cascaded.definition" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/alternate-header.jsp" cascade="true"/>
+      <put-attribute name="body"   value="test.inner.definition"/>
+  </definition>
+
+  <definition name="test.inner.cascadable.definition" template="/layout.jsp">
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+
+  <definition name="test.cascaded.definition" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/header.jsp" cascade="true"/>
+      <put-attribute name="body"   value="test.inner.cascadable.definition"/>
+  </definition>
+
+  <definition name="test.cascaded.template.definition" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/header.jsp" cascade="true"/>
+      <put-attribute name="body"   value="/layout_nobody.jsp"/>
+  </definition>
+
+  <definition name="test.cascaded.list.definition" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/header.jsp" cascade="true"/>
+      <put-attribute name="body"   value="/putattributeslayout.jsp"/>
+      <put-attribute name="stringTest" value="This is a string" type="string" cascade="true" />
+      <put-list-attribute name="list" cascade="true">
+        <add-attribute value="valueOne" type="string" />
+        <add-attribute value="valueTwo" type="string" />
+        <add-attribute value="valueThree" type="string" />
+      </put-list-attribute>
+  </definition>
+
+  <definition name="test.reversed.definition" template="/layout_alt_title.jsp">
+      <put-attribute name="title"  value="This is the title." type="reversed"/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+
+  <definition name="test.nesting.definitions" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body">
+          <definition template="/layout.jsp">
+              <put-attribute name="title"  value="This is a nested definition."/>
+              <put-attribute name="header" value="/header.jsp"/>
+              <put-attribute name="body"   value="/body.jsp"/>
+          </definition>
+      </put-attribute>
+  </definition>
+
+  <definition name="test.nesting.list.definitions" template="/layout_list.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-list-attribute name="list">
+          <add-attribute>
+              <definition template="/layout.jsp">
+                  <put-attribute name="title"  value="This is a nested definition."/>
+                  <put-attribute name="header" value="/header.jsp"/>
+                  <put-attribute name="body"   value="/body.jsp"/>
+              </definition>
+          </add-attribute>
+      </put-list-attribute>
+  </definition>
+
+  <definition name="test.composite.el.definition" templateExpression="${layout}"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   expression="${requestScope.body}"/>
+  </definition>
+
+  <definition name="test.composite.mvel.definition" templateExpression="MVEL:layout"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   expression="MVEL:requestScope.body"/>
+  </definition>
+
+  <definition name="test.composite.ognl.definition" templateExpression="OGNL:layout"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   expression="OGNL:requestScope.body"/>
+  </definition>
+
+  <definition name="test.composite.el.doNotShow.definition" templateExpression="${layout}"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured definition."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   expression="${requestScope.doNotShowBody}"/>
+  </definition>
+
+  <definition name="test.definition.attribute.preparer" template="/layout_preparer.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp"/>
+  </definition>
+
+  <definition name="test.openbody.definition" template="/layout_closebody.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body"   value="/layout.jsp" />
+  </definition>
+
+  <definition name="test.defaultvalues.definition" template="/layout_default.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+  </definition>
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_en_GB.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_en_GB.xml
new file mode 100644
index 0000000..ccac30a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_en_GB.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="test.localized.definition" template="/layout.jsp">
+      <put-attribute name="title" value="British English locale" />
+      <put-attribute name="header" value="/header.jsp" />
+      <put-attribute name="body" value="/defaultlocale.jsp" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_en_US.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_en_US.xml
new file mode 100644
index 0000000..8c5090f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_en_US.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="test.localized.definition" template="/layout.jsp">
+      <put-attribute name="title" value="American English locale" />
+      <put-attribute name="header" value="/header.jsp" />
+      <put-attribute name="body" value="/defaultlocale.jsp" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_fr.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_fr.xml
new file mode 100644
index 0000000..2a4e83d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_fr.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="test.localized.definition" template="/layout.jsp">
+      <put-attribute name="title" value="French locale" />
+      <put-attribute name="header" value="/header.jsp" />
+      <put-attribute name="body" value="/defaultlocale.jsp" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_it.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_it.xml
new file mode 100644
index 0000000..bc8db02
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tiles-defs_it.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="test.localized.definition" template="/layout.jsp">
+      <put-attribute name="title" value="Italian locale" />
+      <put-attribute name="header" value="/header.jsp" />
+      <put-attribute name="body" value="/defaultlocale.jsp" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tools.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tools.xml
new file mode 100644
index 0000000..3a07bf4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/tools.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<tools>
+  <toolbox scope="request">
+    <tool key="exc" class="org.apache.tiles.test.velocity.ExceptionTool"/>
+    <tool class="org.apache.velocity.tools.generic.ContextTool"/>
+  </toolbox>
+  <toolbox scope="application">
+     <tool class="org.apache.velocity.tools.generic.EscapeTool"/>
+   </toolbox>
+</tools>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity.properties b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity.properties
new file mode 100644
index 0000000..805a9e4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity.properties
@@ -0,0 +1,129 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# ----------------------------------------------------------------------------
+# These are the default properties for the
+# Velocity Runtime. These values are used when
+# Runtime.init() is called, and when Runtime.init(properties)
+# fails to find the specificed properties file.
+# ----------------------------------------------------------------------------
+
+
+# ----------------------------------------------------------------------------
+# R U N T I M E  L O G
+# ----------------------------------------------------------------------------
+# Velocity uses the Servlet APIs logging facilites.
+
+# ----------------------------------------------------------------------------
+# This controls if Runtime.error(), info() and warn() messages include the
+# whole stack trace. The last property controls whether invalid references
+# are logged.
+# ----------------------------------------------------------------------------
+
+runtime.log.invalid.reference = true
+
+
+# ----------------------------------------------------------------------------
+# T E M P L A T E  E N C O D I N G
+# ----------------------------------------------------------------------------
+
+input.encoding=ISO-8859-1
+output.encoding=ISO-8859-1
+
+
+# ----------------------------------------------------------------------------
+# F O R E A C H  P R O P E R T I E S
+# ----------------------------------------------------------------------------
+# These properties control how the counter is accessed in the #foreach
+# directive. By default the reference $velocityCount will be available
+# in the body of the #foreach directive. The default starting value
+# for this reference is 1.
+# ----------------------------------------------------------------------------
+
+directive.foreach.counter.name = velocityCount
+directive.foreach.counter.initial.value = 1
+
+
+# ----------------------------------------------------------------------------
+# I N C L U D E  P R O P E R T I E S
+# ----------------------------------------------------------------------------
+# These are the properties that governed the way #include'd content
+# is governed.
+# ----------------------------------------------------------------------------
+
+directive.include.output.errormsg.start = <!-- include error :
+directive.include.output.errormsg.end   =  see error log -->
+
+
+# ----------------------------------------------------------------------------
+# P A R S E  P R O P E R T I E S
+# ----------------------------------------------------------------------------
+
+directive.parse.max.depth = 10
+
+
+# ----------------------------------------------------------------------------
+# VELOCIMACRO PROPERTIES
+# ----------------------------------------------------------------------------
+# global : name of default global library.  It is expected to be in the regular
+# template path.  You may remove it (either the file or this property) if
+# you wish with no harm.
+# ----------------------------------------------------------------------------
+# dev-changes by Marino
+resource.loader=class, webapp, string
+
+class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
+
+webapp.resource.loader.cache = true
+webapp.resource.loader.modificationCheckInterval = 5
+velocimacro.library.autoreload = false
+velocimacro.library = /WEB-INF/VM_global_library.vm
+
+velocimacro.permissions.allow.inline = true
+velocimacro.permissions.allow.inline.to.replace.global = false
+velocimacro.permissions.allow.inline.local.scope = false
+
+velocimacro.context.localscope = false
+
+# ----------------------------------------------------------------------------
+# INTERPOLATION
+# ----------------------------------------------------------------------------
+# turn off and on interpolation of references and directives in string
+# literals.  ON by default :)
+# ----------------------------------------------------------------------------
+runtime.interpolate.string.literals = true
+
+
+# ----------------------------------------------------------------------------
+# RESOURCE MANAGEMENT
+# ----------------------------------------------------------------------------
+# Allows alternative ResourceManager and ResourceCache implementations
+# to be plugged in.
+# ----------------------------------------------------------------------------
+resource.manager.class = org.apache.velocity.runtime.resource.ResourceManagerImpl
+resource.manager.cache.class = org.apache.velocity.runtime.resource.ResourceCacheImpl
+
+userdirective=org.apache.tiles.velocity.template.AddAttributeDirective,\
+  org.apache.tiles.velocity.template.AddListAttributeDirective,\
+  org.apache.tiles.velocity.template.DefinitionDirective,\
+  org.apache.tiles.velocity.template.GetAsStringDirective,\
+  org.apache.tiles.velocity.template.ImportAttributeDirective,\
+  org.apache.tiles.velocity.template.InsertAttributeDirective,\
+  org.apache.tiles.velocity.template.InsertDefinitionDirective,\
+  org.apache.tiles.velocity.template.InsertTemplateDirective,\
+  org.apache.tiles.velocity.template.PutAttributeDirective,\
+  org.apache.tiles.velocity.template.PutListAttributeDirective
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs-1.1.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs-1.1.xml
new file mode 100644
index 0000000..32b5b3d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs-1.1.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+       "http://struts.apache.org/dtds/tiles-config_1_1.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <definition name="velocity.test.definition.old_format" template="/velocity/layout.vm">
+      <put name="title"  value="This is a definition configured in 1.1 format."/>
+      <put name="header" value="/velocity/header.vm"/>
+      <put name="body"   value="/velocity/body.vm"/>
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs.xml
new file mode 100644
index 0000000..c2b974c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs.xml
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+
+  <!-- =======================================================  -->
+  <!-- Master definition  									-->
+  <!-- =======================================================  -->
+
+  <!-- Doc index page description  -->
+  <definition name="velocity.test.inner.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is a configured inner definition."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.definition.ignore" template="/velocity/layout_ignore.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.definition.velocity" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.definition.flush" template="/velocity/layout_flush.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.definition.exception" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/exception.vm" type="velocity" />
+      <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.composite.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   value="test.inner.definition"/>
+  </definition>
+
+  <definition name="velocity.test.putAttributes" template="/velocity/putattributeslayout.vm" templateType="velocity">
+    <put-attribute name="stringTest" value="This is a string" type="string" />
+    <put-list-attribute name="list">
+      <add-attribute value="valueOne" type="string" />
+      <add-attribute value="valueTwo" type="string" />
+      <add-attribute value="valueThree" type="string" />
+    </put-list-attribute>
+  </definition>
+
+  <definition name="velocity.test.putAttributes.inherit" extends="velocity.test.putAttributes">
+    <put-list-attribute name="list" inherit="true">
+      <add-attribute value="valueFour" type="string" />
+    </put-list-attribute>
+  </definition>
+
+  <definition name="velocity.test.putAllAttributes" template="/velocity/putallattributeslayout.vm" templateType="velocity">
+    <put-attribute name="one" value="There should be three more strings" type="string" />
+    <put-attribute name="two" value="One" type="string" />
+    <put-attribute name="three" value="Two" type="string" />
+    <put-attribute name="four" value="Three" type="string" />
+  </definition>
+
+  <definition name="velocity.preparer.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+  </definition>
+
+    <definition name="velocity.testdispatchservlet" extends="test.definition"/>
+
+  <definition name="velocity.preparer.definition.configured" extends="preparer.definition" preparer="org.apache.tiles.test.preparer.TestViewPreparer" />
+
+  <definition name="velocity.test.localized.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title" value="Default locale" />
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body" value="/velocity/defaultlocale.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.definition.appears" extends="test.definition">
+      <put-attribute name="title"  value="This definition appears."/>
+  </definition>
+
+  <definition name="velocity.test.definition.does_not_appear" extends="test.definition">
+      <put-attribute name="title"  value="This definition does
+       not appear."/>
+  </definition>
+
+  <definition name="velocity.test.definition.appears.configured"
+    extends="test.definition.appears" role="goodrole" />
+
+  <definition name="velocity.test.definition.does_not_appear.configured"
+    extends="test.definition.does_not_appear" role="badrole" />
+
+  <definition name="velocity.test.definition.roles" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" role="goodrole" />
+      <put-attribute name="body"   value="/velocity/body.vm" role="badrole" />
+  </definition>
+
+  <definition name="velocity.test.definition.roles.tags" template="/velocity/layout_roles.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+  </definition>
+
+  <!-- Tests for cascaded attributes -->
+  <definition name="velocity.test.overridden.cascaded.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/velocity/alternate-header.vm" cascade="true"/>
+      <put-attribute name="body"   value="test.inner.definition"/>
+  </definition>
+
+  <definition name="velocity.test.inner.cascadable.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.cascaded.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/velocity/header.vm" cascade="true"/>
+      <put-attribute name="body"   value="test.inner.cascadable.definition"/>
+  </definition>
+
+  <definition name="velocity.test.cascaded.template.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/velocity/header.vm" cascade="true"/>
+      <put-attribute name="body"   value="/velocity/layout_nobody.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.cascaded.list.definition" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title." cascade="true" />
+      <put-attribute name="header" value="/velocity/header.vm" cascade="true"/>
+      <put-attribute name="body"   value="/velocity/putattributeslayout.vm" type="velocity" />
+      <put-attribute name="stringTest" value="This is a string" type="string" cascade="true" />
+      <put-list-attribute name="list" cascade="true">
+        <add-attribute value="valueOne" type="string" />
+        <add-attribute value="valueTwo" type="string" />
+        <add-attribute value="valueThree" type="string" />
+      </put-list-attribute>
+  </definition>
+
+  <definition name="velocity.test.reversed.definition" template="/velocity/layout_alt_title.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title." type="reversed"/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.nesting.definitions" template="/velocity/layout.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body">
+          <definition template="/velocity/layout.vm" templateType="velocity">
+              <put-attribute name="title"  value="This is a nested definition."/>
+              <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+              <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+          </definition>
+      </put-attribute>
+  </definition>
+
+  <definition name="velocity.test.nesting.list.definitions" template="/velocity/layout_list.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-list-attribute name="list">
+          <add-attribute>
+              <definition template="/velocity/layout.vm" templateType="velocity">
+                  <put-attribute name="title"  value="This is a nested definition."/>
+                  <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+                  <put-attribute name="body"   value="/velocity/body.vm" type="velocity" />
+              </definition>
+          </add-attribute>
+      </put-list-attribute>
+  </definition>
+
+  <definition name="velocity.test.composite.el.definition" templateExpression="${layout}"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   expression="${requestScope.body}"/>
+  </definition>
+
+  <definition name="velocity.test.composite.mvel.definition" templateExpression="MVEL:layout"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   expression="MVEL:requestScope.body"/>
+  </definition>
+
+  <definition name="velocity.test.composite.ognl.definition" templateExpression="OGNL:layout"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured composite definition."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   expression="OGNL:requestScope.body"/>
+  </definition>
+
+  <definition name="velocity.test.composite.el.doNotShow.definition" templateExpression="${layout}"
+        preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer">
+      <put-attribute name="title"  value="This is a configured definition."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   expression="${requestScope.doNotShowBody}"/>
+  </definition>
+
+  <definition name="velocity.test.definition.attribute.preparer" template="/velocity/layout_preparer.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.openbody.definition" template="/velocity/layout_closebody.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/velocity/header.vm" type="velocity" />
+      <put-attribute name="body"   value="/velocity/layout.vm" type="velocity" />
+  </definition>
+
+  <definition name="velocity.test.defaultvalues.definition" template="/velocity/layout_default.vm" templateType="velocity">
+      <put-attribute name="title"  value="This is the title."/>
+  </definition>
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_en_GB.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_en_GB.xml
new file mode 100644
index 0000000..c274737
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_en_GB.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="velocity.test.localized.definition" template="/velocity/layout.vm">
+      <put-attribute name="title" value="British English locale" />
+      <put-attribute name="header" value="/velocity/header.vm" />
+      <put-attribute name="body" value="/velocity/defaultlocale.vm" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_en_US.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_en_US.xml
new file mode 100644
index 0000000..b43699f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_en_US.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="velocity.test.localized.definition" template="/velocity/layout.vm">
+      <put-attribute name="title" value="American English locale" />
+      <put-attribute name="header" value="/velocity/header.vm" />
+      <put-attribute name="body" value="/velocity/defaultlocale.vm" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_fr.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_fr.xml
new file mode 100644
index 0000000..5a64c76
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_fr.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="velocity.test.localized.definition" template="/velocity/layout.vm">
+      <put-attribute name="title" value="French locale" />
+      <put-attribute name="header" value="/velocity/header.vm" />
+      <put-attribute name="body" value="/velocity/defaultlocale.vm" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_it.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_it.xml
new file mode 100644
index 0000000..0280c33
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/velocity/tiles-defs_it.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+ <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+
+<!-- Definitions for Tiles documentation   -->
+
+<tiles-definitions>
+  <definition name="velocity.test.localized.definition" template="/velocity/layout.vm">
+      <put-attribute name="title" value="Italian locale" />
+      <put-attribute name="header" value="/velocity/header.vm" />
+      <put-attribute name="body" value="/velocity/defaultlocale.vm" />
+  </definition>
+
+</tiles-definitions>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/web.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..efb53c1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         version="2.5">
+
+    <display-name>Tiles Test Application</display-name>
+    <distributable/>
+
+    <listener>
+      <listener-class>org.apache.tiles.test.init.InitContextListener</listener-class>
+    </listener>
+    <listener>
+      <listener-class>org.apache.tiles.extras.module.ModularTilesListener</listener-class>
+    </listener>
+    <filter>
+        <filter-name>Tiles Decoration Filter</filter-name>
+        <filter-class>org.apache.tiles.web.util.TilesDecorationFilter</filter-class>
+        <init-param>
+            <param-name>definition</param-name>
+            <param-value>test.definition</param-value>
+        </init-param>
+        <init-param>
+            <param-name>attribute-name</param-name>
+            <param-value>body</param-value>
+        </init-param>
+    </filter>
+
+    <filter>
+        <filter-name>Security Wrapping Filter</filter-name>
+        <filter-class>org.apache.tiles.test.filter.SecurityWrappingFilter</filter-class>
+    </filter>
+
+    <filter-mapping>
+        <filter-name>Tiles Decoration Filter</filter-name>
+        <url-pattern>/testdecorationfilter.jsp</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+    </filter-mapping>
+
+    <filter-mapping>
+        <filter-name>Tiles Decoration Filter</filter-name>
+        <url-pattern>/freemarker/testdecorationfilter.ftl</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+    </filter-mapping>
+
+    <filter-mapping>
+        <filter-name>Tiles Decoration Filter</filter-name>
+        <url-pattern>/velocity/testdecorationfilter.vm</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+    </filter-mapping>
+
+    <filter-mapping>
+        <filter-name>Security Wrapping Filter</filter-name>
+        <url-pattern>/*</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+    </filter-mapping>
+
+    <!-- Standard Action Servlet Configuration -->
+    <servlet>
+        <servlet-name>freemarker</servlet-name>
+        <servlet-class>org.apache.tiles.request.freemarker.servlet.SharedVariableLoaderFreemarkerServlet</servlet-class>
+
+        <!-- FreemarkerServlet settings: -->
+        <init-param>
+            <param-name>TemplatePath</param-name>
+            <param-value>/</param-value>
+        </init-param>
+        <init-param>
+            <param-name>NoCache</param-name>
+            <param-value>true</param-value>
+        </init-param>
+        <init-param>
+            <param-name>ContentType</param-name>
+            <param-value>text/html</param-value>
+        </init-param>
+
+        <!-- FreeMarker settings: -->
+        <init-param>
+            <param-name>template_update_delay</param-name>
+            <param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. -->
+        </init-param>
+        <init-param>
+            <param-name>default_encoding</param-name>
+            <param-value>ISO-8859-1</param-value>
+        </init-param>
+        <init-param>
+            <param-name>number_format</param-name>
+            <param-value>0.##########</param-value>
+        </init-param>
+        <init-param>
+            <param-name>org.apache.tiles.request.freemarker.CUSTOM_SHARED_VARIABLE_FACTORIES</param-name>
+            <param-value>tiles,org.apache.tiles.freemarker.TilesSharedVariableFactory</param-value>
+        </init-param>
+
+        <load-on-startup>5</load-on-startup>
+    </servlet>
+
+    <servlet>
+      <servlet-name>velocity</servlet-name>
+      <servlet-class>org.apache.velocity.tools.view.VelocityViewServlet</servlet-class>
+
+      <!--
+        Unless you plan to put your tools.xml and velocity.properties under
+        different folders or give them different names, then these two
+        init-params are unnecessary. The VelocityViewServlet will
+        automatically look for these files in the following locations.
+      -->
+      <init-param>
+        <param-name>org.apache.velocity.toolbox</param-name>
+        <param-value>/WEB-INF/tools.xml</param-value>
+      </init-param>
+
+      <init-param>
+        <param-name>org.apache.velocity.properties</param-name>
+        <param-value>/WEB-INF/velocity.properties</param-value>
+      </init-param>
+    </servlet>
+
+
+    <servlet>
+        <servlet-name>Tiles Dispatch Servlet</servlet-name>
+        <servlet-class>org.apache.tiles.web.util.TilesDispatchServlet</servlet-class>
+    </servlet>
+
+    <!-- Standard Action Servlet Configuration -->
+    <servlet>
+        <servlet-name>layoutServlet</servlet-name>
+        <servlet-class>org.apache.tiles.test.servlet.IncludingServlet</servlet-class>
+        <init-param>
+            <param-name>include</param-name>
+            <param-value>/layout.jsp</param-value>
+        </init-param>
+        <init-param>
+            <param-name>errorInclude</param-name>
+            <param-value>/errorInclude.jsp</param-value>
+        </init-param>
+    </servlet>
+    <servlet>
+        <servlet-name>selectLocaleServlet</servlet-name>
+        <servlet-class>org.apache.tiles.test.servlet.SelectLocaleServlet</servlet-class>
+        <init-param>
+            <param-name>org.apache.tiles.test.servlet.ServletConfig.DEFINITION_NAME</param-name>
+            <param-value>test.localized.definition</param-value>
+        </init-param>
+    </servlet>
+    <servlet>
+        <servlet-name>selectLocaleServletDb</servlet-name>
+        <servlet-class>org.apache.tiles.test.servlet.SelectLocaleServlet</servlet-class>
+        <init-param>
+            <param-name>org.apache.tiles.test.servlet.ServletConfig.DEFINITION_NAME</param-name>
+            <param-value>test.localized.definition</param-value>
+        </init-param>
+        <init-param>
+            <param-name>org.apache.tiles.test.servlet.ServletConfig.CONTAINER_KEY</param-name>
+            <param-value>db</param-value>
+        </init-param>
+    </servlet>
+    <servlet>
+        <servlet-name>selectLocaleServletFreemarker</servlet-name>
+        <servlet-class>org.apache.tiles.test.servlet.SelectLocaleServlet</servlet-class>
+        <init-param>
+            <param-name>org.apache.tiles.test.servlet.ServletConfig.DEFINITION_NAME</param-name>
+            <param-value>freemarker.test.localized.definition</param-value>
+        </init-param>
+    </servlet>
+    <servlet>
+        <servlet-name>selectLocaleServletVelocity</servlet-name>
+        <servlet-class>org.apache.tiles.test.servlet.SelectLocaleServlet</servlet-class>
+        <init-param>
+            <param-name>org.apache.tiles.test.servlet.ServletConfig.DEFINITION_NAME</param-name>
+            <param-value>velocity.test.localized.definition</param-value>
+        </init-param>
+    </servlet>
+
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
+
+    <servlet-mapping>
+        <servlet-name>freemarker</servlet-name>
+        <url-pattern>*.ftl</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>layoutServlet</servlet-name>
+        <url-pattern>/servlets/layoutServlet</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>selectLocaleServlet</servlet-name>
+        <url-pattern>/servlets/selectLocaleServlet</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>selectLocaleServletDb</servlet-name>
+        <url-pattern>/servlets/selectLocaleServletDb</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>selectLocaleServletFreemarker</servlet-name>
+        <url-pattern>/freemarker/servlets/selectLocaleServlet</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>selectLocaleServletVelocity</servlet-name>
+        <url-pattern>/velocity/servlets/selectLocaleServlet</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>velocity</servlet-name>
+        <url-pattern>*.vm</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>Tiles Dispatch Servlet</servlet-name>
+        <url-pattern>*.tiles</url-pattern>
+    </servlet-mapping>
+</web-app>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/alternate-header.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/alternate-header.jsp
new file mode 100644
index 0000000..f03f1b7
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/alternate-header.jsp
@@ -0,0 +1,26 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<strong>This is the alternate header</strong>
+    
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/body.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/body.jsp
new file mode 100644
index 0000000..a99227c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/body.jsp
@@ -0,0 +1,25 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<div align="center"><b><i>This is a body</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/classpath.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/classpath.jsp
new file mode 100644
index 0000000..01f9463
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/classpath.jsp
@@ -0,0 +1,25 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<div align="center"><b><i>This tile was loaded from the classpath</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/defaultlocale.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/defaultlocale.jsp
new file mode 100644
index 0000000..b74fd94
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/defaultlocale.jsp
@@ -0,0 +1,28 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<div align="center"><b><i>
+<div id="defaultLocaleMessage">Your default Locale is <%=request.getLocale().toString() %></div>
+</i></b></div>
+<a href="../selectlocale.jsp">Select another locale</a>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/defaultlocale_db.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/defaultlocale_db.jsp
new file mode 100644
index 0000000..bd1b73c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/defaultlocale_db.jsp
@@ -0,0 +1,28 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<div align="center"><b><i>
+<div id="defaultLocaleMessage">Your default Locale is <%=request.getLocale().toString() %></div>
+</i></b></div>
+<a href="../selectlocale_db.jsp">Select another locale</a>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/errorInclude.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/errorInclude.jsp
new file mode 100644
index 0000000..4a2deb3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/errorInclude.jsp
@@ -0,0 +1,25 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+The "force include" attribute has not been set.
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/exception.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/exception.jsp
new file mode 100644
index 0000000..2672be2
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/exception.jsp
@@ -0,0 +1,26 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<strong>This throws an exception</strong>
+<% throw new Exception("This is a test exception"); %>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/alternate-header.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/alternate-header.ftl
new file mode 100644
index 0000000..abd9e7c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/alternate-header.ftl
@@ -0,0 +1,25 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<strong>This is the alternate header</strong>
+    
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/body.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/body.ftl
new file mode 100644
index 0000000..fed2a6a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/body.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<div align="center"><b><i>This is a body</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/classpath.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/classpath.ftl
new file mode 100644
index 0000000..20f3e88
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/classpath.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<div align="center"><b><i>This tile was loaded from the classpath</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/defaultlocale.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/defaultlocale.ftl
new file mode 100644
index 0000000..b7f795c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/defaultlocale.ftl
@@ -0,0 +1,27 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<div align="center"><b><i>
+<div id="defaultLocaleMessage">Your default Locale is ${.locale}</div>
+</i></b></div>
+<a href="../selectlocale.ftl">Select another locale</a>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/defaultlocale_db.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/defaultlocale_db.ftl
new file mode 100644
index 0000000..0fd285d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/defaultlocale_db.ftl
@@ -0,0 +1,27 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<div align="center"><b><i>
+<div id="defaultLocaleMessage">Your default Locale is <%=request.getLocale().toString() %></div>
+</i></b></div>
+<a href="../selectlocale_db.ftl">Select another locale</a>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/errorInclude.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/errorInclude.ftl
new file mode 100644
index 0000000..393fc72
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/errorInclude.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+The "force include" attribute has not been set.
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/exception.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/exception.ftl
new file mode 100644
index 0000000..4b8fba9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/exception.ftl
@@ -0,0 +1,25 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<strong>This throws an exception</strong>
+<#assign testValue=1/0 />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/header.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/header.ftl
new file mode 100644
index 0000000..c17e62d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/header.ftl
@@ -0,0 +1,25 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<strong>This is the header</strong>
+    
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout.ftl
new file mode 100644
index 0000000..403c96b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layoutOne.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layoutOne.ftl
new file mode 100644
index 0000000..60208d6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layoutOne.ftl
@@ -0,0 +1,37 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="yellow">This is layout one.</td>
+  </tr>
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layoutTwo.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layoutTwo.ftl
new file mode 100644
index 0000000..1e17428
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layoutTwo.ftl
@@ -0,0 +1,37 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="yellow">This is layout two.</td>
+  </tr>
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_alt_title.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_alt_title.ftl
new file mode 100644
index 0000000..4b485de
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_alt_title.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.insertAttribute name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_closebody.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_closebody.ftl
new file mode 100644
index 0000000..71e9133
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_closebody.ftl
@@ -0,0 +1,40 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td>
+    <@tiles.insertAttribute name="body">
+        <@tiles.putAttribute name="title"  value="This is a customized context" />
+        <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+        <@tiles.putAttribute name="body"   value="/freemarker/body.ftl" />
+    </@tiles.insertAttribute>
+    </td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_default.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_default.ftl
new file mode 100644
index 0000000..54b806a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_default.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.insertAttribute name="title" defaultValue="This is the default title."/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header" defaultValue="alternate-header.ftl" defaultValueType="template"/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body" defaultValue="This is the default body in the tag."/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_flush.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_flush.ftl
new file mode 100644
index 0000000..129b778
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_flush.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header" flush=true/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body" flush=true/></td>
+  </tr>
+</table>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_ignore.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_ignore.ftl
new file mode 100644
index 0000000..e6b39d7
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_ignore.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header" ignore=true /></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_list.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_list.ftl
new file mode 100644
index 0000000..09e434b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_list.ftl
@@ -0,0 +1,39 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td>
+        <@tiles.importAttribute name="list"/>
+        <#list list as attribute>
+            <@tiles.insertAttribute value=attribute />
+        </#list>
+    </td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_nobody.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_nobody.ftl
new file mode 100644
index 0000000..a1e1cc9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_nobody.ftl
@@ -0,0 +1,31 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_override.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_override.ftl
new file mode 100644
index 0000000..7f16827
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_override.ftl
@@ -0,0 +1,37 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Green"><strong>This is the overridden template.</strong></td>
+  </tr>
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_preparer.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_preparer.ftl
new file mode 100644
index 0000000..e8c83a3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_preparer.ftl
@@ -0,0 +1,35 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body"
+        preparer="org.apache.tiles.test.preparer.AttributeViewPreparer"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_roles.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_roles.ftl
new file mode 100644
index 0000000..c72e7ba
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/layout_roles.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header" role="goodrole"/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body" role="badrole"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/override.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/override.ftl
new file mode 100644
index 0000000..79640d7
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/override.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<div align="center"><b><i>This is an overridden content</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/putallattributeslayout.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/putallattributeslayout.ftl
new file mode 100644
index 0000000..51040a8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/putallattributeslayout.ftl
@@ -0,0 +1,31 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.importAttribute/>
+
+${one}
+<ul>
+  <li>${two}</li>
+  <li>${three}</li>
+  <li>${four}</li>
+</ul>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/putattributeslayout.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/putattributeslayout.ftl
new file mode 100644
index 0000000..93f09d0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/putattributeslayout.ftl
@@ -0,0 +1,32 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.importAttribute name="stringTest"/>
+<@tiles.importAttribute name="list"/>
+Single attribute "stringTest" value: ${stringTest?html} <br/><br/>
+The attribute "list" contains these values:
+<ul>
+<#list list as item>
+<li><@tiles.insertAttribute value=item /></li>
+</#list>
+</ul>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/selectlocale.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/selectlocale.ftl
new file mode 100644
index 0000000..6b515b8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/selectlocale.ftl
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Select your locale</title>
+</head>
+<body>
+<form action="servlets/selectLocaleServlet">
+Select your locale:
+<select name="locale">
+<option selected="selected" value="">Default</option>
+<option value="en_US">American English</option>
+<option value="en_GB">British English</option>
+<option value="fr_FR">French</option>
+<option value="it_IT">Italian</option>
+</select>
+<input type="submit" value="Submit" />
+</form>
+<div id="defaultLocaleMessage">Your default Locale is ${.locale}</div>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdecorationfilter.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdecorationfilter.ftl
new file mode 100644
index 0000000..d502e68
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdecorationfilter.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<i>This Content should be wrapped with the standard layout.</i>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef.ftl
new file mode 100644
index 0000000..fd4eb07
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef.ftl
@@ -0,0 +1,29 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="templateDefinition" template="/freemarker/layout.ftl">
+  <@tiles.putAttribute name="title"  value="This is the title." />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+  <@tiles.putAttribute name="body"   value="/freemarker/body.ftl" />
+</@tiles.definition>
+<@tiles.insertDefinition name="templateDefinition" />
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef_extend.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef_extend.ftl
new file mode 100644
index 0000000..d00921c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef_extend.ftl
@@ -0,0 +1,30 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="test.definition.override.one" extends="freemarker.test.definition">
+  <@tiles.putAttribute name="body"   value="/freemarker/override.ftl" />
+</@tiles.definition>
+<@tiles.definition name="test.definition.override.two" extends="test.definition.override.one">
+  <@tiles.putAttribute name="title"   value="This is an overridden title" />
+</@tiles.definition>
+<@tiles.insertDefinition name="test.definition.override.two" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef_list_inherit.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef_list_inherit.ftl
new file mode 100644
index 0000000..fbb0c9d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef_list_inherit.ftl
@@ -0,0 +1,30 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="templateDefinition" extends="test.putAttributes">
+  <@tiles.putAttribute name="stringTest" value="This is a string" type="string"/>
+  <@tiles.putListAttribute name="list" inherit=true>
+    <@tiles.addAttribute value="valueFour" type="string" />
+  </@tiles.putListAttribute>
+</@tiles.definition>
+<@tiles.insertDefinition name="templateDefinition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef_preparer.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef_preparer.ftl
new file mode 100644
index 0000000..07321c0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testdef_preparer.ftl
@@ -0,0 +1,29 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="templateDefinition" template="/freemarker/layout.ftl" preparer="org.apache.tiles.test.preparer.TestViewPreparer">
+  <@tiles.putAttribute name="title"  value="This is the title." />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+  <@tiles.putAttribute name="body"   value="/freemarker/body.ftl" />
+</@tiles.definition>
+<@tiles.insertDefinition name="templateDefinition" />
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testimportattribute.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testimportattribute.ftl
new file mode 100644
index 0000000..ec93cb8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testimportattribute.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.putAttributes" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testimportattribute_all.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testimportattribute_all.ftl
new file mode 100644
index 0000000..bfa23ca
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testimportattribute_all.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.putAllAttributes" />
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testimportattribute_inherit.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testimportattribute_inherit.ftl
new file mode 100644
index 0000000..3b3cf9a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testimportattribute_inherit.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.putAttributes.inherit" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition.ftl
new file mode 100644
index 0000000..95a2ff4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_attribute_preparer.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_attribute_preparer.ftl
new file mode 100644
index 0000000..b155697
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_attribute_preparer.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.attribute.preparer" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_attribute_roles.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_attribute_roles.ftl
new file mode 100644
index 0000000..7472395
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_attribute_roles.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.roles" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_attribute_roles_tags.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_attribute_roles_tags.ftl
new file mode 100644
index 0000000..b845ad6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_attribute_roles_tags.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.roles.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded.ftl
new file mode 100644
index 0000000..78f0d91
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.cascaded.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded_list.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded_list.ftl
new file mode 100644
index 0000000..b9604d8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded_list.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.cascaded.list.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded_overridden.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded_overridden.ftl
new file mode 100644
index 0000000..43a921e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded_overridden.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.overridden.cascaded.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded_template.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded_template.ftl
new file mode 100644
index 0000000..13af940
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_cascaded_template.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.cascaded.template.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_classpath.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_classpath.ftl
new file mode 100644
index 0000000..06deeb1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_classpath.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.classpath.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite.ftl
new file mode 100644
index 0000000..6b0a361
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.composite.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags.ftl
new file mode 100644
index 0000000..a560fe3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="test.inner.definition.tags" template="/freemarker/layout.ftl">
+    <@tiles.putAttribute name="title"  value="This is an inner definition with tags."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putAttribute name="body"   value="/freemarker/body.ftl"/>
+</@tiles.definition>
+<@tiles.definition name="test.composite.definition.tags" template="/freemarker/layout.ftl">
+    <@tiles.putAttribute name="title"  value="This is a composite definition with tags."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putAttribute name="body"   value="test.inner.definition.tags" type="definition"/>
+</@tiles.definition>
+<@tiles.insertDefinition name="test.composite.definition.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags_includes_configured.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags_includes_configured.ftl
new file mode 100644
index 0000000..b03555f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags_includes_configured.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="test.inner.definition.tags" template="/freemarker/layout.ftl">
+    <@tiles.putAttribute name="title"  value="This is an inner definition with tags."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putAttribute name="body"   value="/freemarker/body.ftl"/>
+</@tiles.definition>
+<@tiles.definition name="test.composite.definition.tags" template="/freemarker/layout.ftl">
+    <@tiles.putAttribute name="title"  value="This is a composite definition with tags."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putAttribute name="body"   value="test.inner.definition" type="definition"/>
+</@tiles.definition>
+<@tiles.insertDefinition name="test.composite.definition.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags_includes_configured_notype.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags_includes_configured_notype.ftl
new file mode 100644
index 0000000..b88ac83
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags_includes_configured_notype.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="test.inner.definition.tags" template="/freemarker/layout.ftl">
+    <@tiles.putAttribute name="title"  value="This is an inner definition with tags."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putAttribute name="body"   value="/freemarker/body.ftl"/>
+</@tiles.definition>
+<@tiles.definition name="test.composite.definition.tags" template="/freemarker/layout.ftl">
+    <@tiles.putAttribute name="title"  value="This is a composite definition with tags."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putAttribute name="body"   value="test.inner.definition"/>
+</@tiles.definition>
+<@tiles.insertDefinition name="test.composite.definition.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags_notype.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags_notype.ftl
new file mode 100644
index 0000000..ad2da7d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_composite_tags_notype.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="test.inner.definition.tags" template="/freemarker/layout.ftl">
+    <@tiles.putAttribute name="title"  value="This is an inner definition with tags."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putAttribute name="body"   value="/freemarker/body.ftl"/>
+</@tiles.definition>
+<@tiles.definition name="test.composite.definition.tags" template="/freemarker/layout.ftl">
+    <@tiles.putAttribute name="title"  value="This is a composite definition with tags."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putAttribute name="body"   value="test.inner.definition.tags"/>
+</@tiles.definition>
+<@tiles.insertDefinition name="test.composite.definition.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_db.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_db.ftl
new file mode 100644
index 0000000..3ad4015
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_db.ftl
@@ -0,0 +1,25 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.setCurrentContainer containerKey="db"/>
+<@tiles.insertDefinition name="test.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_defaultvalues.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_defaultvalues.ftl
new file mode 100644
index 0000000..b8a4672
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_defaultvalues.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.defaultvalues.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_el.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_el.ftl
new file mode 100644
index 0000000..2763ce6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_el.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.composite.el.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_el_singleeval.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_el_singleeval.ftl
new file mode 100644
index 0000000..a5c7d6a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_el_singleeval.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.composite.el.doNotShow.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_exception.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_exception.ftl
new file mode 100644
index 0000000..9b4cfe9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_exception.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.exception" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_extended_db.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_extended_db.ftl
new file mode 100644
index 0000000..c564614
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_extended_db.ftl
@@ -0,0 +1,25 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.setCurrentContainer containerKey="db"/>
+<@tiles.insertDefinition name="test.definition.extended" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_flush.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_flush.ftl
new file mode 100644
index 0000000..59268b3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_flush.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.flush" flush=true/>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_freemarker.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_freemarker.ftl
new file mode 100644
index 0000000..d7c2d85
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_freemarker.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.freemarker" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_ignore.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_ignore.ftl
new file mode 100644
index 0000000..071c88a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_ignore.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.ignore" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_inline.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_inline.ftl
new file mode 100644
index 0000000..b4f0e72
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_inline.ftl
@@ -0,0 +1,28 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition">
+  <@tiles.putAttribute name="body">
+  <div align="center"><b><i>This is an inline content</i></b></div>
+  </@tiles.putAttribute>
+</@tiles.insertDefinition>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_mvel.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_mvel.ftl
new file mode 100644
index 0000000..2620e79
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_mvel.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.composite.mvel.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_ognl.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_ognl.ftl
new file mode 100644
index 0000000..cac46e3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_ognl.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.composite.ognl.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_old.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_old.ftl
new file mode 100644
index 0000000..bbe599e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_old.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.old_format" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_openbody.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_openbody.ftl
new file mode 100644
index 0000000..1b9b8dc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_openbody.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.openbody.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_override.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_override.ftl
new file mode 100644
index 0000000..08b8f05
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_override.ftl
@@ -0,0 +1,26 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition">
+  <@tiles.putAttribute name="body"   value="/freemarker/override.ftl" />
+</@tiles.insertDefinition>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_override_and_not.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_override_and_not.ftl
new file mode 100644
index 0000000..14fa71b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_override_and_not.ftl
@@ -0,0 +1,30 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+Overridden content:<br/>
+<@tiles.insertDefinition name="freemarker.test.definition">
+  <@tiles.putAttribute name="body"   value="/freemarker/override.ftl" />
+</@tiles.insertDefinition>
+<br/>
+Not overridden content:<br/>
+<@tiles.insertDefinition name="freemarker.test.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_override_template.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_override_template.ftl
new file mode 100644
index 0000000..c4dddd8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_override_template.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition" template="/freemarker/layout_override.ftl" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_preparer.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_preparer.ftl
new file mode 100644
index 0000000..1958fb7
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_preparer.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.preparer.definition" preparer="org.apache.tiles.test.preparer.TestViewPreparer" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_preparer_configured.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_preparer_configured.ftl
new file mode 100644
index 0000000..afe6766
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_preparer_configured.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.preparer.definition.configured"/>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_regexp.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_regexp.ftl
new file mode 100644
index 0000000..622a0df
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_regexp.ftl
@@ -0,0 +1,26 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.setCurrentContainer containerKey="alternate" />
+<@tiles.insertDefinition name="freemarker.test.regexp.definitionOne.messageHello" />
+<@tiles.insertDefinition name="freemarker.test.regexp.definitionTwo.messageBye" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_reversed.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_reversed.ftl
new file mode 100644
index 0000000..7f3cd54
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_reversed.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.reversed.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_role.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_role.ftl
new file mode 100644
index 0000000..530a4cc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_role.ftl
@@ -0,0 +1,25 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.appears.configured" />
+<@tiles.insertDefinition name="freemarker.test.definition.does_not_appear.configured" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_role_tag.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_role_tag.ftl
new file mode 100644
index 0000000..9f2feee
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_role_tag.ftl
@@ -0,0 +1,25 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.definition.appears" role="goodrole" />
+<@tiles.insertDefinition name="freemarker.test.definition.does_not_appear" role="badrole" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_wildcard.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_wildcard.ftl
new file mode 100644
index 0000000..4ab8a5c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertdefinition_wildcard.ftl
@@ -0,0 +1,26 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.setCurrentContainer containerKey="alternate" />
+<@tiles.insertDefinition name="freemarker.test.definitionOne.messageHello" />
+<@tiles.insertDefinition name="freemarker.test.definitionTwo.messageBye" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnesteddefinition.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnesteddefinition.ftl
new file mode 100644
index 0000000..60d6839
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnesteddefinition.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.nesting.definitions" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnesteddefinition_tags.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnesteddefinition_tags.ftl
new file mode 100644
index 0000000..59b1e13
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnesteddefinition_tags.ftl
@@ -0,0 +1,35 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="test.nesting.definitions.tags" template="/freemarker/layout.ftl">
+    <@tiles.putAttribute name="title"  value="This is the title."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putAttribute name="body">
+        <@tiles.definition template="/freemarker/layout.ftl">
+            <@tiles.putAttribute name="title"  value="This is a nested definition."/>
+            <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+            <@tiles.putAttribute name="body"   value="/freemarker/body.ftl"/>
+        </@tiles.definition>
+    </@tiles.putAttribute>
+</@tiles.definition>
+<@tiles.insertDefinition name="test.nesting.definitions.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnestedlistdefinition.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnestedlistdefinition.ftl
new file mode 100644
index 0000000..0e80379
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnestedlistdefinition.ftl
@@ -0,0 +1,24 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.nesting.list.definitions" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnestedlistdefinition_tags.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnestedlistdefinition_tags.ftl
new file mode 100644
index 0000000..aa47d12
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testinsertnestedlistdefinition_tags.ftl
@@ -0,0 +1,37 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.definition name="test.nesting.definitions.tags" template="/freemarker/layout_list.ftl">
+    <@tiles.putAttribute name="title"  value="This is the title."/>
+    <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+    <@tiles.putListAttribute name="list">
+        <@tiles.addAttribute>
+	        <@tiles.definition template="/freemarker/layout.ftl">
+	            <@tiles.putAttribute name="title"  value="This is a nested definition."/>
+	            <@tiles.putAttribute name="header" value="/freemarker/header.ftl"/>
+	            <@tiles.putAttribute name="body"   value="/freemarker/body.ftl"/>
+	        </@tiles.definition>
+        </@tiles.addAttribute>
+    </@tiles.putListAttribute>
+</@tiles.definition>
+<@tiles.insertDefinition name="test.nesting.definitions.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput.ftl
new file mode 100644
index 0000000..5219ca8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput.ftl
@@ -0,0 +1,28 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertTemplate template="/freemarker/layout.ftl">
+  <@tiles.putAttribute name="title"  value="This is the title." />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+  <@tiles.putAttribute name="body"   value="/freemarker/body.ftl" />
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_cascaded.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_cascaded.ftl
new file mode 100644
index 0000000..0d97ee6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_cascaded.ftl
@@ -0,0 +1,28 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertTemplate template="/freemarker/layout.ftl">
+  <@tiles.putAttribute name="title"  value="This is the title." cascade=true />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" cascade=true />
+  <@tiles.putAttribute name="body"   value="test.inner.cascadable.definition" />
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_cascaded_overridden.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_cascaded_overridden.ftl
new file mode 100644
index 0000000..172d392
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_cascaded_overridden.ftl
@@ -0,0 +1,28 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertTemplate template="/freemarker/layout.ftl">
+  <@tiles.putAttribute name="title"  value="This is the title." cascade=true />
+  <@tiles.putAttribute name="header" value="/freemarker/alternate-header.ftl" cascade=true />
+  <@tiles.putAttribute name="body"   value="test.inner.definition" />
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_cascaded_template.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_cascaded_template.ftl
new file mode 100644
index 0000000..4649333
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_cascaded_template.ftl
@@ -0,0 +1,28 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertTemplate template="/freemarker/layout.ftl">
+  <@tiles.putAttribute name="title"  value="This is the title." cascade=true />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" cascade=true />
+  <@tiles.putAttribute name="body"   value="/freemarker/layout_nobody.ftl" />
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_el.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_el.ftl
new file mode 100644
index 0000000..c8b7bb0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_el.ftl
@@ -0,0 +1,30 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<#assign bodyContent="Body Content defined by and el" />
+
+<@tiles.insertTemplate template="/freemarker/layout.ftl">
+  <@tiles.putAttribute name="title"  value="This is the title." />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+  <@tiles.putAttribute name="body"   value=bodyContent />
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_el_singleeval.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_el_singleeval.ftl
new file mode 100644
index 0000000..9992db3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_el_singleeval.ftl
@@ -0,0 +1,31 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<#assign doNotShowBody="$" + "{" + "requestScope.doNotShow}" />
+<#assign doNotShow="DO NOT SHOW!!!" />
+
+<@tiles.insertTemplate template="/freemarker/layout.ftl">
+  <@tiles.putAttribute name="title"  value="This is the title." />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+  <@tiles.putAttribute name="body"   value=doNotShowBody />
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_flush.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_flush.ftl
new file mode 100644
index 0000000..180156c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_flush.ftl
@@ -0,0 +1,28 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertTemplate template="/freemarker/layout.ftl" flush=true>
+  <@tiles.putAttribute name="title"  value="This is the title." />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+  <@tiles.putAttribute name="body"   value="/freemarker/body.ftl" />
+</@tiles.insertTemplate>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_reversed.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_reversed.ftl
new file mode 100644
index 0000000..c2c6f36
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_reversed.ftl
@@ -0,0 +1,28 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertTemplate template="/freemarker/layout_alt_title.ftl">
+  <@tiles.putAttribute name="title"  value="This is the title." type="reversed" />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+  <@tiles.putAttribute name="body"   value="/freemarker/body.ftl" />
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_servlet.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_servlet.ftl
new file mode 100644
index 0000000..2bb373d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testput_servlet.ftl
@@ -0,0 +1,28 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertTemplate template="/servlets/layoutServlet">
+  <@tiles.putAttribute name="title"  value="This is the title." />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+  <@tiles.putAttribute name="body"   value="/freemarker/body.ftl" />
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testputlist.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testputlist.ftl
new file mode 100644
index 0000000..737bcc8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testputlist.ftl
@@ -0,0 +1,31 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertTemplate template="/freemarker/putattributeslayout.ftl">
+  <@tiles.putAttribute name="stringTest" value="This is a string" type="string" />
+  <@tiles.putListAttribute name="list">
+    <@tiles.addAttribute value="valueOne" type="string" />
+    <@tiles.addAttribute value="valueTwo" type="string" />
+    <@tiles.addAttribute value="valueThree" type="string" />
+  </@tiles.putListAttribute>
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testputlist_cascaded.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testputlist_cascaded.ftl
new file mode 100644
index 0000000..8bf974f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testputlist_cascaded.ftl
@@ -0,0 +1,34 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertTemplate template="/freemarker/layout.ftl">
+  <@tiles.putAttribute name="title"  value="This is the title." />
+  <@tiles.putAttribute name="header" value="/freemarker/header.ftl" />
+  <@tiles.putAttribute name="body"   value="/freemarker/putattributeslayout.ftl" />
+  <@tiles.putAttribute name="stringTest" value="This is a string" type="string" cascade=true />
+  <@tiles.putListAttribute name="list" cascade=true>
+    <@tiles.addAttribute value="valueOne" type="string" />
+    <@tiles.addAttribute value="valueTwo" type="string" />
+    <@tiles.addAttribute value="valueThree" type="string" />
+  </@tiles.putListAttribute>
+</@tiles.insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testputlist_inherit.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testputlist_inherit.ftl
new file mode 100644
index 0000000..fec8e78
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testputlist_inherit.ftl
@@ -0,0 +1,28 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.insertDefinition name="freemarker.test.putAttributes">
+  <@tiles.putListAttribute name="list" inherit=true>
+    <@tiles.addAttribute value="valueFour" type="string" />
+  </@tiles.putListAttribute>
+</@tiles.insertDefinition>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testsetcurrentcontainer.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testsetcurrentcontainer.ftl
new file mode 100644
index 0000000..eb00701
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/freemarker/testsetcurrentcontainer.ftl
@@ -0,0 +1,27 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<@tiles.setCurrentContainer containerKey="alternate" />
+<@tiles.insertDefinition name="freemarker.test.definition" />
+<@tiles.setCurrentContainer />
+<@tiles.insertDefinition name="freemarker.test.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/header.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/header.jsp
new file mode 100644
index 0000000..78dd414
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/header.jsp
@@ -0,0 +1,26 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<strong>This is the header</strong>
+    
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/index.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/index.jsp
new file mode 100644
index 0000000..7621660
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/index.jsp
@@ -0,0 +1,295 @@
+<%@ page session="false" %>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<html>
+<head>
+    <title>Tiles 2 Test Application</title>
+</head>
+
+<body>
+    <h1>Tiles 2 Test Application</h1>
+
+    <h1>JSP-based tests</h1>
+
+    <h2>Features in Tiles 2.0.x</h2>
+
+    <h3>Standard Render/Attribute Tests</h3>
+    <a href="testinsertdefinition.jsp">Test Insert Configured Definition</a><br/>
+    <a href="testinsertdefinition_ignore.jsp">Test Insert Configured Definition with Ignore</a><br/>
+    <a href="testinsertdefinition_flush.jsp">Test Insert Configured Definition with Flush</a><br/>
+    <a href="testinsertdefinition_preparer.jsp">Test Insert Configured Definition with Preparer</a><br/>
+    <a href="testinsertdefinition_preparer_configured.jsp">Test Insert Configured Definition with Preparer configured in the definition itself</a><br/>
+    <a href="testinsertdefinition_classpath.jsp">Test Insert Configured Classpath Definition</a><br/>
+    <a href="testinsertdefinition_override.jsp">Test Insert Configured Definition with an overridden content</a><br/>
+    <a href="testinsertdefinition_override_and_not.jsp">Test Insert Configured Definition with an overridden content and one with original content</a><br/>
+    <a href="testinsertdefinition_inline.jsp">Test Insert Configured Definition with an inline content</a><br/>
+    <a href="testinsertdefinition_composite.jsp">Test Insert Configured Definition that contains another definition inside</a><br/>
+    <a href="testinsertdefinition_exception.jsp">Test Insert Configured Definition with an exception in an attribute page</a><br/>
+    <a href="testinsertdefinition_freemarker.jsp">Test Insert Configured Definition with FreeMarker</a><br/>
+    <a href="testinsertdefinition_openbody.jsp">Test Insert Configured Definition with Open Body</a><br/>
+    <a href="testput.jsp">Test Put Tag</a><br/>
+    <a href="testput_flush.jsp">Test Put Tag with Flush</a><br/>
+    <a href="testput_el.jsp">Test Put Tag using EL</a><br/>
+    <a href="testput_servlet.jsp">Test Put Tag using a servlet mapping as a template</a><br/>
+    <a href="testputlist.jsp">Test Put List Tag</a><br/>
+    <a href="testimportattribute.jsp">Test importAttribute Tag</a><br/>
+    <a href="testimportattribute_all.jsp">Test importAttribute Tag with no name</a><br/>
+    <a href="testdecorationfilter.jsp">Test Tiles Definition Filter</a><br/>
+    <a href="testdispatchservlet.tiles">Test Tiles Dispatch Servlet</a><br/>
+    <a href="selectlocale.jsp">Test Localization</a><br/>
+
+    <h3>Mutable Container Tests</h3>
+    <a href="testdef.jsp">Test Definition Tag</a><br/>
+    <a href="testdef_extend.jsp">Test Definition Tag extending configured and custom definitions</a><br/>
+    <a href="testdef_preparer.jsp">Test Definition Tag with Preparer</a><br/>
+    <a href="testinsertdefinition_composite_tags_includes_configured.jsp">Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags</a><br/>
+    <a href="testinsertdefinition_composite_tags.jsp">Test Insert Definition that contains another definition inside using JSP tags</a><br/>
+    <a href="testinsertdefinition_composite_tags_includes_configured_notype.jsp">Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags without types</a><br/>
+    <a href="testinsertdefinition_composite_tags_notype.jsp">Test Insert Definition that contains another definition inside using JSP tags without types</a><br/></body>
+
+    <h3>Roles Verification tests</h3>
+    <a href="testinsertdefinition_role.jsp">Test Insert Configured Definition with Specified Role</a><br/>
+    <a href="testinsertdefinition_role_tag.jsp">Test Insert Configured Definition with Specified Role in Tag</a><br/>
+    <a href="testinsertdefinition_attribute_roles.jsp">Test Insert Configured Definition with Attribute that have Roles</a><br/>
+    <a href="testinsertdefinition_attribute_roles_tags.jsp">Test Insert Configured Definition with Attribute that have Roles in Tags</a><br/>
+
+    <h2>Features in Tiles 2.1.x</h2>
+
+    <h3>Standard Render/Attribute Tests</h3>
+    <a href="testinsertdefinition_override_template.jsp">Test Insert Configured Definition with an overridden template</a><br/>
+    <a href="testinsertdefinition_old.jsp">Test Insert Configured Definition in Old Format</a><br/>
+    <a href="testinsertdefinition_cascaded.jsp">Test Insert Configured Cascaded Definition</a><br/>
+    <a href="testinsertdefinition_cascaded_overridden.jsp">Test Insert Configured Cascaded Definition with Override</a><br/>
+    <a href="testinsertdefinition_cascaded_template.jsp">Test Insert Configured Cascaded Definition with Template</a><br/>
+    <a href="testinsertdefinition_cascaded_list.jsp">Test Insert Configured Cascaded Definition with List</a><br/>
+    <a href="testinsertdefinition_reversed.jsp">Test Insert Configured Definition with Reversed Attribute</a><br/>
+    <a href="testinsertdefinition_attribute_preparer.jsp">Test Insert Configured Definition with Attribute Preparer</a><br/>
+    <a href="testinsertnesteddefinition.jsp">Test Insert Nested Definition</a><br/>
+    <a href="testinsertnesteddefinition_tags.jsp">Test Insert Nested Definition only using JSP tags</a><br/>
+    <a href="testinsertnestedlistdefinition.jsp">Test Insert Nested List Definition</a><br/>
+    <a href="testinsertnestedlistdefinition_tags.jsp">Test Insert Nested List Definition only using JSP tags</a><br/>
+    <a href="testinsertdefinition_el.jsp">Test Insert Configured Definition with EL</a><br/>
+    <a href="testinsertdefinition_el_singleeval.jsp">Test Insert Configured Definition with EL to test Single Evaluation</a><br/>
+    <a href="testinsertdefinition_wildcard.jsp">Test Insert Configured Definition with Wildcards</a><br/>
+    <a href="testinsertdefinition_defaultvalues.jsp">Test Insert Configured Definition with Default Values</a><br/>
+    <a href="testput_cascaded.jsp">Test Put Tag with Cascaded Attributes</a><br/>
+    <a href="testput_cascaded_overridden.jsp">Test Put Tag with Overridden Cascaded Attributes</a><br/>
+    <a href="testput_cascaded_template.jsp">Test Put Tag with Cascaded Attributes and Template</a><br/>
+    <a href="testput_el_singleeval.jsp">Test Put Tag using EL to test Single Evaluation</a><br/>
+    <a href="testput_reversed.jsp">Test Put Tag with Reversed Attribute</a><br/>
+    <a href="testputlist_cascaded.jsp">Test Put List Cascaded Tag</a><br/>
+    <a href="testputlist_inherit.jsp">Test Put List Tag with Inherit</a><br/>
+    <a href="testimportattribute_inherit.jsp">Test importAttribute Tag with List Inherit</a><br/>
+    <a href="testsetcurrentcontainer.jsp">Test setCurrentContainer Tag</a><br/>
+
+    <h3>Mutable Container Tests</h3>
+    <a href="testdef_list_inherit.jsp">Test Definition Tag with a List Inherit</a><br/>
+
+    <h3>Database Verification tests</h3>
+    <a href="testinsertdefinition_db.jsp">Test Insert Configured Definition from DB</a><br/>
+    <a href="testinsertdefinition_extended_db.jsp">Test Insert Extended Configured Definition from DB</a><br/>
+    <a href="selectlocale_db.jsp">Test Localization from DB</a><br/>
+
+    <h2>Features in Tiles 2.2.x</h2>
+
+    <h3>Standard Render/Attribute Tests</h3>
+    <a href="testinsertdefinition_mvel.jsp">Test Insert Configured Definition with MVEL</a><br/>
+    <a href="testinsertdefinition_ognl.jsp">Test Insert Configured Definition with OGNL</a><br/>
+    <a href="testinsertdefinition_regexp.jsp">Test Insert Configured Definition with Regular Expression</a><br/>
+
+	<h1>FreeMarker-based tests</h1>
+
+    <h2>Features in Tiles 2.0.x</h2>
+
+    <h3>Standard Render/Attribute Tests</h3>
+    <a href="freemarker/testinsertdefinition.ftl">FreeMarker: Test Insert Configured Definition</a><br/>
+    <a href="freemarker/testinsertdefinition_ignore.ftl">FreeMarker: Test Insert Configured Definition with Ignore</a><br/>
+    <a href="freemarker/testinsertdefinition_flush.ftl">FreeMarker: Test Insert Configured Definition with Flush</a><br/>
+    <a href="freemarker/testinsertdefinition_preparer.ftl">FreeMarker: Test Insert Configured Definition with Preparer</a><br/>
+    <a href="freemarker/testinsertdefinition_preparer_configured.ftl">FreeMarker: Test Insert Configured Definition with Preparer configured in the definition itself</a><br/>
+    <a href="freemarker/testinsertdefinition_classpath.ftl">FreeMarker: Test Insert Configured Classpath Definition</a><br/>
+    <a href="freemarker/testinsertdefinition_override.ftl">FreeMarker: Test Insert Configured Definition with an overridden content</a><br/>
+    <a href="freemarker/testinsertdefinition_override_and_not.ftl">FreeMarker: Test Insert Configured Definition with an overridden content and one with original content</a><br/>
+    <a href="freemarker/testinsertdefinition_inline.ftl">FreeMarker: Test Insert Configured Definition with an inline content</a><br/>
+    <a href="freemarker/testinsertdefinition_composite.ftl">FreeMarker: Test Insert Configured Definition that contains another definition inside</a><br/>
+    <a href="freemarker/testinsertdefinition_exception.ftl">FreeMarker: Test Insert Configured Definition with an exception in an attribute page</a><br/>
+    <a href="freemarker/testinsertdefinition_openbody.ftl">FreeMarker: Test Insert Configured Definition with Open Body</a><br/>
+    <a href="freemarker/testput.ftl">FreeMarker: Test Put Tag</a><br/>
+    <a href="freemarker/testput_flush.ftl">FreeMarker: Test Put Tag with Flush</a><br/>
+    <a href="freemarker/testput_el.ftl">FreeMarker: Test Put Tag using EL</a><br/>
+    <a href="freemarker/testput_servlet.ftl">FreeMarker: Test Put Tag using a servlet mapping as a template</a><br/>
+    <a href="freemarker/testputlist.ftl">FreeMarker: Test Put List Tag</a><br/>
+    <a href="freemarker/testimportattribute.ftl">FreeMarker: Test importAttribute Tag</a><br/>
+    <a href="freemarker/testimportattribute_all.ftl">FreeMarker: Test importAttribute Tag with no name</a><br/>
+    <a href="freemarker/testdecorationfilter.ftl">FreeMarker: Test Tiles Definition Filter</a><br/>
+    <a href="freemarker.testdispatchservlet.tiles">FreeMarker: Test Tiles Dispatch Servlet</a><br/>
+    <a href="freemarker/selectlocale.ftl">FreeMarker: Test Localization</a><br/>
+
+    <h3>Mutable Container Tests</h3>
+    <a href="freemarker/testdef.ftl">FreeMarker: Test Definition Tag</a><br/>
+    <a href="freemarker/testdef_extend.ftl">FreeMarker: Test Definition Tag extending configured and custom definitions</a><br/>
+    <a href="freemarker/testdef_preparer.ftl">FreeMarker: Test Definition Tag with Preparer</a><br/>
+    <a href="freemarker/testinsertdefinition_composite_tags_includes_configured.ftl">FreeMarker: Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags</a><br/>
+    <a href="freemarker/testinsertdefinition_composite_tags.ftl">FreeMarker: Test Insert Definition that contains another definition inside using JSP tags</a><br/>
+    <a href="freemarker/testinsertdefinition_composite_tags_includes_configured_notype.ftl">FreeMarker: Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags without types</a><br/>
+    <a href="freemarker/testinsertdefinition_composite_tags_notype.ftl">FreeMarker: Test Insert Definition that contains another definition inside using JSP tags without types</a><br/>
+
+    <h3>Roles Verification tests</h3>
+    <a href="freemarker/testinsertdefinition_role.ftl">FreeMarker: Test Insert Configured Definition with Specified Role</a><br/>
+    <a href="freemarker/testinsertdefinition_role_tag.ftl">FreeMarker: Test Insert Configured Definition with Specified Role in Tag</a><br/>
+    <a href="freemarker/testinsertdefinition_attribute_roles.ftl">FreeMarker: Test Insert Configured Definition with Attribute that have Roles</a><br/>
+    <a href="freemarker/testinsertdefinition_attribute_roles_tags.ftl">FreeMarker: Test Insert Configured Definition with Attribute that have Roles in Tags</a><br/>
+
+    <h2>Features in Tiles 2.1.x</h2>
+
+    <h3>Standard Render/Attribute Tests</h3>
+    <a href="freemarker/testinsertdefinition_override_template.ftl">FreeMarker: Test Insert Configured Definition with an overridden template</a><br/>
+    <a href="freemarker/testinsertdefinition_old.ftl">FreeMarker: Test Insert Configured Definition in Old Format</a><br/>
+    <a href="freemarker/testinsertdefinition_cascaded.ftl">FreeMarker: Test Insert Configured Cascaded Definition</a><br/>
+    <a href="freemarker/testinsertdefinition_cascaded_overridden.ftl">FreeMarker: Test Insert Configured Cascaded Definition with Override</a><br/>
+    <a href="freemarker/testinsertdefinition_cascaded_template.ftl">FreeMarker: Test Insert Configured Cascaded Definition with Template</a><br/>
+    <a href="freemarker/testinsertdefinition_cascaded_list.ftl">FreeMarker: Test Insert Configured Cascaded Definition with List</a><br/>
+    <a href="freemarker/testinsertdefinition_reversed.ftl">FreeMarker: Test Insert Configured Definition with Reversed Attribute</a><br/>
+    <a href="freemarker/testinsertdefinition_attribute_preparer.ftl">FreeMarker: Test Insert Configured Definition with Attribute Preparer</a><br/>
+    <a href="freemarker/testinsertnesteddefinition.ftl">FreeMarker: Test Insert Nested Definition</a><br/>
+    <a href="freemarker/testinsertnesteddefinition_tags.ftl">FreeMarker: Test Insert Nested Definition only using JSP tags</a><br/>
+    <a href="freemarker/testinsertnestedlistdefinition.ftl">FreeMarker: Test Insert Nested List Definition</a><br/>
+    <a href="freemarker/testinsertnestedlistdefinition_tags.ftl">FreeMarker: Test Insert Nested List Definition only using JSP tags</a><br/>
+    <a href="freemarker/testinsertdefinition_el.ftl">FreeMarker: Test Insert Configured Definition with EL</a><br/>
+    <a href="freemarker/testinsertdefinition_el_singleeval.ftl">FreeMarker: Test Insert Configured Definition with EL to test Single Evaluation</a><br/>
+    <a href="freemarker/testinsertdefinition_wildcard.ftl">FreeMarker: Test Insert Configured Definition with Wildcards</a><br/>
+    <a href="freemarker/testinsertdefinition_defaultvalues.ftl">FreeMarker: Test Insert Configured Definition with Default Values</a><br/>
+    <a href="freemarker/testput_cascaded.ftl">FreeMarker: Test Put Tag with Cascaded Attributes</a><br/>
+    <a href="freemarker/testput_cascaded_overridden.ftl">FreeMarker: Test Put Tag with Overridden Cascaded Attributes</a><br/>
+    <a href="freemarker/testput_cascaded_template.ftl">FreeMarker: Test Put Tag with Cascaded Attributes and Template</a><br/>
+    <a href="freemarker/testput_el_singleeval.ftl">FreeMarker: Test Put Tag using EL to test Single Evaluation</a><br/>
+    <a href="freemarker/testput_reversed.ftl">FreeMarker: Test Put Tag with Reversed Attribute</a><br/>
+    <a href="freemarker/testputlist_cascaded.ftl">FreeMarker: Test Put List Cascaded Tag</a><br/>
+    <a href="freemarker/testputlist_inherit.ftl">FreeMarker: Test Put List Tag with Inherit</a><br/>
+    <a href="freemarker/testimportattribute_inherit.ftl">FreeMarker: Test importAttribute Tag with List Inherit</a><br/>
+    <a href="freemarker/testsetcurrentcontainer.ftl">FreeMarker: Test setCurrentContainer Tag</a><br/>
+
+    <h3>Mutable Container Tests</h3>
+    <a href="freemarker/testdef_list_inherit.ftl">FreeMarker: Test Definition Tag with a List Inherit</a><br/>
+
+    <h3>Database Verification tests</h3>
+    <a href="freemarker/testinsertdefinition_db.ftl">FreeMarker: Test Insert Configured Definition from DB</a><br/>
+    <a href="freemarker/testinsertdefinition_extended_db.ftl">FreeMarker: Test Insert Extended Configured Definition from DB</a><br/>
+
+    <h2>Features in Tiles 2.2.x</h2>
+
+    <h3>Standard Render/Attribute Tests</h3>
+    <a href="freemarker/testinsertdefinition_mvel.ftl">FreeMarker: Test Insert Configured Definition with MVEL</a><br/>
+    <a href="freemarker/testinsertdefinition_ognl.ftl">FreeMarker: Test Insert Configured Definition with OGNL</a><br/>
+    <a href="freemarker/testinsertdefinition_regexp.ftl">FreeMarker: Test Insert Configured Definition with Regular Expression</a><br/>
+    <a href="org/apache/tiles/test/alt/freemarker/testinsertdefinition_alt.ftl">FreeMarker: Test Insert Configured Definition in Module</a><br/>
+
+    <h1>Velocity-based tests</h1>
+
+    <h2>Features in Tiles 2.0.x</h2>
+
+    <h3>Standard Render/Attribute Tests</h3>
+    <a href="velocity/testinsertdefinition.vm">Velocity: Test Insert Configured Definition</a><br/>
+    <a href="velocity/testinsertdefinition_ignore.vm">Velocity: Test Insert Configured Definition with Ignore</a><br/>
+    <a href="velocity/testinsertdefinition_flush.vm">Velocity: Test Insert Configured Definition with Flush</a><br/>
+    <a href="velocity/testinsertdefinition_preparer.vm">Velocity: Test Insert Configured Definition with Preparer</a><br/>
+    <a href="velocity/testinsertdefinition_preparer_configured.vm">Velocity: Test Insert Configured Definition with Preparer configured in the definition itself</a><br/>
+    <a href="velocity/testinsertdefinition_classpath.vm">Velocity: Test Insert Configured Classpath Definition</a><br/>
+    <a href="velocity/testinsertdefinition_override.vm">Velocity: Test Insert Configured Definition with an overridden content</a><br/>
+    <a href="velocity/testinsertdefinition_override_and_not.vm">Velocity: Test Insert Configured Definition with an overridden content and one with original content</a><br/>
+    <a href="velocity/testinsertdefinition_inline.vm">Velocity: Test Insert Configured Definition with an inline content</a><br/>
+    <a href="velocity/testinsertdefinition_composite.vm">Velocity: Test Insert Configured Definition that contains another definition inside</a><br/>
+    <a href="velocity/testinsertdefinition_exception.vm">Velocity: Test Insert Configured Definition with an exception in an attribute page</a><br/>
+    <a href="velocity/testinsertdefinition_openbody.vm">Velocity: Test Insert Configured Definition with Open Body</a><br/>
+    <a href="velocity/testput.vm">Velocity: Test Put Tag</a><br/>
+    <a href="velocity/testput_flush.vm">Velocity: Test Put Tag with Flush</a><br/>
+    <a href="velocity/testput_el.vm">Velocity: Test Put Tag using EL</a><br/>
+    <a href="velocity/testput_servlet.vm">Velocity: Test Put Tag using a servlet mapping as a template</a><br/>
+    <a href="velocity/testputlist.vm">Velocity: Test Put List Tag</a><br/>
+    <a href="velocity/testimportattribute.vm">Velocity: Test importAttribute Tag</a><br/>
+    <a href="velocity/testimportattribute_all.vm">Velocity: Test importAttribute Tag with no name</a><br/>
+    <a href="velocity/testdecorationfilter.vm">Velocity: Test Tiles Definition Filter</a><br/>
+    <a href="velocity.testdispatchservlet.tiles">Velocity: Test Tiles Dispatch Servlet</a><br/>
+    <a href="velocity/selectlocale.vm">Velocity: Test Localization</a><br/>
+
+    <h3>Mutable Container Tests</h3>
+    <a href="velocity/testdef.vm">Velocity: Test Definition Tag</a><br/>
+    <a href="velocity/testdef_extend.vm">Velocity: Test Definition Tag extending configured and custom definitions</a><br/>
+    <a href="velocity/testdef_preparer.vm">Velocity: Test Definition Tag with Preparer</a><br/>
+    <a href="velocity/testinsertdefinition_composite_tags_includes_configured.vm">Velocity: Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags</a><br/>
+    <a href="velocity/testinsertdefinition_composite_tags.vm">Velocity: Test Insert Definition that contains another definition inside using JSP tags</a><br/>
+    <a href="velocity/testinsertdefinition_composite_tags_includes_configured_notype.vm">Velocity: Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags without types</a><br/>
+    <a href="velocity/testinsertdefinition_composite_tags_notype.vm">Velocity: Test Insert Definition that contains another definition inside using JSP tags without types</a><br/>
+
+    <h3>Roles Verification tests</h3>
+    <a href="velocity/testinsertdefinition_role.vm">Velocity: Test Insert Configured Definition with Specified Role</a><br/>
+    <a href="velocity/testinsertdefinition_role_tag.vm">Velocity: Test Insert Configured Definition with Specified Role in Tag</a><br/>
+    <a href="velocity/testinsertdefinition_attribute_roles.vm">Velocity: Test Insert Configured Definition with Attribute that have Roles</a><br/>
+    <a href="velocity/testinsertdefinition_attribute_roles_tags.vm">Velocity: Test Insert Configured Definition with Attribute that have Roles in Tags</a><br/>
+
+    <h2>Features in Tiles 2.1.x</h2>
+
+    <h3>Standard Render/Attribute Tests</h3>
+    <a href="velocity/testinsertdefinition_override_template.vm">Velocity: Test Insert Configured Definition with an overridden template</a><br/>
+    <a href="velocity/testinsertdefinition_old.vm">Velocity: Test Insert Configured Definition in Old Format</a><br/>
+    <a href="velocity/testinsertdefinition_cascaded.vm">Velocity: Test Insert Configured Cascaded Definition</a><br/>
+    <a href="velocity/testinsertdefinition_cascaded_overridden.vm">Velocity: Test Insert Configured Cascaded Definition with Override</a><br/>
+    <a href="velocity/testinsertdefinition_cascaded_template.vm">Velocity: Test Insert Configured Cascaded Definition with Template</a><br/>
+    <a href="velocity/testinsertdefinition_cascaded_list.vm">Velocity: Test Insert Configured Cascaded Definition with List</a><br/>
+    <a href="velocity/testinsertdefinition_reversed.vm">Velocity: Test Insert Configured Definition with Reversed Attribute</a><br/>
+    <a href="velocity/testinsertdefinition_attribute_preparer.vm">Velocity: Test Insert Configured Definition with Attribute Preparer</a><br/>
+    <a href="velocity/testinsertnesteddefinition.vm">Velocity: Test Insert Nested Definition</a><br/>
+    <a href="velocity/testinsertnesteddefinition_tags.vm">Velocity: Test Insert Nested Definition only using JSP tags</a><br/>
+    <a href="velocity/testinsertnestedlistdefinition.vm">Velocity: Test Insert Nested List Definition</a><br/>
+    <a href="velocity/testinsertnestedlistdefinition_tags.vm">Velocity: Test Insert Nested List Definition only using JSP tags</a><br/>
+    <a href="velocity/testinsertdefinition_el.vm">Velocity: Test Insert Configured Definition with EL</a><br/>
+    <a href="velocity/testinsertdefinition_el_singleeval.vm">Velocity: Test Insert Configured Definition with EL to test Single Evaluation</a><br/>
+    <a href="velocity/testinsertdefinition_wildcard.vm">Velocity: Test Insert Configured Definition with Wildcards</a><br/>
+    <a href="velocity/testinsertdefinition_defaultvalues.vm">Velocity: Test Insert Configured Definition with Default Values</a><br/>
+    <a href="velocity/testput_cascaded.vm">Velocity: Test Put Tag with Cascaded Attributes</a><br/>
+    <a href="velocity/testput_cascaded_overridden.vm">Velocity: Test Put Tag with Overridden Cascaded Attributes</a><br/>
+    <a href="velocity/testput_cascaded_template.vm">Velocity: Test Put Tag with Cascaded Attributes and Template</a><br/>
+    <a href="velocity/testput_el_singleeval.vm">Velocity: Test Put Tag using EL to test Single Evaluation</a><br/>
+    <a href="velocity/testput_reversed.vm">Velocity: Test Put Tag with Reversed Attribute</a><br/>
+    <a href="velocity/testputlist_cascaded.vm">Velocity: Test Put List Cascaded Tag</a><br/>
+    <a href="velocity/testputlist_inherit.vm">Velocity: Test Put List Tag with Inherit</a><br/>
+    <a href="velocity/testimportattribute_inherit.vm">Velocity: Test importAttribute Tag with List Inherit</a><br/>
+    <a href="velocity/testsetcurrentcontainer.vm">Velocity: Test setCurrentContainer Tag</a><br/>
+
+    <h3>Mutable Container Tests</h3>
+    <a href="velocity/testdef_list_inherit.vm">Velocity: Test Definition Tag with a List Inherit</a><br/>
+
+    <h3>Database Verification tests</h3>
+    <a href="velocity/testinsertdefinition_db.vm">Velocity: Test Insert Configured Definition from DB</a><br/>
+    <a href="velocity/testinsertdefinition_extended_db.vm">Velocity: Test Insert Extended Configured Definition from DB</a><br/>
+
+    <h2>Features in Tiles 2.2.x</h2>
+
+    <h3>Standard Render/Attribute Tests</h3>
+    <a href="velocity/testinsertdefinition_mvel.vm">Velocity: Test Insert Configured Definition with MVEL</a><br/>
+    <a href="velocity/testinsertdefinition_ognl.vm">Velocity: Test Insert Configured Definition with OGNL</a><br/>
+    <a href="velocity/testinsertdefinition_regexp.vm">Velocity: Test Insert Configured Definition with Regular Expression</a><br/>
+    <a href="org/apache/tiles/test/alt/velocity/testinsertdefinition_alt.vm">Velocity: Test Insert Configured Definition in Module</a><br/>
+
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout.ftl b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout.ftl
new file mode 100644
index 0000000..c7ba7d1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout.ftl
@@ -0,0 +1,37 @@
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><@tiles.getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><@tiles.insertAttribute name="body"/></td>
+  </tr>
+  <tr>
+    <td>This layout is made in FreeMarker.</td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout.jsp
new file mode 100644
index 0000000..23d3cc0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layoutOne.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layoutOne.jsp
new file mode 100644
index 0000000..05545b5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layoutOne.jsp
@@ -0,0 +1,40 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="yellow">This is layout one.</td>
+  </tr>
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layoutTwo.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layoutTwo.jsp
new file mode 100644
index 0000000..4d5cd25
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layoutTwo.jsp
@@ -0,0 +1,40 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="yellow">This is layout two.</td>
+  </tr>
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_alt_title.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_alt_title.jsp
new file mode 100644
index 0000000..e84ed4f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_alt_title.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:insertAttribute name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_closebody.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_closebody.jsp
new file mode 100644
index 0000000..1b4f6fb
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_closebody.jsp
@@ -0,0 +1,43 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td>
+    <tiles:insertAttribute name="body">
+        <tiles:putAttribute name="title"  value="This is a customized context" />
+        <tiles:putAttribute name="header" value="/header.jsp" />
+        <tiles:putAttribute name="body"   value="/body.jsp" />
+    </tiles:insertAttribute>
+    </td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_default.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_default.jsp
new file mode 100644
index 0000000..4c6ccbe
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_default.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:insertAttribute name="title" defaultValue="This is the default title."/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header" defaultValue="alternate-header.jsp" defaultValueType="template"/></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body" defaultValue="This is the default body in the tag."/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_flush.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_flush.jsp
new file mode 100644
index 0000000..fd3fbd5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_flush.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header" flush="true"/></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body" flush="true"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_ignore.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_ignore.jsp
new file mode 100644
index 0000000..8dc32bc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_ignore.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header" ignore="true"/></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_list.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_list.jsp
new file mode 100644
index 0000000..b345690
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_list.jsp
@@ -0,0 +1,43 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td>
+        <tiles:importAttribute name="list"/>
+        <c:forEach var="attribute" items="${list}">
+            <tiles:insertAttribute value="${attribute}" />
+        </c:forEach>
+    </td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_nobody.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_nobody.jsp
new file mode 100644
index 0000000..42f1152
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_nobody.jsp
@@ -0,0 +1,34 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_override.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_override.jsp
new file mode 100644
index 0000000..074c980
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_override.jsp
@@ -0,0 +1,40 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Green"><strong>This is the overridden template.</strong></td>
+  </tr>
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_preparer.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_preparer.jsp
new file mode 100644
index 0000000..44f24e8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_preparer.jsp
@@ -0,0 +1,38 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header"/></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body"
+        preparer="org.apache.tiles.test.preparer.AttributeViewPreparer"/></td>
+  </tr>
+</table>           
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_roles.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_roles.jsp
new file mode 100644
index 0000000..44f43f2
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/layout_roles.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="header" role="goodrole" /></td>
+  </tr>
+  <tr>
+    <td><tiles:insertAttribute name="body" role="badrole" /></td>
+  </tr>
+</table>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/override.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/override.jsp
new file mode 100644
index 0000000..9d7cda6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/override.jsp
@@ -0,0 +1,25 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<div align="center"><b><i>This is an overridden content</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/putallattributeslayout.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/putallattributeslayout.jsp
new file mode 100644
index 0000000..3857861
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/putallattributeslayout.jsp
@@ -0,0 +1,35 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
+
+<tiles:importAttribute/>
+
+<c:out value="${one}"/>
+<ul>
+  <li><c:out value="${two}"/></li>
+  <li><c:out value="${three}"/></li>
+  <li><c:out value="${four}"/> </li>
+</ul>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/putattributeslayout.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/putattributeslayout.jsp
new file mode 100644
index 0000000..3c1fc7e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/putattributeslayout.jsp
@@ -0,0 +1,35 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
+<tiles:importAttribute name="stringTest"/>
+<tiles:importAttribute name="list"/>
+Single attribute "stringTest" value: <c:out value="${stringTest}" /> <br/><br/>
+The attribute "list" contains these values:
+<ul>
+<c:forEach var="item" items="${list}">
+<li><tiles:insertAttribute value="${item}" /></li>
+</c:forEach>
+</ul>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/selectlocale.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/selectlocale.jsp
new file mode 100644
index 0000000..66e9007
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/selectlocale.jsp
@@ -0,0 +1,45 @@
+<%@ page session="false" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Select your locale</title>
+</head>
+<body>
+<form action="servlets/selectLocaleServlet">
+Select your locale:
+<select name="locale">
+<option selected="selected" value="">Default</option>
+<option value="en_US">American English</option>
+<option value="en_GB">British English</option>
+<option value="fr_FR">French</option>
+<option value="it_IT">Italian</option>
+</select>
+<input type="submit" value="Submit" />
+</form>
+<div id="defaultLocaleMessage">Your default Locale is <%=request.getLocale().toString() %></div>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/selectlocale_db.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/selectlocale_db.jsp
new file mode 100644
index 0000000..9fbe02f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/selectlocale_db.jsp
@@ -0,0 +1,45 @@
+<%@ page session="false" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Select your locale</title>
+</head>
+<body>
+<form action="servlets/selectLocaleServletDb">
+Select your locale:
+<select name="locale">
+<option selected="selected" value="">Default</option>
+<option value="en_US">American English</option>
+<option value="en_GB">British English</option>
+<option value="fr_FR">French</option>
+<option value="it_IT">Italian</option>
+</select>
+<input type="submit" value="Submit" />
+</form>
+<div id="defaultLocaleMessage">Your default Locale is <%=request.getLocale().toString() %></div>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdecorationfilter.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdecorationfilter.jsp
new file mode 100644
index 0000000..2672fd4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdecorationfilter.jsp
@@ -0,0 +1,25 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<i>This Content should be wrapped with the standard layout.</i>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef.jsp
new file mode 100644
index 0000000..fb7b605
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef.jsp
@@ -0,0 +1,32 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="templateDefinition" template="/layout.jsp">
+  <tiles:putAttribute name="title"  value="This is the title." />
+  <tiles:putAttribute name="header" value="/header.jsp" />
+  <tiles:putAttribute name="body"   value="/body.jsp" />
+</tiles:definition>
+<tiles:insertDefinition name="templateDefinition" />
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef_extend.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef_extend.jsp
new file mode 100644
index 0000000..4286480
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef_extend.jsp
@@ -0,0 +1,33 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="test.definition.override.one" extends="test.definition">
+  <tiles:putAttribute name="body"   value="/override.jsp" />
+</tiles:definition>
+<tiles:definition name="test.definition.override.two" extends="test.definition.override.one">
+  <tiles:putAttribute name="title"   value="This is an overridden title" />
+</tiles:definition>
+<tiles:insertDefinition name="test.definition.override.two" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef_list_inherit.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef_list_inherit.jsp
new file mode 100644
index 0000000..84f1982
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef_list_inherit.jsp
@@ -0,0 +1,33 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="templateDefinition" extends="test.putAttributes">
+  <tiles:putAttribute name="stringTest" value="This is a string" type="string"/>
+  <tiles:putListAttribute name="list" inherit="true">
+    <tiles:addAttribute value="valueFour" type="string" />
+  </tiles:putListAttribute>
+</tiles:definition>
+<tiles:insertDefinition name="templateDefinition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef_preparer.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef_preparer.jsp
new file mode 100644
index 0000000..d1a5461
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testdef_preparer.jsp
@@ -0,0 +1,32 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="templateDefinition" template="/layout.jsp" preparer="org.apache.tiles.test.preparer.TestViewPreparer">
+  <tiles:putAttribute name="title"  value="This is the title." />
+  <tiles:putAttribute name="header" value="/header.jsp" />
+  <tiles:putAttribute name="body"   value="/body.jsp" />
+</tiles:definition>
+<tiles:insertDefinition name="templateDefinition" />
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testimportattribute.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testimportattribute.jsp
new file mode 100644
index 0000000..d54b37d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testimportattribute.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.putAttributes" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testimportattribute_all.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testimportattribute_all.jsp
new file mode 100644
index 0000000..4633fcb
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testimportattribute_all.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.putAllAttributes" />
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testimportattribute_inherit.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testimportattribute_inherit.jsp
new file mode 100644
index 0000000..79f5988
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testimportattribute_inherit.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.putAttributes.inherit" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition.jsp
new file mode 100644
index 0000000..02cb533
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_attribute_preparer.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_attribute_preparer.jsp
new file mode 100644
index 0000000..4d31a4c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_attribute_preparer.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.attribute.preparer" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_attribute_roles.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_attribute_roles.jsp
new file mode 100644
index 0000000..6f3064e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_attribute_roles.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.roles" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_attribute_roles_tags.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_attribute_roles_tags.jsp
new file mode 100644
index 0000000..8c5c58c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_attribute_roles_tags.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.roles.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded.jsp
new file mode 100644
index 0000000..0137435
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.cascaded.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded_list.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded_list.jsp
new file mode 100644
index 0000000..8018fb4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded_list.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.cascaded.list.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded_overridden.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded_overridden.jsp
new file mode 100644
index 0000000..192f99e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded_overridden.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.overridden.cascaded.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded_template.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded_template.jsp
new file mode 100644
index 0000000..9e579df
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_cascaded_template.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.cascaded.template.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_classpath.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_classpath.jsp
new file mode 100644
index 0000000..7ba5720
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_classpath.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="classpath.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite.jsp
new file mode 100644
index 0000000..a89b0e6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.composite.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags.jsp
new file mode 100644
index 0000000..ade9330
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="test.inner.definition.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is an inner definition with tags."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body"   value="/body.jsp"/>
+</tiles:definition>
+<tiles:definition name="test.composite.definition.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is a composite definition with tags."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body"   value="test.inner.definition.tags" type="definition"/>
+</tiles:definition>
+<tiles:insertDefinition name="test.composite.definition.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags_includes_configured.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags_includes_configured.jsp
new file mode 100644
index 0000000..3ad4fbe
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags_includes_configured.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="test.inner.definition.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is an inner definition with tags."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body"   value="/body.jsp"/>
+</tiles:definition>
+<tiles:definition name="test.composite.definition.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is a composite definition with tags."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body"   value="test.inner.definition" type="definition"/>
+</tiles:definition>
+<tiles:insertDefinition name="test.composite.definition.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags_includes_configured_notype.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags_includes_configured_notype.jsp
new file mode 100644
index 0000000..804143d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags_includes_configured_notype.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="test.inner.definition.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is an inner definition with tags."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body"   value="/body.jsp"/>
+</tiles:definition>
+<tiles:definition name="test.composite.definition.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is a composite definition with tags."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body"   value="test.inner.definition"/>
+</tiles:definition>
+<tiles:insertDefinition name="test.composite.definition.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags_notype.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags_notype.jsp
new file mode 100644
index 0000000..b2fbb0f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_composite_tags_notype.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="test.inner.definition.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is an inner definition with tags."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body"   value="/body.jsp"/>
+</tiles:definition>
+<tiles:definition name="test.composite.definition.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is a composite definition with tags."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body"   value="test.inner.definition.tags"/>
+</tiles:definition>
+<tiles:insertDefinition name="test.composite.definition.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_db.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_db.jsp
new file mode 100644
index 0000000..41f96ed
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_db.jsp
@@ -0,0 +1,28 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:setCurrentContainer containerKey="db"/>
+<tiles:insertDefinition name="test.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_defaultvalues.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_defaultvalues.jsp
new file mode 100644
index 0000000..6514aef
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_defaultvalues.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.defaultvalues.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_el.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_el.jsp
new file mode 100644
index 0000000..0779791
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_el.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.composite.el.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_el_singleeval.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_el_singleeval.jsp
new file mode 100644
index 0000000..476ca17
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_el_singleeval.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.composite.el.doNotShow.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp
new file mode 100644
index 0000000..12fd4b6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.exception" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_extended_db.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_extended_db.jsp
new file mode 100644
index 0000000..e20a754
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_extended_db.jsp
@@ -0,0 +1,28 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:setCurrentContainer containerKey="db"/>
+<tiles:insertDefinition name="test.definition.extended" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_flush.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_flush.jsp
new file mode 100644
index 0000000..91d851f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_flush.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.flush" flush="true"/>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp
new file mode 100644
index 0000000..0243922
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_freemarker.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.freemarker" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_ignore.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_ignore.jsp
new file mode 100644
index 0000000..8304d69
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_ignore.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.ignore" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_inline.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_inline.jsp
new file mode 100644
index 0000000..c3fe96f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_inline.jsp
@@ -0,0 +1,31 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition">
+  <tiles:putAttribute name="body">
+  <div align="center"><b><i>This is an inline content</i></b></div>
+  </tiles:putAttribute>
+</tiles:insertDefinition>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_mvel.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_mvel.jsp
new file mode 100644
index 0000000..2451ace
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_mvel.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.composite.mvel.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_ognl.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_ognl.jsp
new file mode 100644
index 0000000..8d335be
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_ognl.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.composite.ognl.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_old.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_old.jsp
new file mode 100644
index 0000000..2ae85f8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_old.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.old_format" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_openbody.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_openbody.jsp
new file mode 100644
index 0000000..c8d45ab
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_openbody.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.openbody.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_override.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_override.jsp
new file mode 100644
index 0000000..f414617
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_override.jsp
@@ -0,0 +1,29 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition">
+  <tiles:putAttribute name="body"   value="/override.jsp" />
+</tiles:insertDefinition>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_override_and_not.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_override_and_not.jsp
new file mode 100644
index 0000000..af51da3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_override_and_not.jsp
@@ -0,0 +1,32 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+Overridden content:<br/>
+<tiles:insertDefinition name="test.definition">
+  <tiles:putAttribute name="body"   value="/override.jsp" />
+</tiles:insertDefinition>
+<br/>
+Not overridden content:<br/>
+<tiles:insertDefinition name="test.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_override_template.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_override_template.jsp
new file mode 100644
index 0000000..7a9b71b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_override_template.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition" template="/layout_override.jsp" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_preparer.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_preparer.jsp
new file mode 100644
index 0000000..8d1300f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_preparer.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="preparer.definition" preparer="org.apache.tiles.test.preparer.TestViewPreparer" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_preparer_configured.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_preparer_configured.jsp
new file mode 100644
index 0000000..67ab55a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_preparer_configured.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="preparer.definition.configured"/>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_regexp.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_regexp.jsp
new file mode 100644
index 0000000..66ca851
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_regexp.jsp
@@ -0,0 +1,28 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<tiles:setCurrentContainer containerKey="alternate" />
+<tiles:insertDefinition name="test.regexp.definitionOne.messageHello" />
+<tiles:insertDefinition name="test.regexp.definitionTwo.messageBye" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_reversed.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_reversed.jsp
new file mode 100644
index 0000000..362a363
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_reversed.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.reversed.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_role.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_role.jsp
new file mode 100644
index 0000000..2551f85
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_role.jsp
@@ -0,0 +1,28 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.appears.configured" />
+<tiles:insertDefinition name="test.definition.does_not_appear.configured" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_role_tag.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_role_tag.jsp
new file mode 100644
index 0000000..6b632aa
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_role_tag.jsp
@@ -0,0 +1,28 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.appears" role="goodrole" />
+<tiles:insertDefinition name="test.definition.does_not_appear" role="badrole" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_wildcard.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_wildcard.jsp
new file mode 100644
index 0000000..9128c3a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertdefinition_wildcard.jsp
@@ -0,0 +1,28 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<tiles:setCurrentContainer containerKey="alternate" />
+<tiles:insertDefinition name="test.definitionOne.messageHello" />
+<tiles:insertDefinition name="test.definitionTwo.messageBye" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp
new file mode 100644
index 0000000..eef3bb3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.nesting.definitions" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp
new file mode 100644
index 0000000..1727d39
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp
@@ -0,0 +1,38 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="test.nesting.definitions.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is the title."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body">
+        <tiles:definition template="/layout.jsp">
+            <tiles:putAttribute name="title"  value="This is a nested definition."/>
+            <tiles:putAttribute name="header" value="/header.jsp"/>
+            <tiles:putAttribute name="body"   value="/body.jsp"/>
+        </tiles:definition>
+    </tiles:putAttribute>
+</tiles:definition>
+<tiles:insertDefinition name="test.nesting.definitions.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnestedlistdefinition.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnestedlistdefinition.jsp
new file mode 100644
index 0000000..cebe125
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnestedlistdefinition.jsp
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.nesting.list.definitions" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnestedlistdefinition_tags.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnestedlistdefinition_tags.jsp
new file mode 100644
index 0000000..ef5f1be
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testinsertnestedlistdefinition_tags.jsp
@@ -0,0 +1,40 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:definition name="test.nesting.definitions.tags" template="/layout_list.jsp">
+    <tiles:putAttribute name="title"  value="This is the title."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putListAttribute name="list">
+        <tiles:addAttribute>
+	        <tiles:definition template="/layout.jsp">
+	            <tiles:putAttribute name="title"  value="This is a nested definition."/>
+	            <tiles:putAttribute name="header" value="/header.jsp"/>
+	            <tiles:putAttribute name="body"   value="/body.jsp"/>
+	        </tiles:definition>
+        </tiles:addAttribute>
+    </tiles:putListAttribute>
+</tiles:definition>
+<tiles:insertDefinition name="test.nesting.definitions.tags" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput.jsp
new file mode 100644
index 0000000..8f158fc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput.jsp
@@ -0,0 +1,31 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertTemplate template="/layout.jsp">
+  <tiles:putAttribute name="title"  value="This is the title." />
+  <tiles:putAttribute name="header" value="/header.jsp" />
+  <tiles:putAttribute name="body"   value="/body.jsp" />
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_cascaded.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_cascaded.jsp
new file mode 100644
index 0000000..fca4dc3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_cascaded.jsp
@@ -0,0 +1,31 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertTemplate template="/layout.jsp">
+  <tiles:putAttribute name="title"  value="This is the title." cascade="true" />
+  <tiles:putAttribute name="header" value="/header.jsp" cascade="true" />
+  <tiles:putAttribute name="body"   value="test.inner.cascadable.definition" />
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_cascaded_overridden.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_cascaded_overridden.jsp
new file mode 100644
index 0000000..ce4fe37
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_cascaded_overridden.jsp
@@ -0,0 +1,31 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertTemplate template="/layout.jsp">
+  <tiles:putAttribute name="title"  value="This is the title." cascade="true" />
+  <tiles:putAttribute name="header" value="/alternate-header.jsp" cascade="true" />
+  <tiles:putAttribute name="body"   value="test.inner.definition" />
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_cascaded_template.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_cascaded_template.jsp
new file mode 100644
index 0000000..d92fc72
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_cascaded_template.jsp
@@ -0,0 +1,31 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertTemplate template="/layout.jsp">
+  <tiles:putAttribute name="title"  value="This is the title." cascade="true" />
+  <tiles:putAttribute name="header" value="/header.jsp" cascade="true" />
+  <tiles:putAttribute name="body"   value="/layout_nobody.jsp" />
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_el.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_el.jsp
new file mode 100644
index 0000000..21bf428
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_el.jsp
@@ -0,0 +1,34 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<c:set var="bodyContent" value="Body Content defined by and el" />
+
+<tiles:insertTemplate template="/layout.jsp">
+  <tiles:putAttribute name="title"  value="This is the title." />
+  <tiles:putAttribute name="header" value="/header.jsp" />
+  <tiles:putAttribute name="body"   value="${bodyContent}" />
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_el_singleeval.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_el_singleeval.jsp
new file mode 100644
index 0000000..6fc19a5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_el_singleeval.jsp
@@ -0,0 +1,35 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<c:set var="doNotShowBody" value="${'${'}requestScope.doNotShow}" />
+<c:set var="doNotShow" scope="request" value="DO NOT SHOW!!!" />
+
+<tiles:insertTemplate template="/layout.jsp">
+  <tiles:putAttribute name="title"  value="This is the title." />
+  <tiles:putAttribute name="header" value="/header.jsp" />
+  <tiles:putAttribute name="body"   value="${doNotShowBody}" />
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_flush.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_flush.jsp
new file mode 100644
index 0000000..2cdca88
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_flush.jsp
@@ -0,0 +1,31 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertTemplate template="/layout.jsp" flush="true">
+  <tiles:putAttribute name="title"  value="This is the title." />
+  <tiles:putAttribute name="header" value="/header.jsp" />
+  <tiles:putAttribute name="body"   value="/body.jsp" />
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_reversed.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_reversed.jsp
new file mode 100644
index 0000000..4680497
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_reversed.jsp
@@ -0,0 +1,31 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertTemplate template="/layout_alt_title.jsp">
+  <tiles:putAttribute name="title"  value="This is the title." type="reversed" />
+  <tiles:putAttribute name="header" value="/header.jsp" />
+  <tiles:putAttribute name="body"   value="/body.jsp" />
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_servlet.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_servlet.jsp
new file mode 100644
index 0000000..0f02634
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testput_servlet.jsp
@@ -0,0 +1,31 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertTemplate template="/servlets/layoutServlet">
+  <tiles:putAttribute name="title"  value="This is the title." />
+  <tiles:putAttribute name="header" value="/header.jsp" />
+  <tiles:putAttribute name="body"   value="/body.jsp" />
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testputlist.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testputlist.jsp
new file mode 100644
index 0000000..0e0239c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testputlist.jsp
@@ -0,0 +1,34 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertTemplate template="/putattributeslayout.jsp">
+  <tiles:putAttribute name="stringTest" value="This is a string" type="string" />
+  <tiles:putListAttribute name="list">
+    <tiles:addAttribute value="valueOne" type="string" />
+    <tiles:addAttribute value="valueTwo" type="string" />
+    <tiles:addAttribute value="valueThree" type="string" />
+  </tiles:putListAttribute>
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testputlist_cascaded.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testputlist_cascaded.jsp
new file mode 100644
index 0000000..eb1ed98
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testputlist_cascaded.jsp
@@ -0,0 +1,37 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertTemplate template="/layout.jsp">
+  <tiles:putAttribute name="title"  value="This is the title." />
+  <tiles:putAttribute name="header" value="/header.jsp" />
+  <tiles:putAttribute name="body"   value="/putattributeslayout.jsp" />
+  <tiles:putAttribute name="stringTest" value="This is a string" type="string" cascade="true" />
+  <tiles:putListAttribute name="list" cascade="true">
+    <tiles:addAttribute value="valueOne" type="string" />
+    <tiles:addAttribute value="valueTwo" type="string" />
+    <tiles:addAttribute value="valueThree" type="string" />
+  </tiles:putListAttribute>
+</tiles:insertTemplate>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testputlist_inherit.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testputlist_inherit.jsp
new file mode 100644
index 0000000..9fe2fcc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testputlist_inherit.jsp
@@ -0,0 +1,31 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+
+<tiles:insertDefinition name="test.putAttributes">
+  <tiles:putListAttribute name="list" inherit="true">
+    <tiles:addAttribute value="valueFour" type="string" />
+  </tiles:putListAttribute>
+</tiles:insertDefinition>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testsetcurrentcontainer.jsp b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testsetcurrentcontainer.jsp
new file mode 100644
index 0000000..83b554e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/testsetcurrentcontainer.jsp
@@ -0,0 +1,29 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
+<tiles:setCurrentContainer containerKey="alternate" />
+<tiles:insertDefinition name="test.definition" />
+<tiles:setCurrentContainer />
+<tiles:insertDefinition name="test.definition" />
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/alternate-header.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/alternate-header.vm
new file mode 100644
index 0000000..d96bf14
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/alternate-header.vm
@@ -0,0 +1,23 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<strong>This is the alternate header</strong>
+    
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/body.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/body.vm
new file mode 100644
index 0000000..d15a75c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/body.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<div align="center"><b><i>This is a body</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/classpath.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/classpath.vm
new file mode 100644
index 0000000..9aa751e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/classpath.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<div align="center"><b><i>This tile was loaded from the classpath</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/defaultlocale.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/defaultlocale.vm
new file mode 100644
index 0000000..9ce82fe
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/defaultlocale.vm
@@ -0,0 +1,25 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<div align="center"><b><i>
+<div id="defaultLocaleMessage">Your default Locale is $request.locale</div>
+</i></b></div>
+<a href="../selectlocale.vm">Select another locale</a>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/errorInclude.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/errorInclude.vm
new file mode 100644
index 0000000..d835982
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/errorInclude.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+The "force include" attribute has not been set.
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/exception.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/exception.vm
new file mode 100644
index 0000000..8b63979
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/exception.vm
@@ -0,0 +1,23 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<strong>This throws an exception</strong>
+$exc.throwRuntimeException()
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/header.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/header.vm
new file mode 100644
index 0000000..fecafaa
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/header.vm
@@ -0,0 +1,23 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<strong>This is the header</strong>
+    
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout.vm
new file mode 100644
index 0000000..fe39277
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header"})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body"})#end</td>
+  </tr>
+</table>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layoutOne.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layoutOne.vm
new file mode 100644
index 0000000..25b6a3a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layoutOne.vm
@@ -0,0 +1,35 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="yellow">This is layout one.</td>
+  </tr>
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header"})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body"})#end</td>
+  </tr>
+</table>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layoutTwo.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layoutTwo.vm
new file mode 100644
index 0000000..cd09410
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layoutTwo.vm
@@ -0,0 +1,35 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="yellow">This is layout two.</td>
+  </tr>
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header"})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body"})#end</td>
+  </tr>
+</table>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_alt_title.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_alt_title.vm
new file mode 100644
index 0000000..13b7958
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_alt_title.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_insertAttribute({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header"})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body"})#end</td>
+  </tr>
+</table>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_closebody.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_closebody.vm
new file mode 100644
index 0000000..25974d9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_closebody.vm
@@ -0,0 +1,38 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header"})#end</td>
+  </tr>
+  <tr>
+    <td>
+    #tiles_insertAttribute({"name":"body"})
+        #tiles_putAttribute({"name":"title", "value":"This is a customized context"})#end
+        #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+        #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+    #end
+    </td>
+  </tr>
+</table>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_default.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_default.vm
new file mode 100644
index 0000000..69e5cbc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_default.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_insertAttribute({"name":"title", "defaultValue":"This is the default title."})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header", "defaultValue":"alternate-header.vm", "defaultValueType":"template"})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body", "defaultValue":"This is the default body in the tag."})#end</td>
+  </tr>
+</table>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_flush.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_flush.vm
new file mode 100644
index 0000000..7cb8795
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_flush.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header", "flush":true})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body", "flush":true})#end</td>
+  </tr>
+</table>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_ignore.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_ignore.vm
new file mode 100644
index 0000000..4a5f2ef
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_ignore.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header", "ignore":true})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body"})#end</td>
+  </tr>
+</table>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_list.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_list.vm
new file mode 100644
index 0000000..fa73b27
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_list.vm
@@ -0,0 +1,37 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header"})#end</td>
+  </tr>
+  <tr>
+    <td>
+        #tiles_importAttribute({"name":"list"})
+        #foreach($attribute in $list)
+            #tiles_insertAttribute({"value":$attribute})#end
+        #end
+    </td>
+  </tr>
+</table>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_nobody.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_nobody.vm
new file mode 100644
index 0000000..d3b5dc0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_nobody.vm
@@ -0,0 +1,29 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header"})#end</td>
+  </tr>
+</table>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_override.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_override.vm
new file mode 100644
index 0000000..4bdcac1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_override.vm
@@ -0,0 +1,35 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Green"><strong>This is the overridden template.</strong></td>
+  </tr>
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header"})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body"})#end</td>
+  </tr>
+</table>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_preparer.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_preparer.vm
new file mode 100644
index 0000000..45a93d7
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_preparer.vm
@@ -0,0 +1,33 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header"})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body",
+        "preparer":"org.apache.tiles.test.preparer.AttributeViewPreparer"})#end</td>
+  </tr>
+</table>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_roles.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_roles.vm
new file mode 100644
index 0000000..76e7aa2
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/layout_roles.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<table  border="2"  width="300"  bordercolor="Gray">
+  <tr>
+    <td  bgcolor="Blue"><strong>#tiles_getAsString({"name":"title"})#end</strong></td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"header", "role":"goodrole"})#end</td>
+  </tr>
+  <tr>
+    <td>#tiles_insertAttribute({"name":"body", "role":"badrole"})#end</td>
+  </tr>
+</table>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/override.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/override.vm
new file mode 100644
index 0000000..b936e87
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/override.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<div align="center"><b><i>This is an overridden content</i></b></div>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/putallattributeslayout.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/putallattributeslayout.vm
new file mode 100644
index 0000000..461d008
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/putallattributeslayout.vm
@@ -0,0 +1,29 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_importAttribute({})
+
+${one}
+<ul>
+  <li>${two}</li>
+  <li>${three}</li>
+  <li>${four}</li>
+</ul>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/putattributeslayout.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/putattributeslayout.vm
new file mode 100644
index 0000000..fe563bf
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/putattributeslayout.vm
@@ -0,0 +1,30 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_importAttribute({"name":"stringTest"})
+#tiles_importAttribute({"name":"list"})
+Single attribute "stringTest" value: $esc.html($stringTest) <br/><br/>
+The attribute "list" contains these values:
+<ul>
+#foreach($item in $list)
+<li>#tiles_insertAttribute({"value":$item})#end</li>
+#end
+</ul>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/selectlocale.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/selectlocale.vm
new file mode 100644
index 0000000..f98aaae
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/selectlocale.vm
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Select your locale</title>
+</head>
+<body>
+<form action="servlets/selectLocaleServlet">
+Select your locale:
+<select name="locale">
+<option selected="selected" value="">Default</option>
+<option value="en_US">American English</option>
+<option value="en_GB">British English</option>
+<option value="fr_FR">French</option>
+<option value="it_IT">Italian</option>
+</select>
+<input type="submit" value="Submit" />
+</form>
+<div id="defaultLocaleMessage">Your default Locale is ${request.locale}</div>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdecorationfilter.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdecorationfilter.vm
new file mode 100644
index 0000000..d10c438
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdecorationfilter.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+<i>This Content should be wrapped with the standard layout.</i>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef.vm
new file mode 100644
index 0000000..00bc5d6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef.vm
@@ -0,0 +1,27 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"templateDefinition", "template":"/velocity/layout.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
+#tiles_insertDefinition({"name":"templateDefinition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef_extend.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef_extend.vm
new file mode 100644
index 0000000..c21cc01
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef_extend.vm
@@ -0,0 +1,28 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"test.definition.override.one", "extends":"velocity.test.definition"})
+  #tiles_putAttribute({"name":"body", "value":"/velocity/override.vm", "type":"velocity"})#end
+#end
+#tiles_definition({"name":"test.definition.override.two", "extends":"test.definition.override.one"})
+  #tiles_putAttribute({"name":"title", "value":"This is an overridden title"})#end
+#end
+#tiles_insertDefinition({"name":"test.definition.override.two"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef_list_inherit.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef_list_inherit.vm
new file mode 100644
index 0000000..59705fa
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef_list_inherit.vm
@@ -0,0 +1,28 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"templateDefinition", "extends":"test.putAttributes"})
+  #tiles_putAttribute({"name":"stringTest", "value":"This is a string", "type":"string"})#end
+  #tiles_putListAttribute({"name":"list", "inherit":true})
+    #tiles_addAttribute({"value":"valueFour", "type":"string"})#end
+  #end
+#end
+#tiles_insertDefinition({"name":"templateDefinition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef_preparer.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef_preparer.vm
new file mode 100644
index 0000000..987628e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testdef_preparer.vm
@@ -0,0 +1,27 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"templateDefinition", "template":"/velocity/layout.vm", "preparer":"org.apache.tiles.test.preparer.TestViewPreparer"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
+#tiles_insertDefinition({"name":"templateDefinition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testimportattribute.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testimportattribute.vm
new file mode 100644
index 0000000..48dc8a5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testimportattribute.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.putAttributes"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testimportattribute_all.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testimportattribute_all.vm
new file mode 100644
index 0000000..008a3d7
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testimportattribute_all.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.putAllAttributes"})#end
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testimportattribute_inherit.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testimportattribute_inherit.vm
new file mode 100644
index 0000000..163c1dd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testimportattribute_inherit.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.putAttributes.inherit"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition.vm
new file mode 100644
index 0000000..c974ce9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name" : "velocity.test.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_attribute_preparer.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_attribute_preparer.vm
new file mode 100644
index 0000000..ff60d88
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_attribute_preparer.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition.attribute.preparer"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_attribute_roles.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_attribute_roles.vm
new file mode 100644
index 0000000..31e82e3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_attribute_roles.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition.roles"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_attribute_roles_tags.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_attribute_roles_tags.vm
new file mode 100644
index 0000000..ca4f4fc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_attribute_roles_tags.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition.roles.tags"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded.vm
new file mode 100644
index 0000000..81aec16
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.cascaded.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded_list.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded_list.vm
new file mode 100644
index 0000000..4e45bad
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded_list.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.cascaded.list.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded_overridden.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded_overridden.vm
new file mode 100644
index 0000000..ce1c8de
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded_overridden.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.overridden.cascaded.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded_template.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded_template.vm
new file mode 100644
index 0000000..3148b51
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_cascaded_template.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.cascaded.template.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_classpath.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_classpath.vm
new file mode 100644
index 0000000..8bb0594
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_classpath.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.classpath.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite.vm
new file mode 100644
index 0000000..1e86d7d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.composite.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags.vm
new file mode 100644
index 0000000..43a3120
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"test.inner.definition.tags", "template":"/velocity/layout.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is an inner definition with tags."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
+#tiles_definition({"name":"test.composite.definition.tags", "template":"/velocity/layout.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is a composite definition with tags."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putAttribute({"name":"body", "value":"test.inner.definition.tags", "type":"definition"})#end
+#end
+#tiles_insertDefinition({"name":"test.composite.definition.tags"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags_includes_configured.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags_includes_configured.vm
new file mode 100644
index 0000000..e2c0d69
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags_includes_configured.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"test.inner.definition.tags", "template":"/velocity/layout.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is an inner definition with tags."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
+#tiles_definition({"name":"test.composite.definition.tags", "template":"/velocity/layout.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is a composite definition with tags."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putAttribute({"name":"body", "value":"test.inner.definition", "type":"definition"})#end
+#end
+#tiles_insertDefinition({"name":"test.composite.definition.tags"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags_includes_configured_notype.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags_includes_configured_notype.vm
new file mode 100644
index 0000000..bc147e6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags_includes_configured_notype.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"test.inner.definition.tags", "template":"/velocity/layout.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is an inner definition with tags."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
+#tiles_definition({"name":"test.composite.definition.tags", "template":"/velocity/layout.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is a composite definition with tags."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putAttribute({"name":"body", "value":"test.inner.definition"})#end
+#end
+#tiles_insertDefinition({"name":"test.composite.definition.tags"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags_notype.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags_notype.vm
new file mode 100644
index 0000000..ecb5419
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_composite_tags_notype.vm
@@ -0,0 +1,31 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"test.inner.definition.tags", "template":"/velocity/layout.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is an inner definition with tags."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
+#tiles_definition({"name":"test.composite.definition.tags", "template":"/velocity/layout.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is a composite definition with tags."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putAttribute({"name":"body", "value":"test.inner.definition.tags"})#end
+#end
+#tiles_insertDefinition({"name":"test.composite.definition.tags"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_db.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_db.vm
new file mode 100644
index 0000000..83806c3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_db.vm
@@ -0,0 +1,23 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+$tiles.setCurrentContainer("db")
+#tiles_insertDefinition({"name":"test.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_defaultvalues.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_defaultvalues.vm
new file mode 100644
index 0000000..3872fb2
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_defaultvalues.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.defaultvalues.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_el.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_el.vm
new file mode 100644
index 0000000..81aed55
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_el.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.composite.el.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_el_singleeval.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_el_singleeval.vm
new file mode 100644
index 0000000..45bf779
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_el_singleeval.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.composite.el.doNotShow.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_exception.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_exception.vm
new file mode 100644
index 0000000..89beea3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_exception.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition.exception"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_extended_db.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_extended_db.vm
new file mode 100644
index 0000000..b7ddf2a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_extended_db.vm
@@ -0,0 +1,23 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+$tiles.setCurrentContainer("db")
+#tiles_insertDefinition({"name":"test.definition.extended"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_flush.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_flush.vm
new file mode 100644
index 0000000..203665b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_flush.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition.flush", "flush":true})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_ignore.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_ignore.vm
new file mode 100644
index 0000000..d466170
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_ignore.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition.ignore"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_inline.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_inline.vm
new file mode 100644
index 0000000..52c4a1e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_inline.vm
@@ -0,0 +1,26 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition"})
+#tiles_putAttribute({"name":"body", "value":$inlineContent.toString()})
+  <div align="center"><b><i>This is an inline content</i></b></div>
+#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_mvel.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_mvel.vm
new file mode 100644
index 0000000..ed9b32f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_mvel.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id: testinsertdefinition_el.vm 782137 2009-06-05 21:18:52Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.composite.mvel.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_ognl.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_ognl.vm
new file mode 100644
index 0000000..b363247
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_ognl.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id: testinsertdefinition_el.vm 782137 2009-06-05 21:18:52Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.composite.ognl.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_old.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_old.vm
new file mode 100644
index 0000000..670146a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_old.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition.old_format"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_openbody.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_openbody.vm
new file mode 100644
index 0000000..04c90e1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_openbody.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.openbody.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_override.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_override.vm
new file mode 100644
index 0000000..7d9f2e7
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_override.vm
@@ -0,0 +1,24 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition"})
+  #tiles_putAttribute({"name":"body", "value":"/velocity/override.vm", "type":"velocity"})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_override_and_not.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_override_and_not.vm
new file mode 100644
index 0000000..b534f4a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_override_and_not.vm
@@ -0,0 +1,28 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+Overridden content:<br/>
+#tiles_insertDefinition({"name":"velocity.test.definition"})
+  #tiles_putAttribute({"name":"body", "value":"/velocity/override.vm", "type":"velocity"})#end
+#end
+<br/>
+Not overridden content:<br/>
+#tiles_insertDefinition({"name":"velocity.test.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_override_template.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_override_template.vm
new file mode 100644
index 0000000..3b0786f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_override_template.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition", "template":"/velocity/layout_override.vm"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_preparer.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_preparer.vm
new file mode 100644
index 0000000..ee13f07
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_preparer.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.preparer.definition", "preparer":"org.apache.tiles.test.preparer.TestViewPreparer"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_preparer_configured.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_preparer_configured.vm
new file mode 100644
index 0000000..61a162f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_preparer_configured.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.preparer.definition.configured"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_regexp.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_regexp.vm
new file mode 100644
index 0000000..45401b8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_regexp.vm
@@ -0,0 +1,24 @@
+#*
+ * $Id: testinsertdefinition_wildcard.vm 782137 2009-06-05 21:18:52Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+$tiles.setCurrentContainer("alternate")
+#tiles_insertDefinition({"name":"velocity.test.regexp.definitionOne.messageHello"})#end
+#tiles_insertDefinition({"name":"velocity.test.regexp.definitionTwo.messageBye"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_reversed.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_reversed.vm
new file mode 100644
index 0000000..72053ca
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_reversed.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.reversed.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_role.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_role.vm
new file mode 100644
index 0000000..42015d5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_role.vm
@@ -0,0 +1,23 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition.appears.configured"})#end
+#tiles_insertDefinition({"name":"velocity.test.definition.does_not_appear.configured"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_role_tag.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_role_tag.vm
new file mode 100644
index 0000000..e29434c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_role_tag.vm
@@ -0,0 +1,23 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.definition.appears", "role":"goodrole"})#end
+#tiles_insertDefinition({"name":"velocity.test.definition.does_not_appear", "role":"badrole"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_wildcard.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_wildcard.vm
new file mode 100644
index 0000000..955e7d5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertdefinition_wildcard.vm
@@ -0,0 +1,24 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+$tiles.setCurrentContainer("alternate")
+#tiles_insertDefinition({"name":"velocity.test.definitionOne.messageHello"})#end
+#tiles_insertDefinition({"name":"velocity.test.definitionTwo.messageBye"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnesteddefinition.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnesteddefinition.vm
new file mode 100644
index 0000000..62b8d7b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnesteddefinition.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.nesting.definitions"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnesteddefinition_tags.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnesteddefinition_tags.vm
new file mode 100644
index 0000000..4dc3b0b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnesteddefinition_tags.vm
@@ -0,0 +1,33 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"test.nesting.definitions.tags", "template":"/velocity/layout.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is the title."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putAttribute({"name":"body"})
+        #tiles_definition({"template":"/velocity/layout.vm"})
+            #tiles_putAttribute({"name":"title", "value":"This is a nested definition."})#end
+            #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+            #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+        #end
+    #end
+#end
+#tiles_insertDefinition({"name":"test.nesting.definitions.tags"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnestedlistdefinition.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnestedlistdefinition.vm
new file mode 100644
index 0000000..1b0495b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnestedlistdefinition.vm
@@ -0,0 +1,22 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.nesting.list.definitions"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnestedlistdefinition_tags.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnestedlistdefinition_tags.vm
new file mode 100644
index 0000000..4a5fa97
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testinsertnestedlistdefinition_tags.vm
@@ -0,0 +1,35 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_definition({"name":"test.nesting.definitions.tags", "template":"/velocity/layout_list.vm"})
+    #tiles_putAttribute({"name":"title", "value":"This is the title."})#end
+    #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+    #tiles_putListAttribute({"name":"list"})
+        #tiles_addAttribute({})
+	        #tiles_definition({"template":"/velocity/layout.vm"})
+	            #tiles_putAttribute({"name":"title", "value":"This is a nested definition."})#end
+	            #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+	            #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+	        #end
+        #end
+    #end
+#end
+#tiles_insertDefinition({"name":"test.nesting.definitions.tags"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput.vm
new file mode 100644
index 0000000..5e6b957
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput.vm
@@ -0,0 +1,26 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertTemplate({"template":"/velocity/layout.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_cascaded.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_cascaded.vm
new file mode 100644
index 0000000..67c52bd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_cascaded.vm
@@ -0,0 +1,26 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertTemplate({"template":"/velocity/layout.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title.", "cascade":true})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity", "cascade":true})#end
+  #tiles_putAttribute({"name":"body", "value":"test.inner.cascadable.definition"})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_cascaded_overridden.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_cascaded_overridden.vm
new file mode 100644
index 0000000..53f4157
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_cascaded_overridden.vm
@@ -0,0 +1,26 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertTemplate({"template":"/velocity/layout.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title.", "cascade":true})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/alternate-header.vm", "type":"velocity", "cascade":true})#end
+  #tiles_putAttribute({"name":"body", "value":"test.inner.definition"})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_cascaded_template.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_cascaded_template.vm
new file mode 100644
index 0000000..0d1dcd9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_cascaded_template.vm
@@ -0,0 +1,26 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertTemplate({"template":"/velocity/layout.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title.", "cascade":true})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity", "cascade":true})#end
+  #tiles_putAttribute({"name":"body", "value":"/velocity/layout_nobody.vm", "type":"velocity"})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_el.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_el.vm
new file mode 100644
index 0000000..9d6cf55
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_el.vm
@@ -0,0 +1,28 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#set($bodyContent="Body Content defined by and el")
+
+#tiles_insertTemplate({"template":"/velocity/layout.vm"})
+  #tiles_putAttribute({"name":"title",  "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body",   "value":$bodyContent})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_el_singleeval.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_el_singleeval.vm
new file mode 100644
index 0000000..c79d2d6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_el_singleeval.vm
@@ -0,0 +1,29 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#set($doNotShowBody="$" + "{" + "requestScope.doNotShow}")
+#set($doNotShow="DO NOT SHOW!!!")
+
+#tiles_insertTemplate({"template":"/velocity/layout.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body", "value":$doNotShowBody})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_flush.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_flush.vm
new file mode 100644
index 0000000..4d418df
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_flush.vm
@@ -0,0 +1,26 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertTemplate({"template":"/velocity/layout.vm", "flush":true})
+  #tiles_putAttribute({"name":"title",  "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body",   "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_reversed.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_reversed.vm
new file mode 100644
index 0000000..2f8ea27
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_reversed.vm
@@ -0,0 +1,26 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertTemplate({"template":"/velocity/layout_alt_title.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title.", "type":"reversed"})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_servlet.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_servlet.vm
new file mode 100644
index 0000000..9eeef1be
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testput_servlet.vm
@@ -0,0 +1,26 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertTemplate({"template":"/servlets/layoutServlet"})
+  #tiles_putAttribute({"name":"title",  "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body",   "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testputlist.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testputlist.vm
new file mode 100644
index 0000000..fa8abab
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testputlist.vm
@@ -0,0 +1,29 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertTemplate({"template":"/velocity/putattributeslayout.vm"})
+  #tiles_putAttribute({"name":"stringTest", "value":"This is a string", "type":"string"})#end
+  #tiles_putListAttribute({"name":"list"})
+    #tiles_addAttribute({"value":"valueOne", "type":"string"})#end
+    #tiles_addAttribute({"value":"valueTwo", "type":"string"})#end
+    #tiles_addAttribute({"value":"valueThree", "type":"string"})#end
+  #end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testputlist_cascaded.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testputlist_cascaded.vm
new file mode 100644
index 0000000..9810479
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testputlist_cascaded.vm
@@ -0,0 +1,32 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertTemplate({"template":"/velocity/layout.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body", "value":"/velocity/putattributeslayout.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"stringTest", "value":"This is a string", "type":"string", "cascade":true})#end
+  #tiles_putListAttribute({"name":"list", "cascade":true})
+    #tiles_addAttribute({"value":"valueOne", "type":"string"})#end
+    #tiles_addAttribute({"value":"valueTwo", "type":"string"})#end
+    #tiles_addAttribute({"value":"valueThree", "type":"string"})#end
+  #end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testputlist_inherit.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testputlist_inherit.vm
new file mode 100644
index 0000000..d340d52
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testputlist_inherit.vm
@@ -0,0 +1,26 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+#tiles_insertDefinition({"name":"velocity.test.putAttributes"})
+  #tiles_putListAttribute({"name":"list", "inherit":true})
+    #tiles_addAttribute({"value":"valueFour", "type":"string"})#end
+  #end
+#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testsetcurrentcontainer.vm b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testsetcurrentcontainer.vm
new file mode 100644
index 0000000..6d99a45
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/main/webapp/velocity/testsetcurrentcontainer.vm
@@ -0,0 +1,25 @@
+#*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *#
+$tiles.setCurrentContainer("alternate")
+#tiles_insertDefinition({"name":"velocity.test.definition"})#end
+$tiles.setCurrentContainer(null)
+#tiles_insertDefinition({"name":"velocity.test.definition"})#end
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/site/site.xml b/TILES_3_0_X/tiles-test-pom/tiles-test/src/site/site.xml
new file mode 100644
index 0000000..d78cbc1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Test web application">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html
new file mode 100644
index 0000000..8e55425
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Configured Definition with no Type Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Configured Definition with no Type Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags without types</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerConfiguredDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerConfiguredDefinitionTest.html
new file mode 100644
index 0000000..14bd1ec
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerConfiguredDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Configured Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerDefinitionNoTypeTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerDefinitionNoTypeTest.html
new file mode 100644
index 0000000..68514e9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerDefinitionNoTypeTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Configured Definition with no Type Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Configured Definition with no Type Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Definition that contains another definition inside using JSP tags without types</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an inner definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerDefinitionTest.html
new file mode 100644
index 0000000..1a257b5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/CompositeDefinitionWithInnerDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Definition that contains another definition inside using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an inner definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredCompositeDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredCompositeDefinitionTest.html
new file mode 100644
index 0000000..fb58cfd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredCompositeDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Composite Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+w<tr><td rowspan="1" colspan="3">Configured Composite Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition that contains another definition inside</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionAttributePreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionAttributePreparerTest.html
new file mode 100644
index 0000000..89c60d6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionAttributePreparerTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Attribute Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Attribute Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Attribute Preparer</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the AttributeViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionAttributeRolesTagsTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionAttributeRolesTagsTest.html
new file mode 100644
index 0000000..373529a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionAttributeRolesTagsTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Attribute Roles Tags Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Attribute Roles Tags Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Attribute that have Roles in Tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionAttributeRolesTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionAttributeRolesTest.html
new file mode 100644
index 0000000..f365b11
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionAttributeRolesTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Attribute Roles Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Attribute Roles Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Attribute that have Roles</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedListTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedListTest.html
new file mode 100644
index 0000000..e7804f0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedListTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded List Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded List Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Cascaded Definition with List</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>Single attribute "stringTest" value: This is a string </td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>valueOne</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>valueTwo</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>valueThree</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedOverriddenTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedOverriddenTest.html
new file mode 100644
index 0000000..abf00c0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedOverriddenTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded Overridden Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded Overridden Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Cascaded Definition with Override</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a configured inner definition.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedTemplateTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedTemplateTest.html
new file mode 100644
index 0000000..c6c540e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedTemplateTest.html
@@ -0,0 +1,56 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded Template Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Cascaded Definition with Template</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedTest.html
new file mode 100644
index 0000000..ca90ae5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionCascadedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Cascaded Definition</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionDbTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionDbTest.html
new file mode 100644
index 0000000..6ce38e3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionDbTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Db Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Db Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition from DB</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionDefaultValuesTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionDefaultValuesTest.html
new file mode 100644
index 0000000..6c976a1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionDefaultValuesTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Default Values Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Default Values Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Default Values</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the alternate header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the default body in the tag.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionELSingleEvalTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionELSingleEvalTest.html
new file mode 100644
index 0000000..c2d88bf
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionELSingleEvalTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition EL with Single Evaluation Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition EL with Single Evaluation Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with EL to test Single Evaluation</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>${requestScope.doNotShow}</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionELTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionELTest.html
new file mode 100644
index 0000000..f7cbbfa
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionELTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition EL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition EL Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with EL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html
new file mode 100644
index 0000000..153a1c5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html
@@ -0,0 +1,51 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Exception Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with an exception in an attribute page</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionExtendedDbTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionExtendedDbTest.html
new file mode 100644
index 0000000..ecdc699
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionExtendedDbTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Extended Db Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Extended Db Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Extended Configured Definition from DB</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an extended definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionFlushTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionFlushTest.html
new file mode 100644
index 0000000..42d2ef6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionFlushTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Flush Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Flush Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Flush</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html
new file mode 100644
index 0000000..91d31f2
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionFreeMarkerTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Test with FreeMarker</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Test with FreeMarker</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with FreeMarker</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This layout is made in FreeMarker.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionFromClasspathTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionFromClasspathTest.html
new file mode 100644
index 0000000..57ffee9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionFromClasspathTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition from Classpath Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition from Classpath Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Classpath Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This tile was loaded from the classpath</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionIgnoreTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionIgnoreTest.html
new file mode 100644
index 0000000..49c45b3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionIgnoreTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Ignore Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Ignore Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Ignore</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionInlineTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionInlineTest.html
new file mode 100644
index 0000000..06bbe4e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionInlineTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Inline Content Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Inline Content Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with an inline content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an inline content</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionMVELTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionMVELTest.html
new file mode 100644
index 0000000..c0eaaeb
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionMVELTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition MVEL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition MVEL Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with MVEL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOGNLTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOGNLTest.html
new file mode 100644
index 0000000..ba2b2d7
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOGNLTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition OGNL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition OGNL Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with OGNL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOldFormatTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOldFormatTest.html
new file mode 100644
index 0000000..0137c01
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOldFormatTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Old Format Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Old Format Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition in Old Format</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a definition configured in 1.1 format.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOpenBodyTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOpenBodyTest.html
new file mode 100644
index 0000000..7441fb6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOpenBodyTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Open BodyTest</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Open Body Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Open Body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a customized context</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOverrideAndNotTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOverrideAndNotTest.html
new file mode 100644
index 0000000..1a79c50
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOverrideAndNotTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Overridden Content Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Overridden and Original Content Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with an overridden content and one with original content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an overridden content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOverrideTemplateTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOverrideTemplateTest.html
new file mode 100644
index 0000000..4bd5430
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOverrideTemplateTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Overridden Template Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Overridden Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with an overridden template</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the overridden template.</td>
+    <td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOverrideTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOverrideTest.html
new file mode 100644
index 0000000..944d451
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionOverrideTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Overridden Content Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Overridden Content Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with an overridden content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an overridden content</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionRegexpTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionRegexpTest.html
new file mode 100644
index 0000000..88efc4e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionRegexpTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Regular Expression Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Regular Expression Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Regular Expression</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout one.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout two.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Hello.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Bye.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionReversedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionReversedTest.html
new file mode 100644
index 0000000..659bf10
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionReversedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Reversed Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Reversed Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Reversed Attribute</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>.eltit eht si sihT</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionRoleTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionRoleTagTest.html
new file mode 100644
index 0000000..3fcfbdf
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionRoleTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Role Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Role Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Specified Role in Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition appears.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This definition does not appear.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionRoleTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionRoleTest.html
new file mode 100644
index 0000000..1a2a9b0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionRoleTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Role Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Role Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Specified Role</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition appears.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This definition does not appear.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionTest.html
new file mode 100644
index 0000000..598178c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionWildcardTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionWildcardTest.html
new file mode 100644
index 0000000..f6e1faa
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionWildcardTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Wildcard Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Wildcard Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Wildcards</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout one.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout two.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Hello.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Bye.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionWithConfiguredPreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionWithConfiguredPreparerTest.html
new file mode 100644
index 0000000..2859c00
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionWithConfiguredPreparerTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Configured Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Configured Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Preparer configured in the definition itself</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the ViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionWithPreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionWithPreparerTest.html
new file mode 100644
index 0000000..a637a66
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredDefinitionWithPreparerTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Configured Definition with Preparer</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the ViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html
new file mode 100644
index 0000000..7bad1d0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Nested Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Nested Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Nested Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredNestedListDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredNestedListDefinitionTest.html
new file mode 100644
index 0000000..a24203b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ConfiguredNestedListDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Nested List Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Nested List Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Nested List Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagExtendTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagExtendTest.html
new file mode 100644
index 0000000..1fb5964
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagExtendTest.html
@@ -0,0 +1,60 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag Extend Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+    <td>clickAndWait</td>
+    <td>link=Test Definition Tag extending configured and custom definitions</td>
+    <td></td>
+    </tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is an overridden title</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is an overridden content</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagListInheritTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagListInheritTest.html
new file mode 100644
index 0000000..3d6f0b0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagListInheritTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag List Inherit Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag List Inherit Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Definition Tag with a List Inherit</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueFour</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagPreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagPreparerTest.html
new file mode 100644
index 0000000..21bada2
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagPreparerTest.html
@@ -0,0 +1,62 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag with Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag with Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Definition Tag with Preparer</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the ViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagTest.html
new file mode 100644
index 0000000..916f126
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/DefinitionTagTest.html
@@ -0,0 +1,60 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+    <td>clickAndWait</td>
+    <td>link=Test Definition Tag</td>
+    <td></td>
+    </tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ImportAttributeTagAllTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ImportAttributeTagAllTest.html
new file mode 100644
index 0000000..33be775
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ImportAttributeTagAllTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Import Attribute Tag with no Name Specified Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Import Attribute Tag with no Name Specified Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test importAttribute Tag with no name</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>One</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Two</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Three </td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ImportAttributeTagInheritTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ImportAttributeTagInheritTest.html
new file mode 100644
index 0000000..dea2009
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ImportAttributeTagInheritTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Import Attribute Tag Inherit Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Import Attribute Tag Inherit Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test importAttribute Tag with List Inherit</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueFour</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ImportAttributeTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ImportAttributeTagTest.html
new file mode 100644
index 0000000..d93a563
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/ImportAttributeTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Import Attribute Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Import Attribute Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test importAttribute Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/LocalizationDbTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/LocalizationDbTest.html
new file mode 100644
index 0000000..00e1d6f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/LocalizationDbTest.html
@@ -0,0 +1,141 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Localization Db Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Localization Db Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Localization from DB</td>
+	<td></td>
+</tr>
+<tr>
+	<td>storeText</td>
+	<td>defaultLocaleMessage</td>
+	<td>localeMessage</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertText</td>
+	<td>defaultLocaleMessage</td>
+	<td>${localeMessage}</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=American English</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>American English locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=British English</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>British English locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=French</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>French locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=Italian</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Italian locale</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/LocalizationTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/LocalizationTest.html
new file mode 100644
index 0000000..ca7eda1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/LocalizationTest.html
@@ -0,0 +1,141 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Localization Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Localization</td>
+	<td></td>
+</tr>
+<tr>
+	<td>storeText</td>
+	<td>defaultLocaleMessage</td>
+	<td>localeMessage</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertText</td>
+	<td>defaultLocaleMessage</td>
+	<td>${localeMessage}</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=American English</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>American English locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=British English</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>British English locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=French</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>French locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=Italian</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Italian locale</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutListCascadedTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutListCascadedTagTest.html
new file mode 100644
index 0000000..a222e04
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutListCascadedTagTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put List Cascaded Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put List Cascaded Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put List Cascaded Tag</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutListTagInheritTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutListTagInheritTest.html
new file mode 100644
index 0000000..2dcd63a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutListTagInheritTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put List Tag Inherit Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put List Tag Inherit Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put List Tag with Inherit</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueFour</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutListTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutListTagTest.html
new file mode 100644
index 0000000..b8dc086
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutListTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put List Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put List Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagCascadedOverriddenTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagCascadedOverriddenTest.html
new file mode 100644
index 0000000..3e8816b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagCascadedOverriddenTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Cascaded Overridden Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Cascaded Overridden Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put Tag with Overridden Cascaded Attributes</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a configured inner definition.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagCascadedTemplateTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagCascadedTemplateTest.html
new file mode 100644
index 0000000..b629fb9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagCascadedTemplateTest.html
@@ -0,0 +1,56 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Cascaded Template Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Cascaded Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put Tag with Cascaded Attributes and Template</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagCascadedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagCascadedTest.html
new file mode 100644
index 0000000..ed6059e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagCascadedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Cascaded Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Cascaded Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put Tag with Cascaded Attributes</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagFlushTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagFlushTest.html
new file mode 100644
index 0000000..40857c1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagFlushTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Flush Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Flush Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put Tag with Flush</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html
new file mode 100644
index 0000000..3318511
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Nested Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Nested Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Nested Definition only using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagNestedListDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagNestedListDefinitionTest.html
new file mode 100644
index 0000000..2f89f81
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagNestedListDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Nested List Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Nested List Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Insert Nested List Definition only using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagReversedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagReversedTest.html
new file mode 100644
index 0000000..7970044
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagReversedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Reversed Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Reversed Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put Tag with Reversed Attribute</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>.eltit eht si sihT</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagTest.html
new file mode 100644
index 0000000..dd4a2a4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagWithELSingleEvalTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagWithELSingleEvalTest.html
new file mode 100644
index 0000000..845eee9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagWithELSingleEvalTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag using EL with Single Evaluation Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag using EL with Single Evaluation Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put Tag using EL to test Single Evaluation</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>${requestScope.doNotShow}</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagWithELTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagWithELTest.html
new file mode 100644
index 0000000..bad3e6e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagWithELTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag using EL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put Tag using EL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Body Content defined by and el</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagWithServletTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagWithServletTest.html
new file mode 100644
index 0000000..e5a443f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/PutTagWithServletTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Servlet as Template Test</title>
+</head>
+w<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Servlet as Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Put Tag using a servlet mapping as a template</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/SetCurrentContainerTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/SetCurrentContainerTagTest.html
new file mode 100644
index 0000000..7624163
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/SetCurrentContainerTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>setCurrentContainer Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">setCurrentContainer Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test setCurrentContainer Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition is from an alternate container.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/TestSuite.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/TestSuite.html
new file mode 100644
index 0000000..1e2acb8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/TestSuite.html
@@ -0,0 +1,629 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<body>
+
+<table>
+    <tr>
+        <td>Tiles 2 Tests</td>
+    </tr>
+    <tr>
+        <td><a href="WelcomePageTest.html">Welcome Page Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionTest.html">Configured Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionIgnoreTest.html">Configured Definition with Ignore Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionFlushTest.html">Configured Definition with Flush Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionFreeMarkerTest.html">Configured Definition with FreeMarker Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionWithPreparerTest.html">Configured Definition with Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionWithConfiguredPreparerTest.html">Configured Definition with Configured Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionFromClasspathTest.html">Configured Definition from Classpath Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionOverrideTest.html">Configured Definition with Overridden Content Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionOverrideTemplateTest.html">Configured Definition with Overridden Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionOverrideAndNotTest.html">Configured Definition with Overridden and Original Content Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionInlineTest.html">Configured Definition with Inline Content Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredCompositeDefinitionTest.html">Configured Composite Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionExceptionTest.html">Configured Definition with Exception Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionOldFormatTest.html">Configured Definition Old Format Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionCascadedTest.html">Configured Definition Cascaded Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionCascadedOverriddenTest.html">Configured Definition Cascaded Overridden Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionCascadedTemplateTest.html">Configured Definition Cascaded Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionCascadedListTest.html">Configured Definition Cascaded List Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionReversedTest.html">Configured Definition Reversed Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionAttributePreparerTest.html">Configured Definition Attribute Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredNestedDefinitionTest.html">Configured Nested Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredNestedListDefinitionTest.html">Configured Nested List Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionELTest.html">Configured Definition EL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionMVELTest.html">Configured Definition MVEL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionOGNLTest.html">Configured Definition OGNL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionELSingleEvalTest.html">Configured Definition EL with Single Evaluation Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionOpenBodyTest.html">Configured Definition with Open Body Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionDefaultValuesTest.html">Configured Definition with Default Values Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionWildcardTest.html">Configured Definition Wildcard Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionRegexpTest.html">Configured Definition Regular Expression Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagTest.html">Put Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagFlushTest.html">Put Tag with Flush Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagWithELTest.html">Put Tag using EL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagWithELSingleEvalTest.html">Put Tag using EL with Single Evaluation Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagWithServletTest.html">Put Tag with Servlet as Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagCascadedTest.html">Put Tag Cascaded Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagCascadedOverriddenTest.html">Put Tag Cascaded Overridden Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagCascadedTemplateTest.html">Put Tag Cascaded Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagReversedTest.html">Put Tag Reversed Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagNestedDefinitionTest.html">Put Tag with Nested Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagNestedListDefinitionTest.html">Put Tag with Nested List Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutListTagTest.html">Put List Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutListCascadedTagTest.html">Put List Cascaded Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutListTagInheritTest.html">Put List Tag Inherit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="LocalizationTest.html">Localization Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ImportAttributeTagTest.html">Import Attribute Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ImportAttributeTagAllTest.html">Import Attribute Tag with no Name Specified Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ImportAttributeTagInheritTest.html">Import Attribute Tag Inherit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="TilesDefinitionFilterTest.html">Tiles Definition Filter Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="TilesDispatchServletTest.html">Tiles Dispatch Servlet Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="SetCurrentContainerTagTest.html">setCurrentContainer Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="DefinitionTagTest.html">Definition Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="DefinitionTagExtendTest.html">Definition Tag Extend Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="DefinitionTagListInheritTest.html">Definition Tag List Inherit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="DefinitionTagPreparerTest.html">Definition Tag with Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="CompositeDefinitionWithInnerConfiguredDefinitionTest.html">Composite Definition with inner Configured Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="CompositeDefinitionWithInnerDefinitionTest.html">Composite Definition with inner Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html">Composite Definition with inner Configured Definition with no Type Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="CompositeDefinitionWithInnerDefinitionNoTypeTest.html">Composite Definition with inner Definition with no Type Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionRoleTest.html">Configured Definition Role Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionRoleTagTest.html">Configured Definition Role Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionAttributeRolesTest.html">Configured Definition Attribute Roles Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionAttributeRolesTagsTest.html">Configured Definition Attribute Roles Tags Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionDbTest.html">Configured Definition Db Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="ConfiguredDefinitionExtendedDbTest.html">Configured Definition Extended Db Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="LocalizationDbTest.html">Localization Db Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/WelcomePageTest.html">FreeMarker: Welcome Page Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionTest.html">FreeMarker: Configured Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionIgnoreTest.html">FreeMarker: Configured Definition with Ignore Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionFlushTest.html">FreeMarker: Configured Definition with Flush Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionWithPreparerTest.html">FreeMarker: Configured Definition with Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionWithConfiguredPreparerTest.html">FreeMarker: Configured Definition with Configured Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionFromClasspathTest.html">FreeMarker: Configured Definition from Classpath Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionOverrideTest.html">FreeMarker: Configured Definition with Overridden Content Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionOverrideTemplateTest.html">FreeMarker: Configured Definition with Overridden Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionOverrideAndNotTest.html">FreeMarker: Configured Definition with Overridden and Original Content Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionInlineTest.html">FreeMarker: Configured Definition with Inline Content Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredCompositeDefinitionTest.html">FreeMarker: Configured Composite Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionExceptionTest.html">FreeMarker: Configured Definition with Exception Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionOldFormatTest.html">FreeMarker: Configured Definition Old Format Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionCascadedTest.html">FreeMarker: Configured Definition Cascaded Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionCascadedOverriddenTest.html">FreeMarker: Configured Definition Cascaded Overridden Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionCascadedTemplateTest.html">FreeMarker: Configured Definition Cascaded Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionCascadedListTest.html">FreeMarker: Configured Definition Cascaded List Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionReversedTest.html">FreeMarker: Configured Definition Reversed Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionAttributePreparerTest.html">FreeMarker: Configured Definition Attribute Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredNestedDefinitionTest.html">FreeMarker: Configured Nested Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredNestedListDefinitionTest.html">FreeMarker: Configured Nested List Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionELTest.html">FreeMarker: Configured Definition EL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionMVELTest.html">FreeMarker: Configured Definition MVEL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionOGNLTest.html">FreeMarker: Configured Definition OGNL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionELSingleEvalTest.html">FreeMarker: Configured Definition EL with Single Evaluation Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionOpenBodyTest.html">FreeMarker: Configured Definition with Open Body Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionDefaultValuesTest.html">FreeMarker: Configured Definition with Default Values Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionWildcardTest.html">FreeMarker: Configured Definition Wildcard Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionRegexpTest.html">FreeMarker: Configured Definition Regular Expression Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagTest.html">FreeMarker: Put Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagFlushTest.html">FreeMarker: Put Tag with Flush Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagWithELTest.html">FreeMarker: Put Tag using EL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagWithELSingleEvalTest.html">FreeMarker: Put Tag using EL with Single Evaluation Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagWithServletTest.html">FreeMarker: Put Tag with Servlet as Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagCascadedTest.html">FreeMarker: Put Tag Cascaded Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagCascadedOverriddenTest.html">FreeMarker: Put Tag Cascaded Overridden Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagCascadedTemplateTest.html">FreeMarker: Put Tag Cascaded Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagReversedTest.html">FreeMarker: Put Tag Reversed Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagNestedDefinitionTest.html">FreeMarker: Put Tag with Nested Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutTagNestedListDefinitionTest.html">FreeMarker: Put Tag with Nested List Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutListTagTest.html">FreeMarker: Put List Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutListCascadedTagTest.html">FreeMarker: Put List Cascaded Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/PutListTagInheritTest.html">FreeMarker: Put List Tag Inherit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/LocalizationTest.html">FreeMarker: Localization Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ImportAttributeTagTest.html">FreeMarker: Import Attribute Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ImportAttributeTagAllTest.html">FreeMarker: Import Attribute Tag with no Name Specified Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ImportAttributeTagInheritTest.html">FreeMarker: Import Attribute Tag Inherit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/TilesDefinitionFilterTest.html">FreeMarker: Tiles Definition Filter Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/TilesDispatchServletTest.html">FreeMarker: Tiles Dispatch Servlet Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/SetCurrentContainerTagTest.html">FreeMarker: setCurrentContainer Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/DefinitionTagTest.html">FreeMarker: Definition Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/DefinitionTagExtendTest.html">FreeMarker: Definition Tag Extend Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/DefinitionTagListInheritTest.html">FreeMarker: Definition Tag List Inherit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/DefinitionTagPreparerTest.html">FreeMarker: Definition Tag with Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/CompositeDefinitionWithInnerConfiguredDefinitionTest.html">FreeMarker: Composite Definition with inner Configured Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/CompositeDefinitionWithInnerDefinitionTest.html">FreeMarker: Composite Definition with inner Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html">FreeMarker: Composite Definition with inner Configured Definition with no Type Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/CompositeDefinitionWithInnerDefinitionNoTypeTest.html">FreeMarker: Composite Definition with inner Definition with no Type Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionRoleTest.html">FreeMarker: Configured Definition Role Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionRoleTagTest.html">FreeMarker: Configured Definition Role Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionAttributeRolesTest.html">FreeMarker: Configured Definition Attribute Roles Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionAttributeRolesTagsTest.html">FreeMarker: Configured Definition Attribute Roles Tags Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionDbTest.html">FreeMarker: Configured Definition Db Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionExtendedDbTest.html">FreeMarker: Configured Definition Extended Db Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="freemarker/ConfiguredDefinitionInModuleTest.html">FreeMarker: Configured Definition in Module Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/WelcomePageTest.html">Velocity: Welcome Page Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionTest.html">Velocity: Configured Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionIgnoreTest.html">Velocity: Configured Definition with Ignore Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionFlushTest.html">Velocity: Configured Definition with Flush Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionWithPreparerTest.html">Velocity: Configured Definition with Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionWithConfiguredPreparerTest.html">Velocity: Configured Definition with Configured Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionFromClasspathTest.html">Velocity: Configured Definition from Classpath Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionOverrideTest.html">Velocity: Configured Definition with Overridden Content Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionOverrideTemplateTest.html">Velocity: Configured Definition with Overridden Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionOverrideAndNotTest.html">Velocity: Configured Definition with Overridden and Original Content Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionInlineTest.html">Velocity: Configured Definition with Inline Content Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredCompositeDefinitionTest.html">Velocity: Configured Composite Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionExceptionTest.html">Velocity: Configured Definition with Exception Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionOldFormatTest.html">Velocity: Configured Definition Old Format Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionCascadedTest.html">Velocity: Configured Definition Cascaded Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionCascadedOverriddenTest.html">Velocity: Configured Definition Cascaded Overridden Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionCascadedTemplateTest.html">Velocity: Configured Definition Cascaded Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionCascadedListTest.html">Velocity: Configured Definition Cascaded List Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionReversedTest.html">Velocity: Configured Definition Reversed Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionAttributePreparerTest.html">Velocity: Configured Definition Attribute Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredNestedDefinitionTest.html">Velocity: Configured Nested Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredNestedListDefinitionTest.html">Velocity: Configured Nested List Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionELTest.html">Velocity: Configured Definition EL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionMVELTest.html">Velocity: Configured Definition MVEL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionOGNLTest.html">Velocity: Configured Definition OGNL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionELSingleEvalTest.html">Velocity: Configured Definition EL with Single Evaluation Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionOpenBodyTest.html">Velocity: Configured Definition with Open Body Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionDefaultValuesTest.html">Velocity: Configured Definition with Default Values Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionWildcardTest.html">Velocity: Configured Definition Wildcard Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionRegexpTest.html">Velocity: Configured Definition Regular Expression Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagTest.html">Velocity: Put Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagFlushTest.html">Velocity: Put Tag with Flush Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagWithELTest.html">Velocity: Put Tag using EL Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagWithELSingleEvalTest.html">Velocity: Put Tag using EL with Single Evaluation Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagWithServletTest.html">Velocity: Put Tag with Servlet as Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagCascadedTest.html">Velocity: Put Tag Cascaded Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagCascadedOverriddenTest.html">Velocity: Put Tag Cascaded Overridden Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagCascadedTemplateTest.html">Velocity: Put Tag Cascaded Template Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagReversedTest.html">Velocity: Put Tag Reversed Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagNestedDefinitionTest.html">Velocity: Put Tag with Nested Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutTagNestedListDefinitionTest.html">Velocity: Put Tag with Nested List Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutListTagTest.html">Velocity: Put List Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutListCascadedTagTest.html">Velocity: Put List Cascaded Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/PutListTagInheritTest.html">Velocity: Put List Tag Inherit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/LocalizationTest.html">Velocity: Localization Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ImportAttributeTagTest.html">Velocity: Import Attribute Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ImportAttributeTagAllTest.html">Velocity: Import Attribute Tag with no Name Specified Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ImportAttributeTagInheritTest.html">Velocity: Import Attribute Tag Inherit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/TilesDefinitionFilterTest.html">Velocity: Tiles Definition Filter Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/TilesDispatchServletTest.html">Velocity: Tiles Dispatch Servlet Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/SetCurrentContainerTagTest.html">Velocity: setCurrentContainer Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/DefinitionTagTest.html">Velocity: Definition Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/DefinitionTagExtendTest.html">Velocity: Definition Tag Extend Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/DefinitionTagListInheritTest.html">Velocity: Definition Tag List Inherit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/DefinitionTagPreparerTest.html">Velocity: Definition Tag with Preparer Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/CompositeDefinitionWithInnerConfiguredDefinitionTest.html">Velocity: Composite Definition with inner Configured Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/CompositeDefinitionWithInnerDefinitionTest.html">Velocity: Composite Definition with inner Definition Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html">Velocity: Composite Definition with inner Configured Definition with no Type Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/CompositeDefinitionWithInnerDefinitionNoTypeTest.html">Velocity: Composite Definition with inner Definition with no Type Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionRoleTest.html">Velocity: Configured Definition Role Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionRoleTagTest.html">Velocity: Configured Definition Role Tag Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionAttributeRolesTest.html">Velocity: Configured Definition Attribute Roles Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionAttributeRolesTagsTest.html">Velocity: Configured Definition Attribute Roles Tags Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionDbTest.html">Velocity: Configured Definition Db Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionExtendedDbTest.html">Velocity: Configured Definition Extended Db Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="velocity/ConfiguredDefinitionInModuleTest.html">Velocity: Configured Definition in Module Test</a></td>
+    </tr>
+</table>
+</body>
+</html>
\ No newline at end of file
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/TilesDefinitionFilterTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/TilesDefinitionFilterTest.html
new file mode 100644
index 0000000..3150826
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/TilesDefinitionFilterTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Tiles Definition Filter Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Tiles Definition Filter</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This Content should be wrapped with the standard layout.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/TilesDispatchServletTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/TilesDispatchServletTest.html
new file mode 100644
index 0000000..b30ecfd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/TilesDispatchServletTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Tiles Dispatch Servlet Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Test Tiles Dispatch Servlet</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/WelcomePageTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/WelcomePageTest.html
new file mode 100644
index 0000000..3c257bd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/WelcomePageTest.html
@@ -0,0 +1,50 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Registration Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Welcome Page Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTitle</td>
+	<td>Tiles 2 Test Application</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>Tiles 2 Test Application</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html
new file mode 100644
index 0000000..544560d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Configured Definition with no Type Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Configured Definition with no Type Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags without types</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerConfiguredDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerConfiguredDefinitionTest.html
new file mode 100644
index 0000000..8c8c2d1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerConfiguredDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Configured Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerDefinitionNoTypeTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerDefinitionNoTypeTest.html
new file mode 100644
index 0000000..9d2991c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerDefinitionNoTypeTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Configured Definition with no Type Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Configured Definition with no Type Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Definition that contains another definition inside using JSP tags without types</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an inner definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerDefinitionTest.html
new file mode 100644
index 0000000..8658b5b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/CompositeDefinitionWithInnerDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Definition that contains another definition inside using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an inner definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredCompositeDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredCompositeDefinitionTest.html
new file mode 100644
index 0000000..0a6f2f6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredCompositeDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Composite Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+w<tr><td rowspan="1" colspan="3">Configured Composite Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition that contains another definition inside</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionAttributePreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionAttributePreparerTest.html
new file mode 100644
index 0000000..c3091a0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionAttributePreparerTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Attribute Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Attribute Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Attribute Preparer</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the AttributeViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionAttributeRolesTagsTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionAttributeRolesTagsTest.html
new file mode 100644
index 0000000..2df9c59
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionAttributeRolesTagsTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Attribute Roles Tags Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Attribute Roles Tags Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Attribute that have Roles in Tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionAttributeRolesTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionAttributeRolesTest.html
new file mode 100644
index 0000000..51b0478
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionAttributeRolesTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Attribute Roles Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Attribute Roles Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Attribute that have Roles</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedListTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedListTest.html
new file mode 100644
index 0000000..3e5f3cd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedListTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded List Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded List Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Cascaded Definition with List</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>Single attribute "stringTest" value: This is a string </td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>valueOne</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>valueTwo</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>valueThree</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedOverriddenTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedOverriddenTest.html
new file mode 100644
index 0000000..1ff01cb
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedOverriddenTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded Overridden Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded Overridden Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Cascaded Definition with Override</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a configured inner definition.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedTemplateTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedTemplateTest.html
new file mode 100644
index 0000000..2cc9e75
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedTemplateTest.html
@@ -0,0 +1,56 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded Template Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Cascaded Definition with Template</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedTest.html
new file mode 100644
index 0000000..daaa243
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionCascadedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Cascaded Definition</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionDbTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionDbTest.html
new file mode 100644
index 0000000..0f299eb
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionDbTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Db Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Db Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition from DB</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionDefaultValuesTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionDefaultValuesTest.html
new file mode 100644
index 0000000..5797df3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionDefaultValuesTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Default Values Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Default Values Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Default Values</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the alternate header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the default body in the tag.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionELSingleEvalTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionELSingleEvalTest.html
new file mode 100644
index 0000000..b0c80f6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionELSingleEvalTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition EL with Single Evaluation Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition EL with Single Evaluation Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with EL to test Single Evaluation</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>${requestScope.doNotShow}</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionELTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionELTest.html
new file mode 100644
index 0000000..90510d2
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionELTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition EL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition EL Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with EL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionExceptionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionExceptionTest.html
new file mode 100644
index 0000000..2ba0e43
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionExceptionTest.html
@@ -0,0 +1,51 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Exception Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with an exception in an attribute page</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionExtendedDbTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionExtendedDbTest.html
new file mode 100644
index 0000000..aa5ce9b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionExtendedDbTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Extended Db Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Extended Db Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Extended Configured Definition from DB</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an extended definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionFlushTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionFlushTest.html
new file mode 100644
index 0000000..6f611bc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionFlushTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Flush Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Flush Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Flush</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionFromClasspathTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionFromClasspathTest.html
new file mode 100644
index 0000000..f86f6d9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionFromClasspathTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition from Classpath Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition from Classpath Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Classpath Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This tile was loaded from the classpath</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionIgnoreTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionIgnoreTest.html
new file mode 100644
index 0000000..35e3c6d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionIgnoreTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Ignore Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Ignore Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Ignore</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionInModuleTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionInModuleTest.html
new file mode 100644
index 0000000..91079a4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionInModuleTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition in Module Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition in Module Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition in Module</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition is from an alternate container.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This body is loaded from the "alt" module.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionInlineTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionInlineTest.html
new file mode 100644
index 0000000..13b8ad4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionInlineTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Inline Content Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Inline Content Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with an inline content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an inline content</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionMVELTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionMVELTest.html
new file mode 100644
index 0000000..8928766
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionMVELTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition MVEL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition MVEL Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with MVEL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOGNLTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOGNLTest.html
new file mode 100644
index 0000000..809a809
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOGNLTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition OGNL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition OGNL Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with OGNL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOldFormatTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOldFormatTest.html
new file mode 100644
index 0000000..c285f75
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOldFormatTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Old Format Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Old Format Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition in Old Format</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a definition configured in 1.1 format.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOpenBodyTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOpenBodyTest.html
new file mode 100644
index 0000000..d2ae633
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOpenBodyTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Open BodyTest</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Open Body Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Open Body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a customized context</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOverrideAndNotTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOverrideAndNotTest.html
new file mode 100644
index 0000000..cc33488
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOverrideAndNotTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Overridden Content Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Overridden and Original Content Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with an overridden content and one with original content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an overridden content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOverrideTemplateTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOverrideTemplateTest.html
new file mode 100644
index 0000000..ae3e045
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOverrideTemplateTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Overridden Template Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Overridden Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with an overridden template</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the overridden template.</td>
+    <td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOverrideTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOverrideTest.html
new file mode 100644
index 0000000..1894c74
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionOverrideTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Overridden Content Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Overridden Content Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with an overridden content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an overridden content</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionRegexpTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionRegexpTest.html
new file mode 100644
index 0000000..42757b5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionRegexpTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Regular Expression Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Regular Expression Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Regular Expression</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout one.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout two.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Hello.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Bye.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionReversedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionReversedTest.html
new file mode 100644
index 0000000..e3783f5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionReversedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Reversed Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Reversed Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Reversed Attribute</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>.eltit eht si sihT</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionRoleTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionRoleTagTest.html
new file mode 100644
index 0000000..1eca4c9
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionRoleTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Role Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Role Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Specified Role in Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition appears.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This definition does not appear.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionRoleTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionRoleTest.html
new file mode 100644
index 0000000..0dc25d6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionRoleTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Role Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Role Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Specified Role</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition appears.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This definition does not appear.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionTest.html
new file mode 100644
index 0000000..ff46f29
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionWildcardTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionWildcardTest.html
new file mode 100644
index 0000000..a44871b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionWildcardTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Wildcard Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Wildcard Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Wildcards</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout one.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout two.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Hello.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Bye.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionWithConfiguredPreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionWithConfiguredPreparerTest.html
new file mode 100644
index 0000000..11aa6ac
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionWithConfiguredPreparerTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Configured Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Configured Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Preparer configured in the definition itself</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the ViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionWithPreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionWithPreparerTest.html
new file mode 100644
index 0000000..fcac653
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredDefinitionWithPreparerTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Configured Definition with Preparer</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the ViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredNestedDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredNestedDefinitionTest.html
new file mode 100644
index 0000000..cef86a1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredNestedDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Nested Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Nested Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Nested Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredNestedListDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredNestedListDefinitionTest.html
new file mode 100644
index 0000000..2939c31
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ConfiguredNestedListDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Nested List Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Nested List Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Nested List Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagExtendTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagExtendTest.html
new file mode 100644
index 0000000..7cf6456
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagExtendTest.html
@@ -0,0 +1,60 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag Extend Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+    <td>clickAndWait</td>
+    <td>link=FreeMarker: Test Definition Tag extending configured and custom definitions</td>
+    <td></td>
+    </tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is an overridden title</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is an overridden content</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagListInheritTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagListInheritTest.html
new file mode 100644
index 0000000..aac2a3f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagListInheritTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag List Inherit Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag List Inherit Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Definition Tag with a List Inherit</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueFour</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagPreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagPreparerTest.html
new file mode 100644
index 0000000..41b994e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagPreparerTest.html
@@ -0,0 +1,62 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag with Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag with Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Definition Tag with Preparer</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the ViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagTest.html
new file mode 100644
index 0000000..ebf27cd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/DefinitionTagTest.html
@@ -0,0 +1,60 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+    <td>clickAndWait</td>
+    <td>link=FreeMarker: Test Definition Tag</td>
+    <td></td>
+    </tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ImportAttributeTagAllTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ImportAttributeTagAllTest.html
new file mode 100644
index 0000000..6d7f736
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ImportAttributeTagAllTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Import Attribute Tag with no Name Specified Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Import Attribute Tag with no Name Specified Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test importAttribute Tag with no name</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>One</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Two</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Three </td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ImportAttributeTagInheritTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ImportAttributeTagInheritTest.html
new file mode 100644
index 0000000..3735b84
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ImportAttributeTagInheritTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Import Attribute Tag Inherit Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Import Attribute Tag Inherit Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test importAttribute Tag with List Inherit</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueFour</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ImportAttributeTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ImportAttributeTagTest.html
new file mode 100644
index 0000000..817df6a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/ImportAttributeTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Import Attribute Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Import Attribute Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test importAttribute Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/LocalizationTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/LocalizationTest.html
new file mode 100644
index 0000000..558b755
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/LocalizationTest.html
@@ -0,0 +1,141 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Localization Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Localization</td>
+	<td></td>
+</tr>
+<tr>
+	<td>storeText</td>
+	<td>defaultLocaleMessage</td>
+	<td>localeMessage</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertText</td>
+	<td>defaultLocaleMessage</td>
+	<td>${localeMessage}</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=American English</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>American English locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=British English</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>British English locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=French</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>French locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=Italian</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Italian locale</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutListCascadedTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutListCascadedTagTest.html
new file mode 100644
index 0000000..35bb4df
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutListCascadedTagTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put List Cascaded Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put List Cascaded Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put List Cascaded Tag</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutListTagInheritTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutListTagInheritTest.html
new file mode 100644
index 0000000..59d5444
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutListTagInheritTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put List Tag Inherit Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put List Tag Inherit Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put List Tag with Inherit</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueFour</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutListTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutListTagTest.html
new file mode 100644
index 0000000..696717c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutListTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put List Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put List Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagCascadedOverriddenTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagCascadedOverriddenTest.html
new file mode 100644
index 0000000..f897957
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagCascadedOverriddenTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Cascaded Overridden Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Cascaded Overridden Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put Tag with Overridden Cascaded Attributes</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a configured inner definition.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagCascadedTemplateTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagCascadedTemplateTest.html
new file mode 100644
index 0000000..f176b9c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagCascadedTemplateTest.html
@@ -0,0 +1,56 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Cascaded Template Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Cascaded Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put Tag with Cascaded Attributes and Template</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagCascadedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagCascadedTest.html
new file mode 100644
index 0000000..cfbc758
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagCascadedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Cascaded Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Cascaded Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put Tag with Cascaded Attributes</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagFlushTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagFlushTest.html
new file mode 100644
index 0000000..326b407
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagFlushTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Flush Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Flush Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put Tag with Flush</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagNestedDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagNestedDefinitionTest.html
new file mode 100644
index 0000000..50880ad
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagNestedDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Nested Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Nested Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Nested Definition only using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagNestedListDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagNestedListDefinitionTest.html
new file mode 100644
index 0000000..41a73d6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagNestedListDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Nested List Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Nested List Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Insert Nested List Definition only using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagReversedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagReversedTest.html
new file mode 100644
index 0000000..0281527
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagReversedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Reversed Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Reversed Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put Tag with Reversed Attribute</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>.eltit eht si sihT</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagTest.html
new file mode 100644
index 0000000..64804f0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagWithELSingleEvalTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagWithELSingleEvalTest.html
new file mode 100644
index 0000000..229f04f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagWithELSingleEvalTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag using EL with Single Evaluation Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag using EL with Single Evaluation Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put Tag using EL to test Single Evaluation</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>${requestScope.doNotShow}</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagWithELTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagWithELTest.html
new file mode 100644
index 0000000..239bc70
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagWithELTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag using EL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put Tag using EL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Body Content defined by and el</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagWithServletTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagWithServletTest.html
new file mode 100644
index 0000000..26988b3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/PutTagWithServletTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Servlet as Template Test</title>
+</head>
+w<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Servlet as Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Put Tag using a servlet mapping as a template</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/SetCurrentContainerTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/SetCurrentContainerTagTest.html
new file mode 100644
index 0000000..f34e709
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/SetCurrentContainerTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>setCurrentContainer Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">setCurrentContainer Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test setCurrentContainer Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition is from an alternate container.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/TilesDefinitionFilterTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/TilesDefinitionFilterTest.html
new file mode 100644
index 0000000..57f90bb
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/TilesDefinitionFilterTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Tiles Definition Filter Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Tiles Definition Filter</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This Content should be wrapped with the standard layout.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/TilesDispatchServletTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/TilesDispatchServletTest.html
new file mode 100644
index 0000000..c5b07cc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/TilesDispatchServletTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Tiles Dispatch Servlet Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=FreeMarker: Test Tiles Dispatch Servlet</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/WelcomePageTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/WelcomePageTest.html
new file mode 100644
index 0000000..3c257bd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/freemarker/WelcomePageTest.html
@@ -0,0 +1,50 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Registration Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Welcome Page Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTitle</td>
+	<td>Tiles 2 Test Application</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>Tiles 2 Test Application</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html
new file mode 100644
index 0000000..6c8ed08
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerConfiguredDefinitionNoTypeTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Configured Definition with no Type Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Configured Definition with no Type Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags without types</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerConfiguredDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerConfiguredDefinitionTest.html
new file mode 100644
index 0000000..59e3dc6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerConfiguredDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Configured Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerDefinitionNoTypeTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerDefinitionNoTypeTest.html
new file mode 100644
index 0000000..1542eeb
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerDefinitionNoTypeTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Configured Definition with no Type Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Configured Definition with no Type Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Definition that contains another definition inside using JSP tags without types</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an inner definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerDefinitionTest.html
new file mode 100644
index 0000000..3fc1f3d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/CompositeDefinitionWithInnerDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Composite Definition with Inner Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Composite Definition with Inner Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Definition that contains another definition inside using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a composite definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an inner definition with tags.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredCompositeDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredCompositeDefinitionTest.html
new file mode 100644
index 0000000..d468819
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredCompositeDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Composite Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+w<tr><td rowspan="1" colspan="3">Configured Composite Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition that contains another definition inside</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionAttributePreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionAttributePreparerTest.html
new file mode 100644
index 0000000..2518b89
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionAttributePreparerTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Attribute Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Attribute Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Attribute Preparer</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the AttributeViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionAttributeRolesTagsTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionAttributeRolesTagsTest.html
new file mode 100644
index 0000000..50f5456
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionAttributeRolesTagsTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Attribute Roles Tags Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Attribute Roles Tags Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Attribute that have Roles in Tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionAttributeRolesTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionAttributeRolesTest.html
new file mode 100644
index 0000000..a002826
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionAttributeRolesTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Attribute Roles Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Attribute Roles Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Attribute that have Roles</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedListTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedListTest.html
new file mode 100644
index 0000000..cf92053
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedListTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded List Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded List Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Cascaded Definition with List</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>Single attribute "stringTest" value: This is a string </td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>valueOne</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>valueTwo</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>valueThree</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedOverriddenTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedOverriddenTest.html
new file mode 100644
index 0000000..2104bbc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedOverriddenTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded Overridden Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded Overridden Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Cascaded Definition with Override</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a configured inner definition.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedTemplateTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedTemplateTest.html
new file mode 100644
index 0000000..8cfa6c6
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedTemplateTest.html
@@ -0,0 +1,56 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded Template Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Cascaded Definition with Template</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedTest.html
new file mode 100644
index 0000000..df76a00
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionCascadedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Cascaded Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Cascaded Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Cascaded Definition</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionDbTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionDbTest.html
new file mode 100644
index 0000000..9a67094
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionDbTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Db Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Db Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition from DB</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionDefaultValuesTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionDefaultValuesTest.html
new file mode 100644
index 0000000..086df49
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionDefaultValuesTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Default Values Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Default Values Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Default Values</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the alternate header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the default body in the tag.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionELSingleEvalTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionELSingleEvalTest.html
new file mode 100644
index 0000000..7b45830
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionELSingleEvalTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition EL with Single Evaluation Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition EL with Single Evaluation Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with EL to test Single Evaluation</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>${requestScope.doNotShow}</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionELTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionELTest.html
new file mode 100644
index 0000000..a6fce33
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionELTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition EL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition EL Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with EL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionExceptionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionExceptionTest.html
new file mode 100644
index 0000000..87da57a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionExceptionTest.html
@@ -0,0 +1,51 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Exception Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with an exception in an attribute page</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionExtendedDbTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionExtendedDbTest.html
new file mode 100644
index 0000000..67c12c4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionExtendedDbTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Extended Db Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Extended Db Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Extended Configured Definition from DB</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an extended definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionFlushTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionFlushTest.html
new file mode 100644
index 0000000..8d334d5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionFlushTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Flush Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Flush Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Flush</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionFromClasspathTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionFromClasspathTest.html
new file mode 100644
index 0000000..0bf3c8c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionFromClasspathTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition from Classpath Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition from Classpath Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Classpath Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This tile was loaded from the classpath</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionIgnoreTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionIgnoreTest.html
new file mode 100644
index 0000000..0ad769c
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionIgnoreTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Ignore Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Ignore Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Ignore</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionInModuleTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionInModuleTest.html
new file mode 100644
index 0000000..c82a53f
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionInModuleTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition in Module Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition in Module Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition in Module</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition is from an alternate container.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This body is loaded from the "alt" module.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionInlineTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionInlineTest.html
new file mode 100644
index 0000000..82454b2
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionInlineTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Inline Content Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Inline Content Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with an inline content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an inline content</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionMVELTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionMVELTest.html
new file mode 100644
index 0000000..fc0ddb0
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionMVELTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition MVEL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition MVEL Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with MVEL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOGNLTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOGNLTest.html
new file mode 100644
index 0000000..0ccdee8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOGNLTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition OGNL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition OGNL Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with OGNL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured composite definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a configured inner definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOldFormatTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOldFormatTest.html
new file mode 100644
index 0000000..6e0cf8a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOldFormatTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Old Format Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Old Format Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition in Old Format</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a definition configured in 1.1 format.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOpenBodyTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOpenBodyTest.html
new file mode 100644
index 0000000..3ef469d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOpenBodyTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Open BodyTest</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Open Body Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Open Body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a customized context</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOverrideAndNotTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOverrideAndNotTest.html
new file mode 100644
index 0000000..7084c97
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOverrideAndNotTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Overridden Content Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Overridden and Original Content Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with an overridden content and one with original content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an overridden content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOverrideTemplateTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOverrideTemplateTest.html
new file mode 100644
index 0000000..6385866
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOverrideTemplateTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Overridden Template Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Overridden Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with an overridden template</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the overridden template.</td>
+    <td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOverrideTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOverrideTest.html
new file mode 100644
index 0000000..0e50fad
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionOverrideTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Overridden Content Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Overridden Content Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with an overridden content</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is an overridden content</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionRegexpTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionRegexpTest.html
new file mode 100644
index 0000000..5efe639
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionRegexpTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Regular Expression Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Regular Expression Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Regular Expression</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout one.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout two.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Hello.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Bye.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionReversedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionReversedTest.html
new file mode 100644
index 0000000..93cb4a8
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionReversedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Reversed Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Reversed Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Reversed Attribute</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>.eltit eht si sihT</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionRoleTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionRoleTagTest.html
new file mode 100644
index 0000000..634d560
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionRoleTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Role Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Role Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Specified Role in Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition appears.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This definition does not appear.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionRoleTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionRoleTest.html
new file mode 100644
index 0000000..a908e15
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionRoleTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Role Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Role Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Specified Role</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition appears.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextNotPresent</td>
+	<td>This definition does not appear.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionTest.html
new file mode 100644
index 0000000..091cbc4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionWildcardTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionWildcardTest.html
new file mode 100644
index 0000000..dced3f1
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionWildcardTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Wildcard Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition Wildcard Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Wildcards</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout one.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is layout two.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Hello.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition has a message: Bye.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionWithConfiguredPreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionWithConfiguredPreparerTest.html
new file mode 100644
index 0000000..aa98772
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionWithConfiguredPreparerTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Configured Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Configured Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Preparer configured in the definition itself</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the ViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionWithPreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionWithPreparerTest.html
new file mode 100644
index 0000000..ca6dd76
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredDefinitionWithPreparerTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition with Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Configured Definition with Preparer</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the ViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredNestedDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredNestedDefinitionTest.html
new file mode 100644
index 0000000..02733dc
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredNestedDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Nested Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Nested Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Nested Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredNestedListDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredNestedListDefinitionTest.html
new file mode 100644
index 0000000..c76e4ec
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ConfiguredNestedListDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Nested List Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Nested List Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Nested List Definition</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagExtendTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagExtendTest.html
new file mode 100644
index 0000000..7688ff4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagExtendTest.html
@@ -0,0 +1,60 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag Extend Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+    <td>clickAndWait</td>
+    <td>link=Velocity: Test Definition Tag extending configured and custom definitions</td>
+    <td></td>
+    </tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is an overridden title</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is an overridden content</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagListInheritTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagListInheritTest.html
new file mode 100644
index 0000000..7a02921
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagListInheritTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag List Inherit Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag List Inherit Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Definition Tag with a List Inherit</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueFour</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagPreparerTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagPreparerTest.html
new file mode 100644
index 0000000..779a5aa
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagPreparerTest.html
@@ -0,0 +1,62 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag with Preparer Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag with Preparer Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Definition Tag with Preparer</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the value added by the ViewPreparer</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagTest.html
new file mode 100644
index 0000000..251a334
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/DefinitionTagTest.html
@@ -0,0 +1,60 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+    <td>clickAndWait</td>
+    <td>link=Velocity: Test Definition Tag</td>
+    <td></td>
+    </tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ImportAttributeTagAllTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ImportAttributeTagAllTest.html
new file mode 100644
index 0000000..7504f47
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ImportAttributeTagAllTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Import Attribute Tag with no Name Specified Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Import Attribute Tag with no Name Specified Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test importAttribute Tag with no name</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>One</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Two</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Three </td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ImportAttributeTagInheritTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ImportAttributeTagInheritTest.html
new file mode 100644
index 0000000..66fdb6b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ImportAttributeTagInheritTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Import Attribute Tag Inherit Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Import Attribute Tag Inherit Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test importAttribute Tag with List Inherit</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueFour</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ImportAttributeTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ImportAttributeTagTest.html
new file mode 100644
index 0000000..5a96b5e
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/ImportAttributeTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Import Attribute Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Import Attribute Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test importAttribute Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/LocalizationTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/LocalizationTest.html
new file mode 100644
index 0000000..45c4a82
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/LocalizationTest.html
@@ -0,0 +1,141 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Localization Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Localization</td>
+	<td></td>
+</tr>
+<tr>
+	<td>storeText</td>
+	<td>defaultLocaleMessage</td>
+	<td>localeMessage</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertText</td>
+	<td>defaultLocaleMessage</td>
+	<td>${localeMessage}</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=American English</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>American English locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=British English</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>British English locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=French</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>French locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Select another locale</td>
+	<td></td>
+</tr>
+<tr>
+	<td>select</td>
+	<td>locale</td>
+	<td>label=Italian</td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>//input[@value='Submit']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Italian locale</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutListCascadedTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutListCascadedTagTest.html
new file mode 100644
index 0000000..389109d
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutListCascadedTagTest.html
@@ -0,0 +1,76 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put List Cascaded Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put List Cascaded Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put List Cascaded Tag</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutListTagInheritTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutListTagInheritTest.html
new file mode 100644
index 0000000..9a5ed43
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutListTagInheritTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put List Tag Inherit Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put List Tag Inherit Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put List Tag with Inherit</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueFour</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutListTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutListTagTest.html
new file mode 100644
index 0000000..9136866
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutListTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put List Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put List Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Single attribute "stringTest" value: This is a string </td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueOne</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueTwo</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>valueThree</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagCascadedOverriddenTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagCascadedOverriddenTest.html
new file mode 100644
index 0000000..f3bffbd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagCascadedOverriddenTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Cascaded Overridden Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Cascaded Overridden Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put Tag with Overridden Cascaded Attributes</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a configured inner definition.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagCascadedTemplateTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagCascadedTemplateTest.html
new file mode 100644
index 0000000..8e1b11a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagCascadedTemplateTest.html
@@ -0,0 +1,56 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Cascaded Template Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Cascaded Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put Tag with Cascaded Attributes and Template</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagCascadedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagCascadedTest.html
new file mode 100644
index 0000000..c45c7b5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagCascadedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Cascaded Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Cascaded Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put Tag with Cascaded Attributes</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title.</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagFlushTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagFlushTest.html
new file mode 100644
index 0000000..ab3dbf5
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagFlushTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Flush Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Flush Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put Tag with Flush</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagNestedDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagNestedDefinitionTest.html
new file mode 100644
index 0000000..36fabd3
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagNestedDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Nested Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Nested Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Nested Definition only using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagNestedListDefinitionTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagNestedListDefinitionTest.html
new file mode 100644
index 0000000..abcaf90
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagNestedListDefinitionTest.html
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Nested List Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Nested List Definition Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Insert Nested List Definition only using JSP tags</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a nested definition.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagReversedTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagReversedTest.html
new file mode 100644
index 0000000..0ab07d4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagReversedTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Reversed Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Reversed Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put Tag with Reversed Attribute</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>.eltit eht si sihT</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagTest.html
new file mode 100644
index 0000000..2c02dc4
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagWithELSingleEvalTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagWithELSingleEvalTest.html
new file mode 100644
index 0000000..918f856
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagWithELSingleEvalTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag using EL with Single Evaluation Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag using EL with Single Evaluation Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put Tag using EL to test Single Evaluation</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>${requestScope.doNotShow}</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagWithELTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagWithELTest.html
new file mode 100644
index 0000000..323d38a
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagWithELTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag using EL Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put Tag using EL</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>Body Content defined by and el</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagWithServletTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagWithServletTest.html
new file mode 100644
index 0000000..fd98087
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/PutTagWithServletTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Servlet as Template Test</title>
+</head>
+w<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Servlet as Template Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Put Tag using a servlet mapping as a template</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/SetCurrentContainerTagTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/SetCurrentContainerTagTest.html
new file mode 100644
index 0000000..0fc6840
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/SetCurrentContainerTagTest.html
@@ -0,0 +1,66 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>setCurrentContainer Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">setCurrentContainer Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test setCurrentContainer Tag</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This definition is from an alternate container.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/TilesDefinitionFilterTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/TilesDefinitionFilterTest.html
new file mode 100644
index 0000000..a95131b
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/TilesDefinitionFilterTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Tiles Definition Filter Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Tiles Definition Filter</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This Content should be wrapped with the standard layout.</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/TilesDispatchServletTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/TilesDispatchServletTest.html
new file mode 100644
index 0000000..7175978
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/TilesDispatchServletTest.html
@@ -0,0 +1,61 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Tiles Dispatch Servlet Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>link=Velocity: Test Tiles Dispatch Servlet</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the title.</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is the header</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTextPresent</td>
+	<td>This is a body</td>
+	<td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/WelcomePageTest.html b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/WelcomePageTest.html
new file mode 100644
index 0000000..3c257bd
--- /dev/null
+++ b/TILES_3_0_X/tiles-test-pom/tiles-test/src/test/selenium/velocity/WelcomePageTest.html
@@ -0,0 +1,50 @@
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Registration Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Welcome Page Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/tiles-test/index.jsp</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertTitle</td>
+	<td>Tiles 2 Test Application</td>
+	<td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>Tiles 2 Test Application</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/TILES_3_0_X/tiles-velocity/pom.xml b/TILES_3_0_X/tiles-velocity/pom.xml
new file mode 100644
index 0000000..8c8794d
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/pom.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>tiles-parent</artifactId>
+    <groupId>org.apache.tiles</groupId>
+    <version>3.0.1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>tiles-velocity</artifactId>
+  <packaging>jar</packaging>
+  <description>Velocity Support in Tiles</description>
+  <name>Tiles - Velocity Support</name>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.tiles.autotag.plugin</groupId>
+        <artifactId>maven-autotag-plugin</artifactId>
+        <version>${tiles.autotag.version}</version>
+        <executions>
+            <execution>
+                <goals>
+                    <goal>generate-velocity</goal>
+                </goals>
+                <configuration>
+                    <packageName>org.apache.tiles.velocity.template</packageName>
+                    <requestClass>org.apache.tiles.request.Request</requestClass>
+                    <velocityRuntime>org.apache.tiles.request.velocity.autotag.VelocityAutotagRuntime</velocityRuntime>
+                </configuration>
+            </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-servlet</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-template</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.velocity</groupId>
+      <artifactId>velocity-tools</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-digester</groupId>
+      <artifactId>commons-digester</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymockclassextension</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.tiles</groupId>
+        <artifactId>tiles-request-velocity</artifactId>
+        <version>${tiles.request.version}</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/TilesVelocityException.java b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/TilesVelocityException.java
new file mode 100644
index 0000000..2faa0d8
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/TilesVelocityException.java
@@ -0,0 +1,72 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.velocity;
+
+import org.apache.tiles.TilesException;
+
+/**
+ * Exception connected to the usage of Velocity and Tiles.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class TilesVelocityException extends TilesException {
+
+    /**
+     * Constructor.
+     *
+     * @since 2.2.0
+     */
+    public TilesVelocityException() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message of the exception.
+     * @since 2.2.0
+     */
+    public TilesVelocityException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param e The cause of the exception.
+     * @since 2.2.0
+     */
+    public TilesVelocityException(Throwable e) {
+        super(e);
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message The message of the exception.
+     * @param e The cause of the exception.
+     * @since 2.2.0
+     */
+    public TilesVelocityException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/package-info.java b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/package-info.java
new file mode 100644
index 0000000..318c597
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id: package-info.java 1049711 2010-12-15 21:12:00Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes to support Velocity under a servlet environment in Tiles.
+ */
+package org.apache.tiles.velocity;
diff --git a/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/AbstractDefaultToStringRenderable.java b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/AbstractDefaultToStringRenderable.java
new file mode 100644
index 0000000..2f76d68
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/AbstractDefaultToStringRenderable.java
@@ -0,0 +1,124 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.velocity.template;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.tiles.velocity.TilesVelocityException;
+import org.apache.velocity.context.Context;
+import org.apache.velocity.exception.MethodInvocationException;
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.velocity.exception.ResourceNotFoundException;
+import org.apache.velocity.runtime.Renderable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Renderable that provides a default implementation of {@link Renderable#toString()}
+ * and allows access to parameters and context objects.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public abstract class AbstractDefaultToStringRenderable implements Renderable {
+
+
+    /**
+     * The Velocity context.
+     *
+     * @since 2.2.0
+     */
+    protected final Context velocityContext;
+
+    /**
+     * The parameters used in the current tool call.
+     *
+     * @since 2.2.0
+     */
+    protected final Map<String, Object> params;
+
+    /**
+     * The HTTP response.
+     *
+     * @since 2.2.0
+     */
+    protected final HttpServletResponse response;
+
+    /**
+     * The HTTP request.
+     *
+     * @since 2.2.0
+     */
+    protected final HttpServletRequest request;
+
+    /**
+     * The logging object.
+     */
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    /**
+     * Constructor.
+     *
+     * @param velocityContext The Velocity context.
+     * @param params The parameters used in the current tool call.
+     * @param response The HTTP response.
+     * @param request The HTTP request.
+     * @since 2.2.0
+     */
+    public AbstractDefaultToStringRenderable(Context velocityContext,
+            Map<String, Object> params, HttpServletResponse response,
+            HttpServletRequest request) {
+        this.velocityContext = velocityContext;
+        this.params = params;
+        this.response = response;
+        this.request = request;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String toString() {
+        StringWriter writer = new StringWriter();
+        try {
+            render(null, writer);
+        } catch (MethodInvocationException e) {
+            throw new TilesVelocityException("Cannot invoke method when rendering", e);
+        } catch (ParseErrorException e) {
+            throw new TilesVelocityException("Cannot parse when rendering", e);
+        } catch (ResourceNotFoundException e) {
+            throw new TilesVelocityException("Cannot find resource when rendering", e);
+        } catch (IOException e) {
+            throw new TilesVelocityException("I/O exception when rendering", e);
+        } finally {
+            try {
+                writer.close();
+            } catch (IOException e) {
+                log.error("Error when closing a StringWriter, the impossible happened!", e);
+            }
+        }
+        return writer.toString();
+    }
+}
diff --git a/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/ContextHolder.java b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/ContextHolder.java
new file mode 100644
index 0000000..80b0d3f
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/ContextHolder.java
@@ -0,0 +1,158 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.velocity.template;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.velocity.context.Context;
+
+/**
+ * An object that holds the current state of Velocity in a Servlet environment.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class ContextHolder {
+
+    /**
+     * The Velocity context.
+     */
+    private Context velocityContext;
+
+    /**
+     * The HTTP request.
+     */
+    private HttpServletRequest request;
+
+    /**
+     * The HTTP response.
+     */
+    private HttpServletResponse response;
+
+    /**
+     * The servlet context.
+     */
+    private ServletContext application;
+
+    /**
+     * Sets the current {@link HttpServletRequest}. This is required for this
+     * tool to operate and will throw a NullPointerException if this is not set
+     * or is set to {@code null}.
+     *
+     * @param request The HTTP request.
+     * @since 2.2.0
+     */
+    public void setRequest(HttpServletRequest request) {
+        if (request == null) {
+            throw new NullPointerException("request should not be null");
+        }
+        this.request = request;
+    }
+
+    /**
+     * Sets the current {@link HttpServletResponse}. This is required for this
+     * tool to operate and will throw a NullPointerException if this is not set
+     * or is set to {@code null}.
+     *
+     * @param response The HTTP response.
+     * @since 2.2.0
+     */
+    public void setResponse(HttpServletResponse response) {
+        if (response == null) {
+            throw new NullPointerException("response should not be null");
+        }
+        this.response = response;
+    }
+
+    /**
+     * Sets the {@link ServletContext}. This is required for this tool to
+     * operate and will throw a NullPointerException if this is not set or is
+     * set to {@code null}.
+     *
+     * @param application The Servlet context.
+     * @since 2.2.0
+     */
+    public void setServletContext(ServletContext application) {
+        if (application == null) {
+            throw new NullPointerException("servlet context should not be null");
+        }
+        this.application = application;
+    }
+
+    /**
+     * Sets the Velocity {@link Context}. This is required for this tool to
+     * operate and will throw a NullPointerException if this is not set or is
+     * set to {@code null}.
+     *
+     * @param context The Velocity context.
+     * @since 2.2.0
+     */
+    public void setVelocityContext(Context context) {
+        if (context == null) {
+            throw new NullPointerException(
+                    "velocity context should not be null");
+        }
+        this.velocityContext = context;
+    }
+
+    /**
+     * Returns the HTTP request.
+     *
+     * @return The HTTP request.
+     * @since 2.2.0
+     */
+    protected HttpServletRequest getRequest() {
+        return request;
+    }
+
+    /**
+     * Returns the HTTP response.
+     *
+     * @return The HTTP response.
+     * @since 2.2.0
+     */
+    protected HttpServletResponse getResponse() {
+        return response;
+    }
+
+    /**
+     * Returns the Servlet context.
+     *
+     * @return The Servlet context..
+     * @since 2.2.0
+     */
+    protected ServletContext getServletContext() {
+        return application;
+    }
+
+    /**
+     * Returns the Velocity context..
+     *
+     * @return The Velocity context.
+     * @since 2.2.0
+     */
+    protected Context getVelocityContext() {
+        return velocityContext;
+    }
+}
diff --git a/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/VelocityStyleTilesTool.java b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/VelocityStyleTilesTool.java
new file mode 100644
index 0000000..e70db95
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/VelocityStyleTilesTool.java
@@ -0,0 +1,247 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.velocity.template;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.servlet.ServletContext;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.servlet.ServletUtil;
+import org.apache.tiles.request.velocity.VelocityRequest;
+import org.apache.velocity.context.InternalContextAdapter;
+import org.apache.velocity.runtime.Renderable;
+
+/**
+ * Tiles Tool to be used "the classic way".
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class VelocityStyleTilesTool extends ContextHolder {
+
+    /**
+     * Returns an attribute.
+     *
+     * @param key The name of the attribute to get.
+     * @return The Attribute.
+     * @since 2.2.0
+     */
+    public Attribute get(String key) {
+        Request velocityRequest = createVelocityRequest(getServletContext(),
+                null);
+        TilesContainer container = TilesAccess.getCurrentContainer(velocityRequest);
+        AttributeContext attributeContext = container
+                .getAttributeContext(velocityRequest);
+        Attribute attribute = attributeContext.getAttribute(key);
+        return attribute;
+    }
+
+    /**
+     * Creates a new empty attribute.
+     *
+     * @return The created attribute.
+     * @since 2.2.0
+     */
+    public Attribute createAttribute() {
+        return new Attribute();
+    }
+
+    /**
+     * Creates an attribute that is a copy of the one passed as a parameter.
+     *
+     * @param attribute The attribute to copy.
+     * @return The copied attribute.
+     * @since 2.2.0
+     */
+    public Attribute clone(Attribute attribute) {
+        return new Attribute(attribute);
+    }
+
+    /**
+     * Creates an attribute that represents a template.
+     *
+     * @param template The template.
+     * @return The attribute.
+     * @since 2.2.0
+     */
+    public Attribute createTemplateAttribute(String template) {
+        return Attribute.createTemplateAttribute(template);
+    }
+
+    /**
+     * Renders an attribute.
+     *
+     * @param attribute The attribute to render.
+     * @return The renderable object, ready to be rendered.
+     * @since 2.2.0
+     */
+    public Renderable render(final Attribute attribute) {
+        return new AbstractDefaultToStringRenderable(getVelocityContext(),
+                null, getResponse(), getRequest()) {
+
+            public boolean render(InternalContextAdapter context, Writer writer)
+                    throws IOException {
+                Request velocityRequest = createVelocityRequest(
+                        getServletContext(), writer);
+                TilesContainer container = TilesAccess
+                        .getCurrentContainer(velocityRequest);
+                container.render(attribute, velocityRequest);
+                return true;
+            }
+
+        };
+    }
+
+    /**
+     * Renders a definition. It can be used in conjunction with
+     * {@link #startAttributeContext()} and {@link #endAttributeContext()} to
+     * customize appearance.
+     *
+     * @param definitionName The name of the definition to render.
+     * @return The renderable that renders the definition.
+     * @since 2.2.0
+     */
+    public Renderable renderDefinition(final String definitionName) {
+        return new AbstractDefaultToStringRenderable(getVelocityContext(),
+                null, getResponse(), getRequest()) {
+
+            public boolean render(InternalContextAdapter context, Writer writer) {
+                Request velocityRequest = createVelocityRequest(
+                        getServletContext(), writer);
+                TilesContainer container = TilesAccess
+                        .getCurrentContainer(velocityRequest);
+                container.render(definitionName, velocityRequest);
+                return true;
+            }
+
+        };
+    }
+
+    /**
+     * Renders the current attribute context. It can be used in conjunction with
+     * {@link #startAttributeContext()} and {@link #endAttributeContext()} to
+     * customize appearance.
+     *
+     * @return The renderable that renders the current attribute context.
+     * @since 2.2.0
+     */
+    public Renderable renderAttributeContext() {
+        return new AbstractDefaultToStringRenderable(getVelocityContext(),
+                null, getResponse(), getRequest()) {
+
+            public boolean render(InternalContextAdapter context, Writer writer) {
+                Request velocityRequest = createVelocityRequest(
+                        getServletContext(), writer);
+                TilesContainer container = TilesAccess
+                        .getCurrentContainer(velocityRequest);
+                container.renderContext(velocityRequest);
+                return true;
+            }
+
+        };
+    }
+
+    /**
+     * Starts the attribute context. Remember to call
+     * {@link #endAttributeContext()} when finished!
+     *
+     * @return The started attribute context, ready to be customized.
+     * @since 2.2.0
+     */
+    public AttributeContext startAttributeContext() {
+        Request velocityRequest = createVelocityRequest(
+                getServletContext(), null);
+        TilesContainer container = TilesAccess
+                .getCurrentContainer(velocityRequest);
+        return container.startContext(velocityRequest);
+    }
+
+    /**
+     * Ends the current attribute context. To be called after
+     * {@link #startAttributeContext()}.
+     *
+     * @return The tool itself.
+     * @since 2.2.0
+     */
+    public VelocityStyleTilesTool endAttributeContext() {
+        Request velocityRequest = createVelocityRequest(getServletContext(),
+                null);
+        TilesContainer container = TilesAccess
+                .getCurrentContainer(velocityRequest);
+        container.endContext(velocityRequest);
+        return this;
+    }
+
+    /**
+     * Returns the current attribute context.
+     *
+     * @return The current attribute context.
+     * @since 2.2.0
+     */
+    public AttributeContext getAttributeContext() {
+        Request velocityRequest = createVelocityRequest(
+                getServletContext(), null);
+        TilesContainer container = TilesAccess
+                .getCurrentContainer(velocityRequest);
+        return container.getAttributeContext(velocityRequest);
+    }
+
+    /**
+     * Sets the current container for the current request.
+     *
+     * @param containerKey The key of the container to set as "current" for the current request.
+     * @return The tool itself.
+     * @since 2.2.0
+     */
+    public VelocityStyleTilesTool setCurrentContainer(String containerKey) {
+        Request velocityRequest = createVelocityRequest(
+                getServletContext(), null);
+        TilesAccess.setCurrentContainer(velocityRequest, containerKey);
+        return this;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String toString() {
+        return "";
+    }
+
+    /**
+     * Creates a Velocity request.
+     *
+     * @param servletContext The servlet context.
+     * @param writer The writer.
+     * @return The created request.
+     */
+    protected Request createVelocityRequest(
+            ServletContext servletContext, Writer writer) {
+        return VelocityRequest.createVelocityRequest(ServletUtil
+                .getApplicationContext(servletContext), getRequest(),
+                getResponse(), getVelocityContext(), writer);
+    }
+}
diff --git a/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/package-info.java b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/package-info.java
new file mode 100644
index 0000000..55f4f6f
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/java/org/apache/tiles/velocity/template/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id: package-info.java 1049711 2010-12-15 21:12:00Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Classes that allow the use of "Tiles template" as a Velocity tool.
+ */
+package org.apache.tiles.velocity.template;
diff --git a/TILES_3_0_X/tiles-velocity/src/main/resources/LICENSE.txt b/TILES_3_0_X/tiles-velocity/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/resources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/TILES_3_0_X/tiles-velocity/src/main/resources/META-INF/velocity.properties b/TILES_3_0_X/tiles-velocity/src/main/resources/META-INF/velocity.properties
new file mode 100644
index 0000000..0280842
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/resources/META-INF/velocity.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+userdirective=org.apache.tiles.velocity.template.AddAttributeDirective,\
+  org.apache.tiles.velocity.template.AddListAttributeDirective,\
+  org.apache.tiles.velocity.template.DefinitionDirective,\
+  org.apache.tiles.velocity.template.GetAsStringDirective,\
+  org.apache.tiles.velocity.template.ImportAttributeDirective,\
+  org.apache.tiles.velocity.template.InsertAttributeDirective,\
+  org.apache.tiles.velocity.template.InsertDefinitionDirective,\
+  org.apache.tiles.velocity.template.InsertTemplateDirective,\
+  org.apache.tiles.velocity.template.PutAttributeDirective,\
+  org.apache.tiles.velocity.template.PutListAttributeDirective
diff --git a/TILES_3_0_X/tiles-velocity/src/main/resources/NOTICE.txt b/TILES_3_0_X/tiles-velocity/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..1f13ff8
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/resources/NOTICE.txt
@@ -0,0 +1,6 @@
+   Apache Tiles
+   Copyright 1999-2009 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/TILES_3_0_X/tiles-velocity/src/main/resources/tools.xml b/TILES_3_0_X/tiles-velocity/src/main/resources/tools.xml
new file mode 100644
index 0000000..65d6737
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/main/resources/tools.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<tools>
+  <toolbox scope="request">
+    <tool key="tiles" class="org.apache.tiles.velocity.template.VelocityStyleTilesTool"/>
+  </toolbox>
+</tools>
diff --git a/TILES_3_0_X/tiles-velocity/src/site/site.xml b/TILES_3_0_X/tiles-velocity/src/site/site.xml
new file mode 100644
index 0000000..60c1475
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/site/site.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<project name="Apache Tiles - Velocity Support">
+    <body>
+
+        <menu name="Apache Tiles&#8482;">
+            <item
+                   name="Home"
+                   href="../../index.html"/>
+            <item
+                   name="Parent module"
+                   href="../index.html"/>
+        </menu>
+
+        <menu ref="modules" />
+        <menu ref="reports" />
+
+    </body>
+</project>
diff --git a/TILES_3_0_X/tiles-velocity/src/test/java/org/apache/tiles/velocity/TilesVelocityExceptionTest.java b/TILES_3_0_X/tiles-velocity/src/test/java/org/apache/tiles/velocity/TilesVelocityExceptionTest.java
new file mode 100644
index 0000000..e933e15
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/test/java/org/apache/tiles/velocity/TilesVelocityExceptionTest.java
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.velocity;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link TilesVelocityException}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TilesVelocityExceptionTest {
+
+    /**
+     * Test method for {@link TilesVelocityException#TilesVelocityException()}.
+     */
+    @Test
+    public void testTilesVelocityException() {
+        TilesVelocityException exception = new TilesVelocityException();
+        assertNull(exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link TilesVelocityException#TilesVelocityException(java.lang.String)}.
+     */
+    @Test
+    public void testTilesVelocityExceptionString() {
+        TilesVelocityException exception = new TilesVelocityException("my message");
+        assertEquals("my message", exception.getMessage());
+        assertNull(exception.getCause());
+    }
+
+    /**
+     * Test method for {@link TilesVelocityException#TilesVelocityException(java.lang.Throwable)}.
+     */
+    @Test
+    public void testTilesVelocityExceptionThrowable() {
+        Throwable cause = new Throwable();
+        TilesVelocityException exception = new TilesVelocityException(cause);
+        assertEquals(cause.toString(), exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+    /**
+     * Test method for {@link TilesVelocityException#TilesVelocityException(java.lang.String, java.lang.Throwable)}.
+     */
+    @Test
+    public void testTilesVelocityExceptionStringThrowable() {
+        Throwable cause = new Throwable();
+        TilesVelocityException exception = new TilesVelocityException("my message", cause);
+        assertEquals("my message", exception.getMessage());
+        assertEquals(cause, exception.getCause());
+    }
+
+}
diff --git a/TILES_3_0_X/tiles-velocity/src/test/java/org/apache/tiles/velocity/template/AbstractDefaultToStringRenderableTest.java b/TILES_3_0_X/tiles-velocity/src/test/java/org/apache/tiles/velocity/template/AbstractDefaultToStringRenderableTest.java
new file mode 100644
index 0000000..66a3639
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/test/java/org/apache/tiles/velocity/template/AbstractDefaultToStringRenderableTest.java
@@ -0,0 +1,180 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.velocity.template;
+
+import static org.junit.Assert.*;
+import static org.easymock.classextension.EasyMock.*;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.velocity.context.Context;
+import org.apache.velocity.context.InternalContextAdapter;
+import org.junit.Test;
+
+/**
+ * Tests {@link AbstractDefaultToStringRenderable}.
+ */
+public class AbstractDefaultToStringRenderableTest {
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.AbstractDefaultToStringRenderable
+     * #AbstractDefaultToStringRenderable(org.apache.velocity.context.Context,
+     * java.util.Map, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpServletRequest)}.
+     */
+    @Test
+    public void testAbstractDefaultToStringRenderable() {
+        Context velociContext = createMock(Context.class);
+        HttpServletRequest request = createMock(HttpServletRequest.class);
+        HttpServletResponse response = createMock(HttpServletResponse.class);
+        Map<String, Object> params = new HashMap<String, Object>();
+
+        replay(velociContext, request, response);
+        DefaultRenderable renderable = new DefaultRenderable(velociContext,
+                params, response, request);
+        assertEquals(velociContext, renderable.getVelocityContext());
+        assertEquals(request, renderable.getRequest());
+        assertEquals(response, renderable.getResponse());
+        assertEquals(params, renderable.getParams());
+        verify(velociContext, request, response);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.AbstractDefaultToStringRenderable#toString()}.
+     */
+    @Test
+    public void testToString() {
+        Context velociContext = createMock(Context.class);
+        HttpServletRequest request = createMock(HttpServletRequest.class);
+        HttpServletResponse response = createMock(HttpServletResponse.class);
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("one", "value1");
+
+        replay(velociContext, request, response);
+        DefaultRenderable renderable = new DefaultRenderable(velociContext,
+                params, response, request);
+
+        assertEquals("Hello!", renderable.toString());
+        assertTrue(renderable.getWriter() instanceof StringWriter);
+        assertNull(renderable.getInternalContextAdapter());
+        verify(velociContext, request, response);
+    }
+
+    /**
+     * Mock class for AbstractDefaultToStringRenderable.
+     */
+    private static class DefaultRenderable extends AbstractDefaultToStringRenderable {
+
+        /**
+         * The internal context.
+         */
+        private InternalContextAdapter internalContextAdapter;
+
+        /**
+         * The writer.
+         */
+        private Writer writer;
+
+        /**
+         * Constructor.
+         *
+         * @param velocityContext The Velocity context.
+         * @param params The parameters used in the current tool call.
+         * @param response The HTTP response.
+         * @param request The HTTP request.
+         */
+        public DefaultRenderable(Context velocityContext,
+                Map<String, Object> params, HttpServletResponse response,
+                HttpServletRequest request) {
+            super(velocityContext, params, response, request);
+        }
+
+        /** {@inheritDoc} */
+        public boolean render(InternalContextAdapter context, Writer writer)
+                throws IOException {
+            this.internalContextAdapter = context;
+            this.writer = writer;
+            writer.write("Hello!");
+            return true;
+        }
+
+        /**
+         * Returns the Velocity context.
+         *
+         * @return The velocity context.
+         */
+        public Context getVelocityContext() {
+            return velocityContext;
+        }
+
+        /**
+         * Returns the parameters.
+         *
+         * @return The parameters.
+         */
+        public Map<String, Object> getParams() {
+            return params;
+        }
+
+        /**
+         * Returns the request.
+         *
+         * @return The request.
+         */
+        public HttpServletRequest getRequest() {
+            return request;
+        }
+
+        /**
+         * Returns the respnse.
+         *
+         * @return The response.
+         */
+        public HttpServletResponse getResponse() {
+            return response;
+        }
+
+        /**
+         * Returns the internal context.
+         *
+         * @return The internal context.
+         */
+        public InternalContextAdapter getInternalContextAdapter() {
+            return internalContextAdapter;
+        }
+
+        /**
+         * Returns the writer.
+         *
+         * @return The writer.
+         */
+        public Writer getWriter() {
+            return writer;
+        }
+    }
+}
diff --git a/TILES_3_0_X/tiles-velocity/src/test/java/org/apache/tiles/velocity/template/VelocityStyleTilesToolTest.java b/TILES_3_0_X/tiles-velocity/src/test/java/org/apache/tiles/velocity/template/VelocityStyleTilesToolTest.java
new file mode 100644
index 0000000..cfb4f53
--- /dev/null
+++ b/TILES_3_0_X/tiles-velocity/src/test/java/org/apache/tiles/velocity/template/VelocityStyleTilesToolTest.java
@@ -0,0 +1,403 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.velocity.template;
+
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.isA;
+import static org.easymock.classextension.EasyMock.createMock;
+import static org.easymock.classextension.EasyMock.replay;
+import static org.easymock.classextension.EasyMock.verify;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.Expression;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.velocity.VelocityRequest;
+import org.apache.velocity.context.Context;
+import org.apache.velocity.context.InternalContextAdapter;
+import org.apache.velocity.runtime.Renderable;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@link VelocityStyleTilesTool}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.0
+ */
+public class VelocityStyleTilesToolTest {
+
+    /**
+     * The tool to test.
+     */
+    private VelocityStyleTilesTool tool;
+
+    /**
+     * The request object.
+     */
+    private HttpServletRequest request;
+
+    /**
+     * The response object.
+     */
+    private HttpServletResponse response;
+
+    /**
+     * The servlet context.
+     */
+    private ServletContext servletContext;
+
+    /**
+     * The current velocity context.
+     */
+    private Context velocityContext;
+
+    /**
+     * Sets up the tool to test.
+     *
+     * @since 2.2.0
+     */
+    @Before
+    public void setUp() {
+        tool = new VelocityStyleTilesTool();
+        request = createMock(HttpServletRequest.class);
+        response = createMock(HttpServletResponse.class);
+        velocityContext = createMock(Context.class);
+        servletContext = createMock(ServletContext.class);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool#get(java.lang.String)}.
+     */
+    @Test
+    public void testGetAttribute() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Attribute attribute = new Attribute("myValue");
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME)).andReturn(container);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope).anyTimes();
+        expect(servletContext.getAttribute(ApplicationAccess
+                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext)
+                .anyTimes();
+        expect(container.getAttributeContext(isA(VelocityRequest.class)))
+                .andReturn(attributeContext);
+        expect(attributeContext.getAttribute("myAttribute")).andReturn(attribute);
+
+        replay(velocityContext, request, response, servletContext, container,
+                attributeContext, applicationContext);
+        initializeTool();
+        assertEquals(attribute, tool.get("myAttribute"));
+        verify(velocityContext, request, response, servletContext, container,
+                attributeContext, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool#createAttribute()}.
+     */
+    @Test
+    public void testCreateAttribute() {
+        replay(velocityContext, request, response, servletContext);
+        initializeTool();
+        Attribute attribute =  tool.createAttribute();
+        assertNull(attribute.getValue());
+        assertNull(attribute.getRenderer());
+        assertNull(attribute.getExpressionObject());
+        verify(velocityContext, request, response, servletContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool
+     * #clone(org.apache.tiles.Attribute)}.
+     */
+    @Test
+    public void testCloneAttribute() {
+        Attribute attribute = new Attribute("myValue", Expression
+                .createExpression("myExpression", null), "myRole",
+                "myRendererName");
+
+        replay(velocityContext, request, response, servletContext);
+        initializeTool();
+        assertEquals(attribute, tool.clone(attribute));
+        verify(velocityContext, request, response, servletContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool
+     * #createTemplateAttribute(java.lang.String)}.
+     */
+    @Test
+    public void testCreateTemplateAttribute() {
+        replay(velocityContext, request, response, servletContext);
+        initializeTool();
+        Attribute attribute = tool.createTemplateAttribute("myTemplate");
+        assertEquals("myTemplate", attribute.getValue());
+        assertEquals("template", attribute.getRenderer());
+        verify(velocityContext, request, response, servletContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool
+     * #render(org.apache.tiles.Attribute)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testRenderAttribute() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        InternalContextAdapter internalContextAdapter = createMock(InternalContextAdapter.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        StringWriter writer = new StringWriter();
+        Attribute attribute = new Attribute("myValue");
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME)).andReturn(container);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope).anyTimes();
+        expect(servletContext.getAttribute(ApplicationAccess
+                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext)
+                .anyTimes();
+        container.render(eq(attribute), isA(VelocityRequest.class));
+
+        replay(velocityContext, request, response, servletContext, container,
+                internalContextAdapter, applicationContext);
+        initializeTool();
+        Renderable renderable = tool.render(attribute);
+        renderable.render(internalContextAdapter, writer);
+        verify(velocityContext, request, response, servletContext, container,
+                internalContextAdapter, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool
+     * #renderDefinition(java.lang.String)}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testRenderDefinition() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        InternalContextAdapter internalContextAdapter = createMock(InternalContextAdapter.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        StringWriter writer = new StringWriter();
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME)).andReturn(container);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope).anyTimes();
+        expect(servletContext.getAttribute(ApplicationAccess
+                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext)
+                .anyTimes();
+        container.render(eq("myDefinition"), isA(VelocityRequest.class));
+
+        replay(velocityContext, request, response, servletContext, container,
+                internalContextAdapter, applicationContext);
+        initializeTool();
+        Renderable renderable = tool.renderDefinition("myDefinition");
+        renderable.render(internalContextAdapter, writer);
+        verify(velocityContext, request, response, servletContext, container,
+                internalContextAdapter, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool#renderAttributeContext()}.
+     * @throws IOException If something goes wrong.
+     */
+    @Test
+    public void testRenderAttributeContext() throws IOException {
+        TilesContainer container = createMock(TilesContainer.class);
+        InternalContextAdapter internalContextAdapter = createMock(InternalContextAdapter.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        StringWriter writer = new StringWriter();
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME)).andReturn(container);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope).anyTimes();
+        expect(servletContext.getAttribute(ApplicationAccess
+                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext)
+                .anyTimes();
+        container.renderContext(isA(VelocityRequest.class));
+
+        replay(velocityContext, request, response, servletContext, container,
+                internalContextAdapter, applicationContext);
+        initializeTool();
+        Renderable renderable = tool.renderAttributeContext();
+        renderable.render(internalContextAdapter, writer);
+        verify(velocityContext, request, response, servletContext, container,
+                internalContextAdapter, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool#startAttributeContext()}.
+     */
+    @Test
+    public void testStartAttributeContext() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME)).andReturn(container);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope).anyTimes();
+        expect(servletContext.getAttribute(ApplicationAccess
+                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext)
+                .anyTimes();
+        expect(container.startContext(isA(VelocityRequest.class)))
+                .andReturn(attributeContext);
+
+        replay(velocityContext, request, response, servletContext, container,
+                attributeContext, applicationContext);
+        initializeTool();
+        assertEquals(attributeContext, tool.startAttributeContext());
+        verify(velocityContext, request, response, servletContext, container,
+                attributeContext, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool#endAttributeContext()}.
+     */
+    @Test
+    public void testEndAttributeContext() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME)).andReturn(container);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope).anyTimes();
+        expect(servletContext.getAttribute(ApplicationAccess
+                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext)
+                .anyTimes();
+        container.endContext(isA(VelocityRequest.class));
+
+        replay(velocityContext, request, response, servletContext, container,
+                attributeContext, applicationContext);
+        initializeTool();
+        tool.endAttributeContext();
+        verify(velocityContext, request, response, servletContext, container,
+                attributeContext, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool#getAttributeContext()}.
+     */
+    @Test
+    public void testGetAttributeContext() {
+        TilesContainer container = createMock(TilesContainer.class);
+        AttributeContext attributeContext = createMock(AttributeContext.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+
+        expect(request.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME)).andReturn(container);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope).anyTimes();
+        expect(servletContext.getAttribute(ApplicationAccess
+                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext)
+                .anyTimes();
+        expect(container.getAttributeContext(isA(VelocityRequest.class)))
+                .andReturn(attributeContext);
+
+        replay(velocityContext, request, response, servletContext, container,
+                attributeContext, applicationContext);
+        initializeTool();
+        assertEquals(attributeContext, tool.getAttributeContext());
+        verify(velocityContext, request, response, servletContext, container,
+                attributeContext, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool
+     * #setCurrentContainer(java.lang.String)}.
+     */
+    @Test
+    public void testSetCurrentContainer() {
+        TilesContainer container = createMock(TilesContainer.class);
+        ApplicationContext applicationContext = createMock(ApplicationContext.class);
+        Map<String, Object> applicationScope = new HashMap<String, Object>();
+        applicationScope.put("myKey", container);
+
+        Map<String, Object> requestScope = new HashMap<String, Object>();
+        requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        request.setAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
+        expect(request.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME)).andReturn(container);
+        expect(applicationContext.getApplicationScope()).andReturn(applicationScope).anyTimes();
+        expect(servletContext.getAttribute(ApplicationAccess
+                .APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext)
+                .anyTimes();
+
+        replay(velocityContext, request, response, servletContext, container, applicationContext);
+        initializeTool();
+        assertEquals(tool, tool.setCurrentContainer("myKey"));
+        assertEquals(container, requestScope.get(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME));
+        verify(velocityContext, request, response, servletContext, container, applicationContext);
+    }
+
+    /**
+     * Test method for {@link org.apache.tiles.velocity.template.VelocityStyleTilesTool#toString()}.
+     */
+    @Test
+    public void testToString() {
+        assertEquals("", tool.toString());
+    }
+
+    /**
+     * Initializes the tool for the test.
+     */
+    private void initializeTool() {
+        tool.setRequest(request);
+        tool.setResponse(response);
+        tool.setServletContext(servletContext);
+        tool.setVelocityContext(velocityContext);
+    }
+}