Author: apetrelli
Date: Fri Sep 26 07:04:48 2008
New Revision: 699330
URL: http://svn.apache.org/viewvc?rev=699330&view=rev
Log:
TILES-295
Added docs for compatibility package.
Modified:
tiles/framework/trunk/src/site/apt/migration/configuration.apt
Modified: tiles/framework/trunk/src/site/apt/migration/configuration.apt
URL:
http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/migration/configuration.apt?rev=699330&r1=699329&r2=699330&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/migration/configuration.apt (original)
+++ tiles/framework/trunk/src/site/apt/migration/configuration.apt Fri Sep 26
07:04:48 2008
@@ -21,10 +21,54 @@
Migrating Tiles configuration files
-----------
+Reusing old Tiles configuration files
+
+ With Tiles 2.1 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 using Java
+
+ If you are using Java-based configuration, override the
+
{{{../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#createDefinitionsReader(java.lang.Object,%20org.apache.tiles.TilesApplicationContext,%20org.apache.tiles.context.TilesContextFactory)}createDefinitionsReader}}
+ method this way:
+
+---------------------------------------
[EMAIL PROTECTED]
+protected DefinitionsReader createDefinitionsReader(Object context,
+ TilesApplicationContext applicationContext,
+ TilesContextFactory contextFactory) {
+ return new CompatibilityDigesterDefinitionsReader();
+}
+---------------------------------------
+
+* Configuration using initialization parameters
+
+ If you are using configuration using initialization parameters in
+ <<<web.xml>>> you can have to override the
+
{{{../config-reference.html#org.apache.tiles.definition.DefinitionsReader}<<<org.apache.tiles.definition.DefinitionsReader>>>}}
+ parameter this way:
+
+---------------------------------------
+<init-param>
+ <param-name>org.apache.tiles.definition.DefinitionsReader</param-name>
+
<param-value>org.apache.tiles.compat.definition.digester.CompatibilityDigesterDefinitionsReader</param-value>
+</init-param>
+---------------------------------------
+
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.0 DTD
+ many-to-one without losing functionality from the 1.1-1.3 to the 2.1 DTD
version.
* Header
@@ -33,8 +77,8 @@
------------------------------------------------------------
<!DOCTYPE tiles-definitions PUBLIC
- "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
- "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
+ "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+ "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
------------------------------------------------------------
* Definitions attributes