You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2022/11/27 08:25:03 UTC

[struts] 20/23: Make plugin standalone with all generated resources.

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5233-tiles
in repository https://gitbox.apache.org/repos/asf/struts.git

commit bae3e3954865d29df6ec69822f2a09413756e13a
Author: Greg Huber <gh...@apache.org>
AuthorDate: Fri Oct 14 11:07:45 2022 +0100

    Make plugin standalone with all generated resources.
---
 plugins/tiles/pom.xml                              |  14 +-
 .../{BuildJspAutotags.java => BuildAutotags.java}  |  91 ++++++++++---
 .../StrutsWildcardServletApplicationContext.java   |   1 -
 .../tiles/autotag/freemarker/FMModelGenerator.java |  63 +++++++++
 .../freemarker/FMModelRepositoryGenerator.java     |  61 +++++++++
 .../freemarker/FMTemplateGeneratorFactory.java     |  69 ++++++++++
 .../tiles/autotag/freemarker/package-info.java     |  24 ++++
 .../freemarker/template/AddAttributeFMModel.java   |  58 ++++-----
 .../template/AddListAttributeFMModel.java          |  48 +++----
 .../freemarker/template/DefinitionFMModel.java     |  56 ++++----
 .../freemarker/template/GetAsStringFMModel.java    |  66 ++++------
 .../template/ImportAttributeFMModel.java           |  51 ++++----
 .../template/InsertAttributeFMModel.java           |  75 +++++------
 .../template/InsertDefinitionFMModel.java          |  91 ++++++-------
 .../freemarker/template/InsertTemplateFMModel.java |  91 ++++++-------
 .../freemarker/template/PutAttributeFMModel.java   |  64 ++++-----
 .../template/PutListAttributeFMModel.java          |  54 ++++----
 .../template/SetCurrentContainerFMModel.java       |  43 +++---
 .../template/TilesFMModelRepository.java           | 144 ++++++++++++++++++++-
 .../tiles/web/jsp/taglib/AddAttributeTag.java      |  68 ++++------
 .../tiles/web/jsp/taglib/AddListAttributeTag.java  |  23 ++--
 .../apache/tiles/web/jsp/taglib/DefinitionTag.java |  72 ++++-------
 .../tiles/web/jsp/taglib/GetAsStringTag.java       | 113 ++++++----------
 .../tiles/web/jsp/taglib/ImportAttributeTag.java   |  69 +++++-----
 .../tiles/web/jsp/taglib/InsertAttributeTag.java   | 120 +++++++----------
 .../tiles/web/jsp/taglib/InsertDefinitionTag.java  | 116 +++++++----------
 .../tiles/web/jsp/taglib/InsertTemplateTag.java    |  95 ++++++--------
 .../tiles/web/jsp/taglib/PutAttributeTag.java      |  83 +++++-------
 .../tiles/web/jsp/taglib/PutListAttributeTag.java  |  62 ++++-----
 .../web/jsp/taglib/SetCurrentContainerTag.java     |  25 ++--
 .../src/main/resources/META-INF/tld/tiles-jsp.tld  |   2 +-
 .../apache/tiles/autotag/freemarker/fmModel.vm}    |  69 +++++-----
 .../apache/tiles/autotag/freemarker/repository.vm} |  48 ++++---
 .../org/apache/tiles/autotag/jsp/bodyTag.vm        |   2 +-
 .../resources/org/apache/tiles/autotag/jsp/tld.vm  |   2 +-
 .../autotag/freemarker/FMModelGeneratorTest.java   | 139 ++++++++++++++++++++
 .../freemarker/FMModelRepositoryGeneratorTest.java | 126 ++++++++++++++++++
 .../freemarker/FMTemplateGeneratorFactoryTest.java |  58 +++++++++
 .../autotag/freemarker/test/DoStuffFMModel.javat}  |  63 ++++-----
 .../freemarker/test/DoStuffNoBodyFMModel.javat}    |  53 ++++----
 .../test/TldtestFMModelRepository.javat}           |  39 +++---
 .../tiles/autotag/jsp/test/DoStuffNoBodyTag.java   |   2 +-
 .../apache/tiles/autotag/jsp/test/DoStuffTag.java  |   2 +-
 plugins/tiles/src/test/resources/tldtest-jsp.tld   |   2 +-
 44 files changed, 1523 insertions(+), 1094 deletions(-)

diff --git a/plugins/tiles/pom.xml b/plugins/tiles/pom.xml
index 236af9172..627f3c317 100644
--- a/plugins/tiles/pom.xml
+++ b/plugins/tiles/pom.xml
@@ -31,10 +31,10 @@
     <packaging>jar</packaging>
     <name>Struts 2 Tiles Plugin</name>
     
-    <!-- mvn -P build-jsp-autotags exec:java -->
+    <!-- mvn -P build-autotags exec:java -->
     <profiles>
         <profile>
-            <id>build-jsp-autotags</id>
+            <id>build-autotags</id>
             <activation>
                 <activeByDefault>true</activeByDefault>
             </activation>
@@ -53,16 +53,8 @@
                           </execution>
                         </executions>
                         <configuration>
-                            <mainClass>org.apache.struts2.tiles.BuildJspAutotags</mainClass>
+                            <mainClass>org.apache.struts2.tiles.BuildAutotags</mainClass>
                             <arguments>
-                                <!-- taglibURI   -->
-                                <argument>http://tiles.apache.org/tags-tiles</argument>
-                                <!-- packageName -->
-                                <argument>org.apache.tiles.web.jsp.taglib</argument>
-                                <!-- requestClass -->
-                                <argument>org.apache.tiles.request.Request</argument>
-                                <!-- jspRuntime -->
-                                <argument>org.apache.tiles.request.jsp.autotag.JspAutotagRuntime</argument>
                                 <!-- Output folder -->
                                 <argument>${project.build.directory}</argument>
                             </arguments>
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/BuildJspAutotags.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/BuildAutotags.java
similarity index 50%
rename from plugins/tiles/src/main/java/org/apache/struts2/tiles/BuildJspAutotags.java
rename to plugins/tiles/src/main/java/org/apache/struts2/tiles/BuildAutotags.java
index 64aa03254..de2eaee1e 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/BuildJspAutotags.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/BuildAutotags.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.tiles.autotag.freemarker.FMTemplateGeneratorFactory;
 import org.apache.tiles.autotag.generate.TemplateGenerator;
 import org.apache.tiles.autotag.generate.TemplateGeneratorBuilder;
 import org.apache.tiles.autotag.jsp.JspTemplateGeneratorFactory;
@@ -34,11 +35,12 @@ import com.thoughtworks.xstream.XStream;
 import com.thoughtworks.xstream.io.xml.DomDriver;
 
 /**
- * Helper class for building the JSP tag classes and .tld file.
+ * Helper class for building/generating the classes and resources used in the
+ * plugin.
  */
-public class BuildJspAutotags {
+public class BuildAutotags {
 
-    public BuildJspAutotags() {
+    public BuildAutotags() {
     }
 
     /**
@@ -48,28 +50,32 @@ public class BuildJspAutotags {
      */
     public static void main(String[] args) {
 
-        BuildJspAutotags me = new BuildJspAutotags();
+        BuildAutotags me = new BuildAutotags();
 
-        me.build(args[0], args[1], args[2], args[3], args[4]);
+        // Jsp classes
+        me.buildJsp(args[0]);
+
+        // Freemarker classes
+        me.buildFreemarker(args[0]);
 
     }
 
     /**
-     * Build
+     * Build JSP tag classes and .tld file.
+     * 
+     * To build, change template-suite.xml as required and then run this program.
+     * Copy the classes and .tld from the target autotag folder into the packageName
+     * location, .tld to src/main/resources/META-INF/tld/tiles-jsp.tld
      *
-     * @param taglibURI    the taglib URI
-     * @param packageName  the package name
-     * @param requestClass the request class
-     * @param jspRuntime   the jsp runtime
-     * @param outputDir    the output dir
+     * @param outputDir the output dir
      */
-    public void build(String taglibURI, String packageName, String requestClass, String jspRuntime, String outputDir) {
+    public void buildJsp(String outputDir) {
 
         // Default values
-        // taglibURI = "org.apache.tiles.autotag.jsp.runtime.Runtime";
-        // packageName = "org.apache.tiles.web.jsp.taglib";
-        // requestClass = "org.apache.tiles.request.Request";
-        // jspRuntime = "org.apache.tiles.autotag.jsp.runtime.Runtime";
+        String taglibURI = "http://tiles.apache.org/tags-tiles";
+        String packageName = "org.apache.tiles.web.jsp.taglib";
+        String requestClass = "org.apache.tiles.request.Request";
+        String runtime = "org.apache.tiles.request.jsp.autotag.JspAutotagRuntime";
         // outputDir = "/target"
 
         Map<String, String> parameters = new HashMap<String, String>();
@@ -103,7 +109,58 @@ public class BuildJspAutotags {
                     resourcesOutputDirectory, new VelocityEngine(props), TemplateGeneratorBuilder.createNewInstance())
                     .createTemplateGenerator();
 
-            generator.generate(packageName, suite, parameters, jspRuntime, requestClass);
+            generator.generate(packageName, suite, parameters, runtime, requestClass);
+
+        } catch (Exception e) {
+            // ignored
+        }
+
+    }
+
+    /**
+     * Builds the freemarker.
+     * 
+     * To build, change template-suite.xml as required and then run this program.
+     * Copy the classes from the target autotag folder into the packageName
+     * location.
+     *
+     * @param outputDir the output dir
+     */
+    public void buildFreemarker(String outputDir) {
+
+        // Default values
+        String packageName = "org.apache.tiles.freemarker.template";
+        String requestClass = "org.apache.tiles.request.Request";
+        String runtime = "org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime";
+        // outputDir = "/target"
+
+        try {
+
+            TemplateSuite suite;
+
+            InputStream stream = getClass().getResourceAsStream("/META-INF/template-suite.xml");
+
+            try {
+                XStream xstream = new XStream(new DomDriver());
+                xstream.allowTypes(new Class[] { org.apache.tiles.autotag.model.TemplateClass.class,
+                        org.apache.tiles.autotag.model.TemplateSuite.class,
+                        org.apache.tiles.autotag.model.TemplateParameter.class });
+                suite = (TemplateSuite) xstream.fromXML(stream);
+            } finally {
+                stream.close();
+            }
+
+            Properties props = new Properties();
+            InputStream propsStream = getClass().getResourceAsStream("/org/apache/tiles/autotag/velocity.properties");
+            props.load(propsStream);
+            propsStream.close();
+
+            File classesOutputDirectory = new File(outputDir + "/generated-sources/autotag/classes");
+
+            TemplateGenerator generator = new FMTemplateGeneratorFactory(classesOutputDirectory,
+                    new VelocityEngine(props), TemplateGeneratorBuilder.createNewInstance()).createTemplateGenerator();
+
+            generator.generate(packageName, suite, null, runtime, requestClass);
 
         } catch (Exception e) {
             // ignored
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
index 6a890d4a9..7af6069bb 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java
@@ -24,7 +24,6 @@ import com.opensymphony.xwork2.util.finder.ResourceFinder;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.tiles.request.ApplicationResource;
-import org.apache.tiles.request.locale.URLApplicationResource;
 import org.apache.tiles.request.servlet.ServletApplicationContext;
 
 import javax.servlet.ServletContext;
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/FMModelGenerator.java b/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/FMModelGenerator.java
new file mode 100644
index 000000000..8c3520e91
--- /dev/null
+++ b/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/FMModelGenerator.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.autotag.freemarker;
+
+import java.io.File;
+import java.util.Map;
+
+import org.apache.tiles.autotag.generate.AbstractTemplateClassGenerator;
+import org.apache.tiles.autotag.model.TemplateClass;
+import org.apache.tiles.autotag.model.TemplateSuite;
+import org.apache.velocity.app.VelocityEngine;
+
+/**
+ * Generates a single Freemarker directive model, given a template class.
+ */
+public class FMModelGenerator extends AbstractTemplateClassGenerator {
+
+    /**
+     * Constructor.
+     *
+     * @param velocityEngine The Velocity engine.
+     */
+    public FMModelGenerator(VelocityEngine velocityEngine) {
+        super(velocityEngine);
+    }
+
+    @Override
+    protected String getDirectoryName(File directory, String packageName,
+            TemplateSuite suite, TemplateClass clazz, Map<String, String> parameters,
+            String runtimeClass, String requestClass) {
+        return packageName.replaceAll("\\.", "/");
+    }
+
+    @Override
+    protected String getFilename(File directory, String packageName,
+            TemplateSuite suite, TemplateClass clazz, Map<String, String> parameters,
+            String runtimeClass, String requestClass) {
+        return clazz.getTagClassPrefix() + "FMModel.java";
+    }
+
+    @Override
+    protected String getTemplatePath(File directory, String packageName,
+            TemplateSuite suite, TemplateClass clazz, Map<String, String> parameters,
+            String runtimeClass, String requestClass) {
+        return "/org/apache/tiles/autotag/freemarker/fmModel.vm";
+    }
+}
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/FMModelRepositoryGenerator.java b/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/FMModelRepositoryGenerator.java
new file mode 100644
index 000000000..6c045a535
--- /dev/null
+++ b/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/FMModelRepositoryGenerator.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.autotag.freemarker;
+
+import java.io.File;
+import java.util.Map;
+
+import org.apache.tiles.autotag.generate.AbstractTemplateSuiteGenerator;
+import org.apache.tiles.autotag.model.TemplateSuite;
+import org.apache.velocity.app.VelocityEngine;
+
+/**
+ * Generates the model repository, given the template suite.
+ */
+public class FMModelRepositoryGenerator extends AbstractTemplateSuiteGenerator {
+
+    /**
+     * Constructor.
+     *
+     * @param velocityEngine The Velocity engine.
+     */
+    public FMModelRepositoryGenerator(VelocityEngine velocityEngine) {
+        super(velocityEngine);
+    }
+
+    @Override
+    protected String getTemplatePath(File directory, String packageName,
+            TemplateSuite suite, Map<String, String> parameters) {
+        return "/org/apache/tiles/autotag/freemarker/repository.vm";
+    }
+
+    @Override
+    protected String getFilename(File directory, String packageName,
+            TemplateSuite suite, Map<String, String> parameters) {
+        String name = suite.getName();
+        return name.substring(0, 1).toUpperCase() + name.substring(1) + "FMModelRepository.java";
+    }
+
+    @Override
+    protected String getDirectoryName(File directory, String packageName,
+            TemplateSuite suite, Map<String, String> parameters) {
+        return packageName.replaceAll("\\.", "/");
+    }
+
+}
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/FMTemplateGeneratorFactory.java b/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/FMTemplateGeneratorFactory.java
new file mode 100644
index 000000000..b13b7a37c
--- /dev/null
+++ b/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/FMTemplateGeneratorFactory.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.autotag.freemarker;
+
+import java.io.File;
+
+import org.apache.tiles.autotag.generate.TemplateGenerator;
+import org.apache.tiles.autotag.generate.TemplateGeneratorBuilder;
+import org.apache.tiles.autotag.generate.TemplateGeneratorFactory;
+import org.apache.velocity.app.VelocityEngine;
+
+/**
+ * Creates a template generator that generates code for Freemarker.
+ */
+public class FMTemplateGeneratorFactory implements TemplateGeneratorFactory {
+
+    /**
+     * Location of the file.
+     */
+    private File classesOutputDirectory;
+
+    /**
+     * The Velocity engine.
+     */
+    private VelocityEngine velocityEngine;
+
+    /**
+     * The template generator builder.
+     */
+    private TemplateGeneratorBuilder templateGeneratorBuilder;
+
+    /**
+     * Constructor.
+     *
+     * @param classesOutputDirectory   Directory where code will be placed.
+     * @param velocityEngine           The Velocity engine.
+     * @param templateGeneratorBuilder The template generator builder.
+     */
+    public FMTemplateGeneratorFactory(File classesOutputDirectory, VelocityEngine velocityEngine,
+            TemplateGeneratorBuilder templateGeneratorBuilder) {
+        this.classesOutputDirectory = classesOutputDirectory;
+        this.velocityEngine = velocityEngine;
+        this.templateGeneratorBuilder = templateGeneratorBuilder;
+    }
+
+    @Override
+    public TemplateGenerator createTemplateGenerator() {
+        return templateGeneratorBuilder.setClassesOutputDirectory(classesOutputDirectory)
+                .addClassesTemplateSuiteGenerator(new FMModelRepositoryGenerator(velocityEngine))
+                .addClassesTemplateClassGenerator(new FMModelGenerator(velocityEngine)).build();
+    }
+
+}
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/package-info.java b/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/package-info.java
new file mode 100644
index 000000000..f891ee347
--- /dev/null
+++ b/plugins/tiles/src/main/java/org/apache/tiles/autotag/freemarker/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * $Id: package-info.java 1044819 2010-12-12 13:29:34Z 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.
+ */
+/**
+ * Autotag support for Freemarker.
+ */
+package org.apache.tiles.autotag.freemarker;
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddAttributeFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddAttributeFMModel.java
index c6efb87f0..5c656fe87 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddAttributeFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddAttributeFMModel.java
@@ -16,28 +16,29 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.AddAttributeModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong>Add an element to the surrounding list. Equivalent to 'putAttribute',
- * but for list element.</strong>
+ * Add an element to the surrounding list. Equivalent to 'putAttribute', but for
+ * list element.
  * </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
@@ -49,38 +50,29 @@ public class AddAttributeFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final AddAttributeModel model;
+    private org.apache.tiles.template.AddAttributeModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public AddAttributeFMModel(AddAttributeModel model) {
+    public AddAttributeFMModel(org.apache.tiles.template.AddAttributeModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            runtime.getParameter("value", Object.class, null),
-            runtime.getParameter("expression", String.class, null),
-            runtime.getParameter("role", String.class, null),
-            runtime.getParameter("type", String.class, null),
-            request,
-            modelBody
-        );
+        model.execute(runtime.getParameter("value", java.lang.Object.class, null),
+                runtime.getParameter("expression", java.lang.String.class, null),
+                runtime.getParameter("role", java.lang.String.class, null),
+                runtime.getParameter("type", java.lang.String.class, null), request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java
index 764846ac7..ef81f9a44 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java
@@ -16,25 +16,26 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.AddListAttributeModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong>Declare a list that will be pass as an attribute. </strong>
+ * Declare a list that will be pass as an attribute.
  * </p>
  * <p>
  * Declare a list that will be pass as an attribute . List elements are added
@@ -47,35 +48,26 @@ public class AddListAttributeFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final AddListAttributeModel model;
+    private org.apache.tiles.template.AddListAttributeModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public AddListAttributeFMModel(AddListAttributeModel model) {
+    public AddListAttributeFMModel(org.apache.tiles.template.AddListAttributeModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            runtime.getParameter("role", String.class, null),
-            request,
-            modelBody
-        );
+        model.execute(runtime.getParameter("role", java.lang.String.class, null), request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/DefinitionFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/DefinitionFMModel.java
index e7342c631..433f44fbf 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/DefinitionFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/DefinitionFMModel.java
@@ -16,25 +16,26 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.DefinitionModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong>Create a definition at runtime. </strong>
+ * Create a definition at runtime.
  * </p>
  * <p>
  * Create a new definition at runtime. Newly created definition will be
@@ -46,39 +47,30 @@ public class DefinitionFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final DefinitionModel model;
+    private org.apache.tiles.template.DefinitionModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public DefinitionFMModel(DefinitionModel model) {
+    public DefinitionFMModel(org.apache.tiles.template.DefinitionModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            runtime.getParameter("name", String.class, null),
-            runtime.getParameter("template", String.class, null),
-            runtime.getParameter("role", String.class, null),
-            runtime.getParameter("extends", String.class, null),
-            runtime.getParameter("preparer", String.class, null),
-            request,
-            modelBody
-        );
+        model.execute(runtime.getParameter("name", java.lang.String.class, null),
+                runtime.getParameter("template", java.lang.String.class, null),
+                runtime.getParameter("role", java.lang.String.class, null),
+                runtime.getParameter("extends", java.lang.String.class, null),
+                runtime.getParameter("preparer", java.lang.String.class, null), request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/GetAsStringFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/GetAsStringFMModel.java
index 41cc6a9b1..555a708e1 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/GetAsStringFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/GetAsStringFMModel.java
@@ -16,29 +16,28 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.api.Attribute;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.GetAsStringModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong> Render the value of the specified template attribute to the current
- * Writer</strong>
+ * Render the value of the specified template attribute to the current Writer
  * </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
@@ -50,42 +49,33 @@ public class GetAsStringFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final GetAsStringModel model;
+    private org.apache.tiles.template.GetAsStringModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public GetAsStringFMModel(GetAsStringModel model) {
+    public GetAsStringFMModel(org.apache.tiles.template.GetAsStringModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            runtime.getParameter("ignore", Boolean.class, false),
-            runtime.getParameter("preparer", String.class, null),
-            runtime.getParameter("role", String.class, null),
-            runtime.getParameter("defaultValue", Object.class, null),
-            runtime.getParameter("defaultValueRole", String.class, null),
-            runtime.getParameter("defaultValueType", String.class, null),
-            runtime.getParameter("name", String.class, null),
-            runtime.getParameter("value", Attribute.class, null),
-            request,
-            modelBody
-        );
+        model.execute(runtime.getParameter("ignore", java.lang.Boolean.class, false),
+                runtime.getParameter("preparer", java.lang.String.class, null),
+                runtime.getParameter("role", java.lang.String.class, null),
+                runtime.getParameter("defaultValue", java.lang.Object.class, null),
+                runtime.getParameter("defaultValueRole", java.lang.String.class, null),
+                runtime.getParameter("defaultValueType", java.lang.String.class, null),
+                runtime.getParameter("name", java.lang.String.class, null),
+                runtime.getParameter("value", org.apache.tiles.api.Attribute.class, null), request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/ImportAttributeFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/ImportAttributeFMModel.java
index 40a00f806..ebee22db9 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/ImportAttributeFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/ImportAttributeFMModel.java
@@ -16,24 +16,25 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.ImportAttributeModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong>Import attribute(s) in specified context.</strong>
+ * Import attribute(s) in specified context.
  * </p>
  * <p>
  * Import attribute(s) to requested scope. Attribute name and scope are
@@ -46,36 +47,28 @@ public class ImportAttributeFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final ImportAttributeModel model;
+    private org.apache.tiles.template.ImportAttributeModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public ImportAttributeFMModel(ImportAttributeModel model) {
+    public ImportAttributeFMModel(org.apache.tiles.template.ImportAttributeModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
-        model.execute(
-            runtime.getParameter("name", String.class, null),
-            runtime.getParameter("scope", String.class, null),
-            runtime.getParameter("toName", String.class, null),
-            runtime.getParameter("ignore", Boolean.class, false),
-            request
-        );
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
+        model.execute(runtime.getParameter("name", java.lang.String.class, null),
+                runtime.getParameter("scope", java.lang.String.class, null),
+                runtime.getParameter("toName", java.lang.String.class, null),
+                runtime.getParameter("ignore", java.lang.Boolean.class, false), request);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertAttributeFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertAttributeFMModel.java
index 4e679acf1..67b36eec4 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertAttributeFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertAttributeFMModel.java
@@ -16,26 +16,26 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.api.Attribute;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.InsertAttributeModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong>Inserts the value of an attribute into the page.</strong>
+ * Inserts the value of an attribute into the page.
  * </p>
  * <p>
  * This tag can be flexibly used to insert the value of an attribute into a
@@ -47,15 +47,13 @@ import java.util.Map;
  * assigned a type, it will be treated as a String and included without any
  * special handling.
  * </p>
- *
+ * 
  * <p>
- * <strong>Example : </strong>
+ * Example :
  * </p>
- *
+ * 
  * <pre>
- * &lt;code&gt;
- *           &lt;tiles:insertAttribute name=&quot;body&quot; /&gt;
- *         &lt;/code&gt;
+ *     &lt;tiles:insertAttribute name=&quot;body&quot; /&gt;
  * </pre>
  */
 public class InsertAttributeFMModel implements TemplateDirectiveModel {
@@ -63,43 +61,34 @@ public class InsertAttributeFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final InsertAttributeModel model;
+    private org.apache.tiles.template.InsertAttributeModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public InsertAttributeFMModel(InsertAttributeModel model) {
+    public InsertAttributeFMModel(org.apache.tiles.template.InsertAttributeModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            runtime.getParameter("ignore", Boolean.class, false),
-            runtime.getParameter("preparer", String.class, null),
-            runtime.getParameter("role", String.class, null),
-            runtime.getParameter("defaultValue", Object.class, null),
-            runtime.getParameter("defaultValueRole", String.class, null),
-            runtime.getParameter("defaultValueType", String.class, null),
-            runtime.getParameter("name", String.class, null),
-            runtime.getParameter("value", Attribute.class, null),
-            runtime.getParameter("flush", Boolean.class, false),
-            request,
-            modelBody
-        );
+        model.execute(runtime.getParameter("ignore", java.lang.Boolean.class, false),
+                runtime.getParameter("preparer", java.lang.String.class, null),
+                runtime.getParameter("role", java.lang.String.class, null),
+                runtime.getParameter("defaultValue", java.lang.Object.class, null),
+                runtime.getParameter("defaultValueRole", java.lang.String.class, null),
+                runtime.getParameter("defaultValueType", java.lang.String.class, null),
+                runtime.getParameter("name", java.lang.String.class, null),
+                runtime.getParameter("value", org.apache.tiles.api.Attribute.class, null),
+                runtime.getParameter("flush", java.lang.Boolean.class, false), request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertDefinitionFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertDefinitionFMModel.java
index 4ae8fdff8..0f1cdd838 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertDefinitionFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertDefinitionFMModel.java
@@ -16,53 +16,51 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.InsertDefinitionModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong>Insert a definition.</strong>
+ * Insert a definition.
  * </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>.
+ * &lt;tiles:insertDefinition&gt; allows to define these attributes and pass
+ * them to the inserted jsp page, called template. Attributes are defined using
+ * nested tag &lt;tiles:putAttribute&gt; or &lt;tiles:putListAttribute&gt;.
  * </p>
  * <p>
- * You must specify <code>name</code> tag attribute, for inserting a definition
- * from definitions factory.
+ * You must specify name tag attribute, for inserting a definition from
+ * definitions factory.
  * </p>
  * <p>
- * <strong>Example : </strong>
+ * Example :
  * </p>
- *
+ * 
  * <pre>
- * &lt;code&gt;
- *           &lt;tiles:insertDefinition name=&quot;.my.tiles.definition 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;
+ *     &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;
  * </pre>
  */
 public class InsertDefinitionFMModel implements TemplateDirectiveModel {
@@ -70,41 +68,32 @@ public class InsertDefinitionFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final InsertDefinitionModel model;
+    private org.apache.tiles.template.InsertDefinitionModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public InsertDefinitionFMModel(InsertDefinitionModel model) {
+    public InsertDefinitionFMModel(org.apache.tiles.template.InsertDefinitionModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            runtime.getParameter("name", String.class, null),
-            runtime.getParameter("template", String.class, null),
-            runtime.getParameter("templateType", String.class, null),
-            runtime.getParameter("templateExpression", String.class, null),
-            runtime.getParameter("role", String.class, null),
-            runtime.getParameter("preparer", String.class, null),
-            runtime.getParameter("flush", Boolean.class, false),
-            request,
-            modelBody
-        );
+        model.execute(runtime.getParameter("name", java.lang.String.class, null),
+                runtime.getParameter("template", java.lang.String.class, null),
+                runtime.getParameter("templateType", java.lang.String.class, null),
+                runtime.getParameter("templateExpression", java.lang.String.class, null),
+                runtime.getParameter("role", java.lang.String.class, null),
+                runtime.getParameter("preparer", java.lang.String.class, null),
+                runtime.getParameter("flush", java.lang.Boolean.class, false), request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertTemplateFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertTemplateFMModel.java
index d769b6073..64c04acc9 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertTemplateFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/InsertTemplateFMModel.java
@@ -16,53 +16,51 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.InsertTemplateModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong>Insert a template.</strong>
+ * Insert a template.
  * </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>.
+ * or attributes. &lt;tiles:insertTemplate&gt; allows to define these attributes
+ * and pass them to the inserted jsp page, called template. Attributes are
+ * defined using nested tag &lt;tiles:putAttribute&gt; or
+ * &lt;tiles:putListAttribute&gt;.
  * </p>
  * <p>
- * You must specify <code>template</code> attribute, for inserting a template
+ * You must specify template attribute, for inserting a template
  * </p>
- *
+ * 
  * <p>
- * <strong>Example : </strong>
+ * Example :
  * </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;
+ *     &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;
  * </pre>
  */
 public class InsertTemplateFMModel implements TemplateDirectiveModel {
@@ -70,40 +68,31 @@ public class InsertTemplateFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final InsertTemplateModel model;
+    private org.apache.tiles.template.InsertTemplateModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public InsertTemplateFMModel(InsertTemplateModel model) {
+    public InsertTemplateFMModel(org.apache.tiles.template.InsertTemplateModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            runtime.getParameter("template", String.class, null),
-            runtime.getParameter("templateType", String.class, null),
-            runtime.getParameter("templateExpression", String.class, null),
-            runtime.getParameter("role", String.class, null),
-            runtime.getParameter("preparer", String.class, null),
-            runtime.getParameter("flush", Boolean.class, false),
-            request,
-            modelBody
-        );
+        model.execute(runtime.getParameter("template", java.lang.String.class, null),
+                runtime.getParameter("templateType", java.lang.String.class, null),
+                runtime.getParameter("templateExpression", java.lang.String.class, null),
+                runtime.getParameter("role", java.lang.String.class, null),
+                runtime.getParameter("preparer", java.lang.String.class, null),
+                runtime.getParameter("flush", java.lang.Boolean.class, false), request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/PutAttributeFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/PutAttributeFMModel.java
index 42ac040c4..3d71b32a3 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/PutAttributeFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/PutAttributeFMModel.java
@@ -16,25 +16,26 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.PutAttributeModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong>Put an attribute in enclosing attribute container tag.</strong>
+ * Put an attribute in enclosing attribute container tag.
  * </p>
  * <p>
  * Enclosing attribute container tag can be :
@@ -45,11 +46,11 @@ import java.util.Map;
  * <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.
+ * (or any other tag which implements the PutAttributeTagParent interface.
+ * Exception is thrown if no appropriate tag can be found.
  * </p>
  * <p>
- * Put tag can have following attributes :
+ * Put tag can have following atributes :
  * <ul>
  * <li>name : Name of the attribute</li>
  * <li>value : value to put as attribute</li>
@@ -70,40 +71,31 @@ public class PutAttributeFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final PutAttributeModel model;
+    private org.apache.tiles.template.PutAttributeModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public PutAttributeFMModel(PutAttributeModel model) {
+    public PutAttributeFMModel(org.apache.tiles.template.PutAttributeModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            runtime.getParameter("name", String.class, null),
-            runtime.getParameter("value", Object.class, null),
-            runtime.getParameter("expression", String.class, null),
-            runtime.getParameter("role", String.class, null),
-            runtime.getParameter("type", String.class, null),
-            runtime.getParameter("cascade", Boolean.class, false),
-            request,
-            modelBody
-        );
+        model.execute(runtime.getParameter("name", java.lang.String.class, null),
+                runtime.getParameter("value", java.lang.Object.class, null),
+                runtime.getParameter("expression", java.lang.String.class, null),
+                runtime.getParameter("role", java.lang.String.class, null),
+                runtime.getParameter("type", java.lang.String.class, null),
+                runtime.getParameter("cascade", java.lang.Boolean.class, false), request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/PutListAttributeFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/PutListAttributeFMModel.java
index 9b48faf22..3eb5cb2c7 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/PutListAttributeFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/PutListAttributeFMModel.java
@@ -16,25 +16,26 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.PutListAttributeModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * <p>
- * <strong>Declare a list that will be pass as attribute to tile. </strong>
+ * Declare a list that will be pass as attribute to tile.
  * </p>
  * <p>
  * Declare a list that will be pass as attribute to tile. List elements are
@@ -47,38 +48,29 @@ public class PutListAttributeFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final PutListAttributeModel model;
+    private org.apache.tiles.template.PutListAttributeModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public PutListAttributeFMModel(PutListAttributeModel model) {
+    public PutListAttributeFMModel(org.apache.tiles.template.PutListAttributeModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            runtime.getParameter("name", String.class, null),
-            runtime.getParameter("role", String.class, null),
-            runtime.getParameter("inherit", Boolean.class, false),
-            runtime.getParameter("cascade", Boolean.class, false),
-            request,
-            modelBody
-        );
+        model.execute(runtime.getParameter("name", java.lang.String.class, null),
+                runtime.getParameter("role", java.lang.String.class, null),
+                runtime.getParameter("inherit", java.lang.Boolean.class, false),
+                runtime.getParameter("cascade", java.lang.Boolean.class, false), request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/SetCurrentContainerFMModel.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/SetCurrentContainerFMModel.java
index 7703a80aa..66d56ce34 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/SetCurrentContainerFMModel.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/SetCurrentContainerFMModel.java
@@ -16,20 +16,21 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
+
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.SetCurrentContainerModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
  * Selects a container to be used as the "current" container.
@@ -39,33 +40,25 @@ public class SetCurrentContainerFMModel implements TemplateDirectiveModel {
     /**
      * The template model.
      */
-    private final SetCurrentContainerModel model;
+    private org.apache.tiles.template.SetCurrentContainerModel model;
 
     /**
      * Constructor.
      *
      * @param model The template model.
      */
-    public SetCurrentContainerFMModel(SetCurrentContainerModel model) {
+    public SetCurrentContainerFMModel(org.apache.tiles.template.SetCurrentContainerModel model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
-        model.execute(
-            runtime.getParameter("containerKey", String.class, null),
-            request
-        );
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.request.Request request = runtime.createRequest();
+        model.execute(runtime.getParameter("containerKey", java.lang.String.class, null), request);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java
index f7f3d9607..d91766a2b 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java
@@ -16,26 +16,140 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
 package org.apache.tiles.freemarker.template;
 
+/**
+ * This tag library provides Tiles tags.
+ */
 public class TilesFMModelRepository {
 
+    /**
+     * The "insertDefinition" directive.
+     */
+    private InsertDefinitionFMModel insertDefinition;
+
+    /**
+     * The "importAttribute" directive.
+     */
+    private ImportAttributeFMModel importAttribute;
+
+    /**
+     * The "setCurrentContainer" directive.
+     */
+    private SetCurrentContainerFMModel setCurrentContainer;
+
+    /**
+     * The "addListAttribute" directive.
+     */
+    private AddListAttributeFMModel addListAttribute;
+
+    /**
+     * The "getAsString" directive.
+     */
+    private GetAsStringFMModel getAsString;
+
+    /**
+     * The "insertAttribute" directive.
+     */
+    private InsertAttributeFMModel insertAttribute;
+
     /**
      * The "putAttribute" directive.
      */
-    private final PutAttributeFMModel putAttribute;
+    private PutAttributeFMModel putAttribute;
 
     /**
      * The "definition" directive.
      */
-    private final DefinitionFMModel definition;
+    private DefinitionFMModel definition;
+
+    /**
+     * The "addAttribute" directive.
+     */
+    private AddAttributeFMModel addAttribute;
+
+    /**
+     * The "putListAttribute" directive.
+     */
+    private PutListAttributeFMModel putListAttribute;
+
+    /**
+     * The "insertTemplate" directive.
+     */
+    private InsertTemplateFMModel insertTemplate;
 
     /**
      * Constructor.
      */
     public TilesFMModelRepository() {
+        insertDefinition = new InsertDefinitionFMModel(new org.apache.tiles.template.InsertDefinitionModel());
+        importAttribute = new ImportAttributeFMModel(new org.apache.tiles.template.ImportAttributeModel());
+        setCurrentContainer = new SetCurrentContainerFMModel(new org.apache.tiles.template.SetCurrentContainerModel());
+        addListAttribute = new AddListAttributeFMModel(new org.apache.tiles.template.AddListAttributeModel());
+        getAsString = new GetAsStringFMModel(new org.apache.tiles.template.GetAsStringModel());
+        insertAttribute = new InsertAttributeFMModel(new org.apache.tiles.template.InsertAttributeModel());
         putAttribute = new PutAttributeFMModel(new org.apache.tiles.template.PutAttributeModel());
         definition = new DefinitionFMModel(new org.apache.tiles.template.DefinitionModel());
+        addAttribute = new AddAttributeFMModel(new org.apache.tiles.template.AddAttributeModel());
+        putListAttribute = new PutListAttributeFMModel(new org.apache.tiles.template.PutListAttributeModel());
+        insertTemplate = new InsertTemplateFMModel(new org.apache.tiles.template.InsertTemplateModel());
+    }
+
+    /**
+     * Returns the "insertDefinition" directive.
+     *
+     * @return The "insertDefinition" directive.
+     */
+    public InsertDefinitionFMModel getInsertDefinition() {
+        return insertDefinition;
+    }
+
+    /**
+     * Returns the "importAttribute" directive.
+     *
+     * @return The "importAttribute" directive.
+     */
+    public ImportAttributeFMModel getImportAttribute() {
+        return importAttribute;
+    }
+
+    /**
+     * Returns the "setCurrentContainer" directive.
+     *
+     * @return The "setCurrentContainer" directive.
+     */
+    public SetCurrentContainerFMModel getSetCurrentContainer() {
+        return setCurrentContainer;
+    }
+
+    /**
+     * Returns the "addListAttribute" directive.
+     *
+     * @return The "addListAttribute" directive.
+     */
+    public AddListAttributeFMModel getAddListAttribute() {
+        return addListAttribute;
+    }
+
+    /**
+     * Returns the "getAsString" directive.
+     *
+     * @return The "getAsString" directive.
+     */
+    public GetAsStringFMModel getGetAsString() {
+        return getAsString;
+    }
+
+    /**
+     * Returns the "insertAttribute" directive.
+     *
+     * @return The "insertAttribute" directive.
+     */
+    public InsertAttributeFMModel getInsertAttribute() {
+        return insertAttribute;
     }
 
     /**
@@ -56,4 +170,30 @@ public class TilesFMModelRepository {
         return definition;
     }
 
+    /**
+     * Returns the "addAttribute" directive.
+     *
+     * @return The "addAttribute" directive.
+     */
+    public AddAttributeFMModel getAddAttribute() {
+        return addAttribute;
+    }
+
+    /**
+     * Returns the "putListAttribute" directive.
+     *
+     * @return The "putListAttribute" directive.
+     */
+    public PutListAttributeFMModel getPutListAttribute() {
+        return putListAttribute;
+    }
+
+    /**
+     * Returns the "insertTemplate" directive.
+     *
+     * @return The "insertTemplate" directive.
+     */
+    public InsertTemplateFMModel getInsertTemplate() {
+        return insertTemplate;
+    }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/AddAttributeTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/AddAttributeTag.java
index affe32dcc..53c42cef2 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/AddAttributeTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/AddAttributeTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -31,8 +31,8 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
 
 /**
  * <p>
- * Add an element to the surrounding list. Equivalent to 'putAttribute',
- * but for list element.
+ * Add an element to the surrounding list. Equivalent to 'putAttribute', but for
+ * list element.
  * </p>
  * 
  * <p>
@@ -49,20 +49,19 @@ public class AddAttributeTag extends SimpleTagSupport {
     private org.apache.tiles.template.AddAttributeModel model = new org.apache.tiles.template.AddAttributeModel();
 
     /**
-     * The value of the attribute. Use this parameter, or
-     * expression, or body.
+     * The value of the attribute. Use this parameter, or expression, or body.
      */
     private java.lang.Object value;
 
     /**
-     * The expression to calculate the value from. Use this
-     * parameter, or value, or body.
+     * The expression to calculate the value from. Use this parameter, or value, or
+     * body.
      */
     private java.lang.String expression;
 
     /**
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * A comma-separated list of roles. If present, the attribute will be rendered
+     * only if the current user belongs to one of the roles.
      */
     private java.lang.String role;
 
@@ -74,9 +73,8 @@ public class AddAttributeTag extends SimpleTagSupport {
     /**
      * Getter for value property.
      *
-     * @return
-     * The value of the attribute. Use this parameter, or
-     * expression, or body.
+     * @return The value of the attribute. Use this parameter, or expression, or
+     *         body.
      */
     public java.lang.Object getValue() {
         return value;
@@ -85,9 +83,8 @@ public class AddAttributeTag extends SimpleTagSupport {
     /**
      * Setter for value property.
      *
-     * @param value
-     * The value of the attribute. Use this parameter, or
-     * expression, or body.
+     * @param value The value of the attribute. Use this parameter, or expression,
+     *              or body.
      */
     public void setValue(java.lang.Object value) {
         this.value = value;
@@ -96,9 +93,8 @@ public class AddAttributeTag extends SimpleTagSupport {
     /**
      * Getter for expression property.
      *
-     * @return
-     * The expression to calculate the value from. Use this
-     * parameter, or value, or body.
+     * @return The expression to calculate the value from. Use this parameter, or
+     *         value, or body.
      */
     public java.lang.String getExpression() {
         return expression;
@@ -107,9 +103,8 @@ public class AddAttributeTag extends SimpleTagSupport {
     /**
      * Setter for expression property.
      *
-     * @param expression
-     * The expression to calculate the value from. Use this
-     * parameter, or value, or body.
+     * @param expression The expression to calculate the value from. Use this
+     *                   parameter, or value, or body.
      */
     public void setExpression(java.lang.String expression) {
         this.expression = expression;
@@ -118,9 +113,8 @@ public class AddAttributeTag extends SimpleTagSupport {
     /**
      * Getter for role property.
      *
-     * @return
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * @return A comma-separated list of roles. If present, the attribute will be
+     *         rendered only if the current user belongs to one of the roles.
      */
     public java.lang.String getRole() {
         return role;
@@ -129,9 +123,8 @@ public class AddAttributeTag extends SimpleTagSupport {
     /**
      * Setter for role property.
      *
-     * @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 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.
      */
     public void setRole(java.lang.String role) {
         this.role = role;
@@ -140,8 +133,7 @@ public class AddAttributeTag extends SimpleTagSupport {
     /**
      * Getter for type property.
      *
-     * @return
-     * The type (renderer) of the attribute.
+     * @return The type (renderer) of the attribute.
      */
     public java.lang.String getType() {
         return type;
@@ -150,8 +142,7 @@ public class AddAttributeTag extends SimpleTagSupport {
     /**
      * Setter for type property.
      *
-     * @param type
-     * The type (renderer) of the attribute.
+     * @param type The type (renderer) of the attribute.
      */
     public void setType(java.lang.String type) {
         this.type = type;
@@ -167,15 +158,8 @@ public class AddAttributeTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            value,
-            expression,
-            role,
-            type,
-            request, modelBody
-
-        );
+        model.execute(value, expression, role, type, request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/AddListAttributeTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/AddListAttributeTag.java
index fd39f386f..0dc5c9fde 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/AddListAttributeTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/AddListAttributeTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -31,7 +31,7 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
 
 /**
  * <p>
- * Declare a list that will be pass as an attribute. 
+ * Declare a list that will be pass as an attribute.
  * </p>
  * <p>
  * Declare a list that will be pass as an attribute . List elements are added
@@ -54,8 +54,7 @@ public class AddListAttributeTag extends SimpleTagSupport {
     /**
      * Getter for role property.
      *
-     * @return
-     * The comma-separated list of roles that can use the list attribute.
+     * @return The comma-separated list of roles that can use the list attribute.
      */
     public java.lang.String getRole() {
         return role;
@@ -64,8 +63,8 @@ public class AddListAttributeTag extends SimpleTagSupport {
     /**
      * Setter for role property.
      *
-     * @param role
-     * The comma-separated list of roles that can use the list attribute.
+     * @param role The comma-separated list of roles that can use the list
+     *             attribute.
      */
     public void setRole(java.lang.String role) {
         this.role = role;
@@ -81,12 +80,8 @@ public class AddListAttributeTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            role,
-            request, modelBody
-
-        );
+        model.execute(role, request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/DefinitionTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/DefinitionTag.java
index e755d18dc..eac32da5a 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/DefinitionTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/DefinitionTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -31,7 +31,7 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
 
 /**
  * <p>
- * Create a definition at runtime. 
+ * Create a definition at runtime.
  * </p>
  * <p>
  * Create a new definition at runtime. Newly created definition will be
@@ -46,8 +46,8 @@ public class DefinitionTag extends SimpleTagSupport {
     private org.apache.tiles.template.DefinitionModel model = new org.apache.tiles.template.DefinitionModel();
 
     /**
-     * The name of the definition to create. If not specified, an
-     * anonymous definition will be created.
+     * The name of the definition to create. If not specified, an anonymous
+     * definition will be created.
      */
     private java.lang.String name;
 
@@ -57,8 +57,8 @@ public class DefinitionTag extends SimpleTagSupport {
     private java.lang.String template;
 
     /**
-     * A comma-separated list of roles. If present, the definition
-     * will be rendered only if the current user belongs to one of the roles.
+     * A comma-separated list of roles. If present, the definition will be rendered
+     * only if the current user belongs to one of the roles.
      */
     private java.lang.String role;
 
@@ -68,17 +68,15 @@ public class DefinitionTag extends SimpleTagSupport {
     private java.lang.String extendsParam;
 
     /**
-     * The preparer to use to invoke before the definition is
-     * rendered.
+     * The preparer to use to invoke before the definition is rendered.
      */
     private java.lang.String preparer;
 
     /**
      * Getter for name property.
      *
-     * @return
-     * The name of the definition to create. If not specified, an
-     * anonymous definition will be created.
+     * @return The name of the definition to create. If not specified, an anonymous
+     *         definition will be created.
      */
     public java.lang.String getName() {
         return name;
@@ -87,9 +85,8 @@ public class DefinitionTag extends SimpleTagSupport {
     /**
      * Setter for name property.
      *
-     * @param name
-     * The name of the definition to create. If not specified, an
-     * anonymous definition will be created.
+     * @param name The name of the definition to create. If not specified, an
+     *             anonymous definition will be created.
      */
     public void setName(java.lang.String name) {
         this.name = name;
@@ -98,8 +95,7 @@ public class DefinitionTag extends SimpleTagSupport {
     /**
      * Getter for template property.
      *
-     * @return
-     * The template of this definition.
+     * @return The template of this definition.
      */
     public java.lang.String getTemplate() {
         return template;
@@ -108,8 +104,7 @@ public class DefinitionTag extends SimpleTagSupport {
     /**
      * Setter for template property.
      *
-     * @param template
-     * The template of this definition.
+     * @param template The template of this definition.
      */
     public void setTemplate(java.lang.String template) {
         this.template = template;
@@ -118,9 +113,8 @@ public class DefinitionTag extends SimpleTagSupport {
     /**
      * Getter for role property.
      *
-     * @return
-     * A comma-separated list of roles. If present, the definition
-     * will be rendered only if the current user belongs to one of the roles.
+     * @return A comma-separated list of roles. If present, the definition will be
+     *         rendered only if the current user belongs to one of the roles.
      */
     public java.lang.String getRole() {
         return role;
@@ -129,9 +123,8 @@ public class DefinitionTag extends SimpleTagSupport {
     /**
      * Setter for role property.
      *
-     * @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 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.
      */
     public void setRole(java.lang.String role) {
         this.role = role;
@@ -140,8 +133,7 @@ public class DefinitionTag extends SimpleTagSupport {
     /**
      * Getter for extends property.
      *
-     * @return
-     * The definition name that this definition extends.
+     * @return The definition name that this definition extends.
      */
     public java.lang.String getExtends() {
         return extendsParam;
@@ -150,8 +142,7 @@ public class DefinitionTag extends SimpleTagSupport {
     /**
      * Setter for extends property.
      *
-     * @param extendsParam
-     * The definition name that this definition extends.
+     * @param extendsParam The definition name that this definition extends.
      */
     public void setExtends(java.lang.String extendsParam) {
         this.extendsParam = extendsParam;
@@ -160,9 +151,7 @@ public class DefinitionTag extends SimpleTagSupport {
     /**
      * Getter for preparer property.
      *
-     * @return
-     * The preparer to use to invoke before the definition is
-     * rendered.
+     * @return The preparer to use to invoke before the definition is rendered.
      */
     public java.lang.String getPreparer() {
         return preparer;
@@ -171,9 +160,8 @@ public class DefinitionTag extends SimpleTagSupport {
     /**
      * Setter for preparer property.
      *
-     * @param preparer
-     * The preparer to use to invoke before the definition is
-     * rendered.
+     * @param preparer The preparer to use to invoke before the definition is
+     *                 rendered.
      */
     public void setPreparer(java.lang.String preparer) {
         this.preparer = preparer;
@@ -189,16 +177,8 @@ public class DefinitionTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            name,
-            template,
-            role,
-            extendsParam,
-            preparer,
-            request, modelBody
-
-        );
+        model.execute(name, template, role, extendsParam, preparer, request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/GetAsStringTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/GetAsStringTag.java
index 1eb28583d..e34a1efc1 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/GetAsStringTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/GetAsStringTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -31,8 +31,7 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
 
 /**
  * <p>
- *  Render the value of the specified template attribute to the current
- * Writer
+ * Render the value of the specified template attribute to the current Writer
  * </p>
  * 
  * <p>
@@ -49,8 +48,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     private org.apache.tiles.template.GetAsStringModel model = new org.apache.tiles.template.GetAsStringModel();
 
     /**
-     * If true, if an exception happens during
-     * rendering, of if the attribute is null, the problem will be ignored.
+     * If true, if an exception happens during rendering, of if the attribute is
+     * null, the problem will be ignored.
      */
     private boolean ignore;
 
@@ -60,26 +59,26 @@ public class GetAsStringTag extends SimpleTagSupport {
     private java.lang.String preparer;
 
     /**
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * A comma-separated list of roles. If present, the attribute will be rendered
+     * only if the current user belongs to one of the roles.
      */
     private java.lang.String role;
 
     /**
-     * The default value of the attribute. To use only if
-     * the attribute was not computed.
+     * The default value of the attribute. To use only if the attribute was not
+     * computed.
      */
     private java.lang.Object defaultValue;
 
     /**
-     * The default comma-separated list of roles. To use
-     * only if the attribute was not computed.
+     * The default comma-separated list of roles. To use only if the attribute was
+     * not computed.
      */
     private java.lang.String defaultValueRole;
 
     /**
-     * The default type of the attribute. To use only if
-     * the attribute was not computed.
+     * The default type of the attribute. To use only if the attribute was not
+     * computed.
      */
     private java.lang.String defaultValueType;
 
@@ -96,9 +95,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Getter for ignore property.
      *
-     * @return
-     * If true, if an exception happens during
-     * rendering, of if the attribute is null, the problem will be ignored.
+     * @return If true, if an exception happens during rendering, of if the
+     *         attribute is null, the problem will be ignored.
      */
     public boolean isIgnore() {
         return ignore;
@@ -107,9 +105,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Setter for ignore property.
      *
-     * @param ignore
-     * If true, if an exception happens during
-     * rendering, of if the attribute is null, the problem will be ignored.
+     * @param ignore If true, if an exception happens during rendering, of if the
+     *               attribute is null, the problem will be ignored.
      */
     public void setIgnore(boolean ignore) {
         this.ignore = ignore;
@@ -118,8 +115,7 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Getter for preparer property.
      *
-     * @return
-     * The preparer to invoke before rendering the attribute.
+     * @return The preparer to invoke before rendering the attribute.
      */
     public java.lang.String getPreparer() {
         return preparer;
@@ -128,8 +124,7 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Setter for preparer property.
      *
-     * @param preparer
-     * The preparer to invoke before rendering the attribute.
+     * @param preparer The preparer to invoke before rendering the attribute.
      */
     public void setPreparer(java.lang.String preparer) {
         this.preparer = preparer;
@@ -138,9 +133,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Getter for role property.
      *
-     * @return
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * @return A comma-separated list of roles. If present, the attribute will be
+     *         rendered only if the current user belongs to one of the roles.
      */
     public java.lang.String getRole() {
         return role;
@@ -149,9 +143,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Setter for role property.
      *
-     * @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 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.
      */
     public void setRole(java.lang.String role) {
         this.role = role;
@@ -160,9 +153,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Getter for defaultValue property.
      *
-     * @return
-     * The default value of the attribute. To use only if
-     * the attribute was not computed.
+     * @return The default value of the attribute. To use only if the attribute was
+     *         not computed.
      */
     public java.lang.Object getDefaultValue() {
         return defaultValue;
@@ -171,9 +163,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Setter for defaultValue property.
      *
-     * @param defaultValue
-     * The default value of the attribute. To use only if
-     * the attribute was not computed.
+     * @param defaultValue The default value of the attribute. To use only if the
+     *                     attribute was not computed.
      */
     public void setDefaultValue(java.lang.Object defaultValue) {
         this.defaultValue = defaultValue;
@@ -182,9 +173,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Getter for defaultValueRole property.
      *
-     * @return
-     * The default comma-separated list of roles. To use
-     * only if the attribute was not computed.
+     * @return The default comma-separated list of roles. To use only if the
+     *         attribute was not computed.
      */
     public java.lang.String getDefaultValueRole() {
         return defaultValueRole;
@@ -193,9 +183,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Setter for defaultValueRole property.
      *
-     * @param defaultValueRole
-     * The default comma-separated list of roles. 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.
      */
     public void setDefaultValueRole(java.lang.String defaultValueRole) {
         this.defaultValueRole = defaultValueRole;
@@ -204,9 +193,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Getter for defaultValueType property.
      *
-     * @return
-     * The default type of the attribute. To use only if
-     * the attribute was not computed.
+     * @return The default type of the attribute. To use only if the attribute was
+     *         not computed.
      */
     public java.lang.String getDefaultValueType() {
         return defaultValueType;
@@ -215,9 +203,8 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Setter for defaultValueType property.
      *
-     * @param defaultValueType
-     * The default type of the attribute. 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.
      */
     public void setDefaultValueType(java.lang.String defaultValueType) {
         this.defaultValueType = defaultValueType;
@@ -226,8 +213,7 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Getter for name property.
      *
-     * @return
-     * The name of the attribute.
+     * @return The name of the attribute.
      */
     public java.lang.String getName() {
         return name;
@@ -236,8 +222,7 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Setter for name property.
      *
-     * @param name
-     * The name of the attribute.
+     * @param name The name of the attribute.
      */
     public void setName(java.lang.String name) {
         this.name = name;
@@ -246,8 +231,7 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Getter for value property.
      *
-     * @return
-     * The attribute to use immediately, if not null.
+     * @return The attribute to use immediately, if not null.
      */
     public org.apache.tiles.api.Attribute getValue() {
         return value;
@@ -256,8 +240,7 @@ public class GetAsStringTag extends SimpleTagSupport {
     /**
      * Setter for value property.
      *
-     * @param value
-     * The attribute to use immediately, if not null.
+     * @param value The attribute to use immediately, if not null.
      */
     public void setValue(org.apache.tiles.api.Attribute value) {
         this.value = value;
@@ -273,19 +256,9 @@ public class GetAsStringTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            ignore,
-            preparer,
-            role,
-            defaultValue,
-            defaultValueRole,
-            defaultValueType,
-            name,
-            value,
-            request, modelBody
-
-        );
+        model.execute(ignore, preparer, role, defaultValue, defaultValueRole, defaultValueType, name, value, request,
+                modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/ImportAttributeTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/ImportAttributeTag.java
index 13d8630cc..56ca370e4 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/ImportAttributeTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/ImportAttributeTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -46,20 +46,20 @@ public class ImportAttributeTag extends SimpleTagSupport {
     private org.apache.tiles.template.ImportAttributeModel model = new org.apache.tiles.template.ImportAttributeModel();
 
     /**
-     * The name of the attribute to import. If it is null, all the attributes will be imported.
+     * The name of the attribute to import. If it is null, all the attributes will
+     * be imported.
      */
     private java.lang.String name;
 
     /**
-     * The scope into which the attribute(s) will be imported. If
-     * null, the import will go in page scope.
+     * The scope into which the attribute(s) will be imported. If null, the import
+     * will go in page scope.
      */
     private java.lang.String scope;
 
     /**
-     * The name of the attribute into which the attribute will be
-     * imported. To be used in conjunction to name. If
-     * null, the value of name will be used.
+     * The name of the attribute into which the attribute will be imported. To be
+     * used in conjunction to name. If null, the value of name will be used.
      */
     private java.lang.String toName;
 
@@ -71,8 +71,8 @@ public class ImportAttributeTag extends SimpleTagSupport {
     /**
      * Getter for name property.
      *
-     * @return
-     * The name of the attribute to import. If it is null, all the attributes will be imported.
+     * @return The name of the attribute to import. If it is null, all the
+     *         attributes will be imported.
      */
     public java.lang.String getName() {
         return name;
@@ -81,8 +81,8 @@ public class ImportAttributeTag extends SimpleTagSupport {
     /**
      * Setter for name property.
      *
-     * @param name
-     * The name of the attribute to import. If it is null, all the attributes will be imported.
+     * @param name The name of the attribute to import. If it is null, all the
+     *             attributes will be imported.
      */
     public void setName(java.lang.String name) {
         this.name = name;
@@ -91,9 +91,8 @@ public class ImportAttributeTag extends SimpleTagSupport {
     /**
      * Getter for scope property.
      *
-     * @return
-     * The scope into which the attribute(s) will be imported. If
-     * null, the import will go in page scope.
+     * @return The scope into which the attribute(s) will be imported. If null, the
+     *         import will go in page scope.
      */
     public java.lang.String getScope() {
         return scope;
@@ -102,9 +101,8 @@ public class ImportAttributeTag extends SimpleTagSupport {
     /**
      * Setter for scope property.
      *
-     * @param scope
-     * The scope into which the attribute(s) will be imported. If
-     * null, the import will go in page scope.
+     * @param scope The scope into which the attribute(s) will be imported. If null,
+     *              the import will go in page scope.
      */
     public void setScope(java.lang.String scope) {
         this.scope = scope;
@@ -113,10 +111,9 @@ public class ImportAttributeTag extends SimpleTagSupport {
     /**
      * Getter for toName property.
      *
-     * @return
-     * The name of the attribute into which the attribute will be
-     * imported. To be used in conjunction to name. If
-     * null, the value of name will be used.
+     * @return The name of the attribute into which the attribute will be imported.
+     *         To be used in conjunction to name. If null, the value of name will be
+     *         used.
      */
     public java.lang.String getToName() {
         return toName;
@@ -125,10 +122,9 @@ public class ImportAttributeTag extends SimpleTagSupport {
     /**
      * Setter for toName property.
      *
-     * @param toName
-     * The name of the attribute into which the attribute will be
-     * imported. To be used in conjunction to name. If
-     * null, the value of name will be used.
+     * @param toName The name of the attribute into which the attribute will be
+     *               imported. To be used in conjunction to name. If null, the value
+     *               of name will be used.
      */
     public void setToName(java.lang.String toName) {
         this.toName = toName;
@@ -137,8 +133,8 @@ public class ImportAttributeTag extends SimpleTagSupport {
     /**
      * Getter for ignore property.
      *
-     * @return
-     * If true, if the attribute is not present, the problem will be ignored.
+     * @return If true, if the attribute is not present, the problem will be
+     *         ignored.
      */
     public boolean isIgnore() {
         return ignore;
@@ -147,8 +143,8 @@ public class ImportAttributeTag extends SimpleTagSupport {
     /**
      * Setter for ignore property.
      *
-     * @param ignore
-     * If true, if the attribute is not present, the problem will be ignored.
+     * @param ignore If true, if the attribute is not present, the problem will be
+     *               ignored.
      */
     public void setIgnore(boolean ignore) {
         this.ignore = ignore;
@@ -164,14 +160,7 @@ public class ImportAttributeTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
-        model.execute(
-            name,
-            scope,
-            toName,
-            ignore,
-            request
-
-        );
+        org.apache.tiles.request.Request request = runtime.createRequest();
+        model.execute(name, scope, toName, ignore, request);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertAttributeTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertAttributeTag.java
index f20d83ba0..be288e864 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertAttributeTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertAttributeTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -45,13 +45,12 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
  * </p>
  * 
  * <p>
- * Example : 
+ * Example :
  * </p>
  * 
  * <pre>
  *     &lt;tiles:insertAttribute name=&quot;body&quot; /&gt;
  * </pre>
- *     
  */
 public class InsertAttributeTag extends SimpleTagSupport {
 
@@ -61,8 +60,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     private org.apache.tiles.template.InsertAttributeModel model = new org.apache.tiles.template.InsertAttributeModel();
 
     /**
-     * If true, if an exception happens during
-     * rendering, of if the attribute is null, the problem will be ignored.
+     * If true, if an exception happens during rendering, of if the attribute is
+     * null, the problem will be ignored.
      */
     private boolean ignore;
 
@@ -72,26 +71,26 @@ public class InsertAttributeTag extends SimpleTagSupport {
     private java.lang.String preparer;
 
     /**
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * A comma-separated list of roles. If present, the attribute will be rendered
+     * only if the current user belongs to one of the roles.
      */
     private java.lang.String role;
 
     /**
-     * The default value of the attribute. To use only if
-     * the attribute was not computed.
+     * The default value of the attribute. To use only if the attribute was not
+     * computed.
      */
     private java.lang.Object defaultValue;
 
     /**
-     * The default comma-separated list of roles. To use
-     * only if the attribute was not computed.
+     * The default comma-separated list of roles. To use only if the attribute was
+     * not computed.
      */
     private java.lang.String defaultValueRole;
 
     /**
-     * The default type of the attribute. To use only if
-     * the attribute was not computed.
+     * The default type of the attribute. To use only if the attribute was not
+     * computed.
      */
     private java.lang.String defaultValueType;
 
@@ -113,9 +112,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Getter for ignore property.
      *
-     * @return
-     * If true, if an exception happens during
-     * rendering, of if the attribute is null, the problem will be ignored.
+     * @return If true, if an exception happens during rendering, of if the
+     *         attribute is null, the problem will be ignored.
      */
     public boolean isIgnore() {
         return ignore;
@@ -124,9 +122,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Setter for ignore property.
      *
-     * @param ignore
-     * If true, if an exception happens during
-     * rendering, of if the attribute is null, the problem will be ignored.
+     * @param ignore If true, if an exception happens during rendering, of if the
+     *               attribute is null, the problem will be ignored.
      */
     public void setIgnore(boolean ignore) {
         this.ignore = ignore;
@@ -135,8 +132,7 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Getter for preparer property.
      *
-     * @return
-     * The preparer to invoke before rendering the attribute.
+     * @return The preparer to invoke before rendering the attribute.
      */
     public java.lang.String getPreparer() {
         return preparer;
@@ -145,8 +141,7 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Setter for preparer property.
      *
-     * @param preparer
-     * The preparer to invoke before rendering the attribute.
+     * @param preparer The preparer to invoke before rendering the attribute.
      */
     public void setPreparer(java.lang.String preparer) {
         this.preparer = preparer;
@@ -155,9 +150,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Getter for role property.
      *
-     * @return
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * @return A comma-separated list of roles. If present, the attribute will be
+     *         rendered only if the current user belongs to one of the roles.
      */
     public java.lang.String getRole() {
         return role;
@@ -166,9 +160,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Setter for role property.
      *
-     * @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 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.
      */
     public void setRole(java.lang.String role) {
         this.role = role;
@@ -177,9 +170,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Getter for defaultValue property.
      *
-     * @return
-     * The default value of the attribute. To use only if
-     * the attribute was not computed.
+     * @return The default value of the attribute. To use only if the attribute was
+     *         not computed.
      */
     public java.lang.Object getDefaultValue() {
         return defaultValue;
@@ -188,9 +180,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Setter for defaultValue property.
      *
-     * @param defaultValue
-     * The default value of the attribute. To use only if
-     * the attribute was not computed.
+     * @param defaultValue The default value of the attribute. To use only if the
+     *                     attribute was not computed.
      */
     public void setDefaultValue(java.lang.Object defaultValue) {
         this.defaultValue = defaultValue;
@@ -199,9 +190,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Getter for defaultValueRole property.
      *
-     * @return
-     * The default comma-separated list of roles. To use
-     * only if the attribute was not computed.
+     * @return The default comma-separated list of roles. To use only if the
+     *         attribute was not computed.
      */
     public java.lang.String getDefaultValueRole() {
         return defaultValueRole;
@@ -210,9 +200,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Setter for defaultValueRole property.
      *
-     * @param defaultValueRole
-     * The default comma-separated list of roles. 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.
      */
     public void setDefaultValueRole(java.lang.String defaultValueRole) {
         this.defaultValueRole = defaultValueRole;
@@ -221,9 +210,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Getter for defaultValueType property.
      *
-     * @return
-     * The default type of the attribute. To use only if
-     * the attribute was not computed.
+     * @return The default type of the attribute. To use only if the attribute was
+     *         not computed.
      */
     public java.lang.String getDefaultValueType() {
         return defaultValueType;
@@ -232,9 +220,8 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Setter for defaultValueType property.
      *
-     * @param defaultValueType
-     * The default type of the attribute. 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.
      */
     public void setDefaultValueType(java.lang.String defaultValueType) {
         this.defaultValueType = defaultValueType;
@@ -243,8 +230,7 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Getter for name property.
      *
-     * @return
-     * The name of the attribute.
+     * @return The name of the attribute.
      */
     public java.lang.String getName() {
         return name;
@@ -253,8 +239,7 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Setter for name property.
      *
-     * @param name
-     * The name of the attribute.
+     * @param name The name of the attribute.
      */
     public void setName(java.lang.String name) {
         this.name = name;
@@ -263,8 +248,7 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Getter for value property.
      *
-     * @return
-     * The attribute to use immediately, if not null.
+     * @return The attribute to use immediately, if not null.
      */
     public org.apache.tiles.api.Attribute getValue() {
         return value;
@@ -273,8 +257,7 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Setter for value property.
      *
-     * @param value
-     * The attribute to use immediately, if not null.
+     * @param value The attribute to use immediately, if not null.
      */
     public void setValue(org.apache.tiles.api.Attribute value) {
         this.value = value;
@@ -283,8 +266,7 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Getter for flush property.
      *
-     * @return
-     * If true, the response will be flushed after the insert.
+     * @return If true, the response will be flushed after the insert.
      */
     public boolean isFlush() {
         return flush;
@@ -293,8 +275,7 @@ public class InsertAttributeTag extends SimpleTagSupport {
     /**
      * Setter for flush property.
      *
-     * @param flush
-     * If true, the response will be flushed after the insert.
+     * @param flush If true, the response will be flushed after the insert.
      */
     public void setFlush(boolean flush) {
         this.flush = flush;
@@ -310,20 +291,9 @@ public class InsertAttributeTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            ignore,
-            preparer,
-            role,
-            defaultValue,
-            defaultValueRole,
-            defaultValueType,
-            name,
-            value,
-            flush,
-            request, modelBody
-
-        );
+        model.execute(ignore, preparer, role, defaultValue, defaultValueRole, defaultValueType, name, value, flush,
+                request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertDefinitionTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertDefinitionTag.java
index d513601b9..0beec1aa1 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertDefinitionTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertDefinitionTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -37,28 +37,27 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
  * 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.
- * &lt;tiles:insertDefinition&gt; allows to define these attributes
- * and pass them to the inserted jsp page, called template. Attributes are
- * defined using nested tag &lt;tiles:putAttribute&gt; or
- * &lt;tiles:putListAttribute&gt;.
+ * &lt;tiles:insertDefinition&gt; allows to define these attributes and pass
+ * them to the inserted jsp page, called template. Attributes are defined using
+ * nested tag &lt;tiles:putAttribute&gt; or &lt;tiles:putListAttribute&gt;.
  * </p>
  * <p>
- * You must specify name tag attribute, for inserting a definition from definitions factory.
+ * You must specify name tag attribute, for inserting a definition from
+ * definitions factory.
  * </p>
  * <p>
- * Example : 
+ * Example :
  * </p>
  * 
  * <pre>
  *     &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: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;
  * </pre>
- *     
  */
 public class InsertDefinitionTag extends SimpleTagSupport {
 
@@ -73,8 +72,8 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     private java.lang.String definitionName;
 
     /**
-     * If specified, this template will be used instead of the
-     * one used by the definition.
+     * If specified, this template will be used instead of the one used by the
+     * definition.
      */
     private java.lang.String template;
 
@@ -89,15 +88,14 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     private java.lang.String templateExpression;
 
     /**
-     * A comma-separated list of roles. If present, the definition
-     * will be rendered only if the current user belongs to one of the roles.
+     * A comma-separated list of roles. If present, the definition will be rendered
+     * only if the current user belongs to one of the roles.
      */
     private java.lang.String role;
 
     /**
-     * The preparer to use to invoke before the definition is
-     * rendered. If specified, it overrides the preparer specified in the
-     * definition itself.
+     * The preparer to use to invoke before the definition is rendered. If
+     * specified, it overrides the preparer specified in the definition itself.
      */
     private java.lang.String preparer;
 
@@ -109,8 +107,7 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Getter for name property.
      *
-     * @return
-     * The name of the definition to render.
+     * @return The name of the definition to render.
      */
     public java.lang.String getName() {
         return definitionName;
@@ -119,8 +116,7 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Setter for name property.
      *
-     * @param definitionName
-     * The name of the definition to render.
+     * @param definitionName The name of the definition to render.
      */
     public void setName(java.lang.String definitionName) {
         this.definitionName = definitionName;
@@ -129,9 +125,8 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Getter for template property.
      *
-     * @return
-     * If specified, this template will be used instead of the
-     * one used by the definition.
+     * @return If specified, this template will be used instead of the one used by
+     *         the definition.
      */
     public java.lang.String getTemplate() {
         return template;
@@ -140,9 +135,8 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Setter for template property.
      *
-     * @param template
-     * If specified, this template will be used instead of the
-     * one used by the definition.
+     * @param template If specified, this template will be used instead of the one
+     *                 used by the definition.
      */
     public void setTemplate(java.lang.String template) {
         this.template = template;
@@ -151,8 +145,7 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Getter for templateType property.
      *
-     * @return
-     * The type of the template attribute.
+     * @return The type of the template attribute.
      */
     public java.lang.String getTemplateType() {
         return templateType;
@@ -161,8 +154,7 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Setter for templateType property.
      *
-     * @param templateType
-     * The type of the template attribute.
+     * @param templateType The type of the template attribute.
      */
     public void setTemplateType(java.lang.String templateType) {
         this.templateType = templateType;
@@ -171,8 +163,7 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Getter for templateExpression property.
      *
-     * @return
-     * The expression to evaluate to get the value of the template.
+     * @return The expression to evaluate to get the value of the template.
      */
     public java.lang.String getTemplateExpression() {
         return templateExpression;
@@ -181,8 +172,8 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Setter for templateExpression property.
      *
-     * @param templateExpression
-     * The expression to evaluate to get the value of the template.
+     * @param templateExpression The expression to evaluate to get the value of the
+     *                           template.
      */
     public void setTemplateExpression(java.lang.String templateExpression) {
         this.templateExpression = templateExpression;
@@ -191,9 +182,8 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Getter for role property.
      *
-     * @return
-     * A comma-separated list of roles. If present, the definition
-     * will be rendered only if the current user belongs to one of the roles.
+     * @return A comma-separated list of roles. If present, the definition will be
+     *         rendered only if the current user belongs to one of the roles.
      */
     public java.lang.String getRole() {
         return role;
@@ -202,9 +192,8 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Setter for role property.
      *
-     * @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 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.
      */
     public void setRole(java.lang.String role) {
         this.role = role;
@@ -213,10 +202,9 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Getter for preparer property.
      *
-     * @return
-     * The preparer to use to invoke before the definition is
-     * rendered. If specified, it overrides the preparer specified in the
-     * definition itself.
+     * @return The preparer to use to invoke before the definition is rendered. If
+     *         specified, it overrides the preparer specified in the definition
+     *         itself.
      */
     public java.lang.String getPreparer() {
         return preparer;
@@ -225,10 +213,9 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Setter for preparer property.
      *
-     * @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 preparer The preparer to use to invoke before the definition is
+     *                 rendered. If specified, it overrides the preparer specified
+     *                 in the definition itself.
      */
     public void setPreparer(java.lang.String preparer) {
         this.preparer = preparer;
@@ -237,8 +224,7 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Getter for flush property.
      *
-     * @return
-     * If true, the response will be flushed after the insert.
+     * @return If true, the response will be flushed after the insert.
      */
     public boolean isFlush() {
         return flush;
@@ -247,8 +233,7 @@ public class InsertDefinitionTag extends SimpleTagSupport {
     /**
      * Setter for flush property.
      *
-     * @param flush
-     * If true, the response will be flushed after the insert.
+     * @param flush If true, the response will be flushed after the insert.
      */
     public void setFlush(boolean flush) {
         this.flush = flush;
@@ -264,18 +249,9 @@ public class InsertDefinitionTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            definitionName,
-            template,
-            templateType,
-            templateExpression,
-            role,
-            preparer,
-            flush,
-            request, modelBody
-
-        );
+        model.execute(definitionName, template, templateType, templateExpression, role, preparer, flush, request,
+                modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertTemplateTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertTemplateTag.java
index 90cd2d8cf..afe633881 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertTemplateTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/InsertTemplateTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -36,10 +36,9 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
  * <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. &lt;tiles:insertTemplate&gt; allows to define
- * these attributes and pass them to the inserted jsp page, called template.
- * Attributes are defined using nested tag
- * &lt;tiles:putAttribute&gt; or
+ * or attributes. &lt;tiles:insertTemplate&gt; allows to define these attributes
+ * and pass them to the inserted jsp page, called template. Attributes are
+ * defined using nested tag &lt;tiles:putAttribute&gt; or
  * &lt;tiles:putListAttribute&gt;.
  * </p>
  * <p>
@@ -52,14 +51,13 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
  * 
  * <pre>
  *     &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: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;
  * </pre>
- *     
  */
 public class InsertTemplateTag extends SimpleTagSupport {
 
@@ -84,15 +82,14 @@ public class InsertTemplateTag extends SimpleTagSupport {
     private java.lang.String templateExpression;
 
     /**
-     * A comma-separated list of roles. If present, the template
-     * will be rendered only if the current user belongs to one of the roles.
+     * A comma-separated list of roles. If present, the template will be rendered
+     * only if the current user belongs to one of the roles.
      */
     private java.lang.String role;
 
     /**
-     * The preparer to use to invoke before the definition is
-     * rendered. If specified, it overrides the preparer specified in the
-     * definition itself.
+     * The preparer to use to invoke before the definition is rendered. If
+     * specified, it overrides the preparer specified in the definition itself.
      */
     private java.lang.String preparer;
 
@@ -104,8 +101,7 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Getter for template property.
      *
-     * @return
-     * The template to render.
+     * @return The template to render.
      */
     public java.lang.String getTemplate() {
         return template;
@@ -114,8 +110,7 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Setter for template property.
      *
-     * @param template
-     * The template to render.
+     * @param template The template to render.
      */
     public void setTemplate(java.lang.String template) {
         this.template = template;
@@ -124,8 +119,7 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Getter for templateType property.
      *
-     * @return
-     * The type of the template attribute.
+     * @return The type of the template attribute.
      */
     public java.lang.String getTemplateType() {
         return templateType;
@@ -134,8 +128,7 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Setter for templateType property.
      *
-     * @param templateType
-     * The type of the template attribute.
+     * @param templateType The type of the template attribute.
      */
     public void setTemplateType(java.lang.String templateType) {
         this.templateType = templateType;
@@ -144,8 +137,7 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Getter for templateExpression property.
      *
-     * @return
-     * The expression to evaluate to get the value of the template.
+     * @return The expression to evaluate to get the value of the template.
      */
     public java.lang.String getTemplateExpression() {
         return templateExpression;
@@ -154,8 +146,8 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Setter for templateExpression property.
      *
-     * @param templateExpression
-     * The expression to evaluate to get the value of the template.
+     * @param templateExpression The expression to evaluate to get the value of the
+     *                           template.
      */
     public void setTemplateExpression(java.lang.String templateExpression) {
         this.templateExpression = templateExpression;
@@ -164,9 +156,8 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Getter for role property.
      *
-     * @return
-     * A comma-separated list of roles. If present, the template
-     * will be rendered only if the current user belongs to one of the roles.
+     * @return A comma-separated list of roles. If present, the template will be
+     *         rendered only if the current user belongs to one of the roles.
      */
     public java.lang.String getRole() {
         return role;
@@ -175,9 +166,8 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Setter for role property.
      *
-     * @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 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.
      */
     public void setRole(java.lang.String role) {
         this.role = role;
@@ -186,10 +176,9 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Getter for preparer property.
      *
-     * @return
-     * The preparer to use to invoke before the definition is
-     * rendered. If specified, it overrides the preparer specified in the
-     * definition itself.
+     * @return The preparer to use to invoke before the definition is rendered. If
+     *         specified, it overrides the preparer specified in the definition
+     *         itself.
      */
     public java.lang.String getPreparer() {
         return preparer;
@@ -198,10 +187,9 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Setter for preparer property.
      *
-     * @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 preparer The preparer to use to invoke before the definition is
+     *                 rendered. If specified, it overrides the preparer specified
+     *                 in the definition itself.
      */
     public void setPreparer(java.lang.String preparer) {
         this.preparer = preparer;
@@ -210,8 +198,7 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Getter for flush property.
      *
-     * @return
-     * If true, the response will be flushed after the insert.
+     * @return If true, the response will be flushed after the insert.
      */
     public boolean isFlush() {
         return flush;
@@ -220,8 +207,7 @@ public class InsertTemplateTag extends SimpleTagSupport {
     /**
      * Setter for flush property.
      *
-     * @param flush
-     * If true, the response will be flushed after the insert.
+     * @param flush If true, the response will be flushed after the insert.
      */
     public void setFlush(boolean flush) {
         this.flush = flush;
@@ -237,17 +223,8 @@ public class InsertTemplateTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            template,
-            templateType,
-            templateExpression,
-            role,
-            preparer,
-            flush,
-            request, modelBody
-
-        );
+        model.execute(template, templateType, templateExpression, role, preparer, flush, request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/PutAttributeTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/PutAttributeTag.java
index 2d04fff3e..c4fa7c91c 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/PutAttributeTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/PutAttributeTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -42,8 +42,8 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
  * <li>&lt;insertDefinition&gt;</li>
  * <li>&lt;putListAttribute&gt;</li>
  * </ul>
- * (or any other tag which implements the PutAttributeTagParent
- * interface. Exception is thrown if no appropriate tag can be found.
+ * (or any other tag which implements the PutAttributeTagParent interface.
+ * Exception is thrown if no appropriate tag can be found.
  * </p>
  * <p>
  * Put tag can have following atributes :
@@ -75,20 +75,19 @@ public class PutAttributeTag extends SimpleTagSupport {
     private java.lang.String name;
 
     /**
-     * The value of the attribute. Use this parameter, or
-     * expression, or body.
+     * The value of the attribute. Use this parameter, or expression, or body.
      */
     private java.lang.Object value;
 
     /**
-     * The expression to calculate the value from. Use this
-     * parameter, or value, or body.
+     * The expression to calculate the value from. Use this parameter, or value, or
+     * body.
      */
     private java.lang.String expression;
 
     /**
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * A comma-separated list of roles. If present, the attribute will be rendered
+     * only if the current user belongs to one of the roles.
      */
     private java.lang.String role;
 
@@ -105,8 +104,7 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Getter for name property.
      *
-     * @return
-     * The name of the attribute to put.
+     * @return The name of the attribute to put.
      */
     public java.lang.String getName() {
         return name;
@@ -115,8 +113,7 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Setter for name property.
      *
-     * @param name
-     * The name of the attribute to put.
+     * @param name The name of the attribute to put.
      */
     public void setName(java.lang.String name) {
         this.name = name;
@@ -125,9 +122,8 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Getter for value property.
      *
-     * @return
-     * The value of the attribute. Use this parameter, or
-     * expression, or body.
+     * @return The value of the attribute. Use this parameter, or expression, or
+     *         body.
      */
     public java.lang.Object getValue() {
         return value;
@@ -136,9 +132,8 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Setter for value property.
      *
-     * @param value
-     * The value of the attribute. Use this parameter, or
-     * expression, or body.
+     * @param value The value of the attribute. Use this parameter, or expression,
+     *              or body.
      */
     public void setValue(java.lang.Object value) {
         this.value = value;
@@ -147,9 +142,8 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Getter for expression property.
      *
-     * @return
-     * The expression to calculate the value from. Use this
-     * parameter, or value, or body.
+     * @return The expression to calculate the value from. Use this parameter, or
+     *         value, or body.
      */
     public java.lang.String getExpression() {
         return expression;
@@ -158,9 +152,8 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Setter for expression property.
      *
-     * @param expression
-     * The expression to calculate the value from. Use this
-     * parameter, or value, or body.
+     * @param expression The expression to calculate the value from. Use this
+     *                   parameter, or value, or body.
      */
     public void setExpression(java.lang.String expression) {
         this.expression = expression;
@@ -169,9 +162,8 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Getter for role property.
      *
-     * @return
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * @return A comma-separated list of roles. If present, the attribute will be
+     *         rendered only if the current user belongs to one of the roles.
      */
     public java.lang.String getRole() {
         return role;
@@ -180,9 +172,8 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Setter for role property.
      *
-     * @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 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.
      */
     public void setRole(java.lang.String role) {
         this.role = role;
@@ -191,8 +182,7 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Getter for type property.
      *
-     * @return
-     * The type (renderer) of the attribute.
+     * @return The type (renderer) of the attribute.
      */
     public java.lang.String getType() {
         return type;
@@ -201,8 +191,7 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Setter for type property.
      *
-     * @param type
-     * The type (renderer) of the attribute.
+     * @param type The type (renderer) of the attribute.
      */
     public void setType(java.lang.String type) {
         this.type = type;
@@ -211,8 +200,7 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Getter for cascade property.
      *
-     * @return
-     * If true the attribute will be cascaded to all nested attributes.
+     * @return If true the attribute will be cascaded to all nested attributes.
      */
     public boolean isCascade() {
         return cascade;
@@ -221,8 +209,8 @@ public class PutAttributeTag extends SimpleTagSupport {
     /**
      * Setter for cascade property.
      *
-     * @param cascade
-     * If true the attribute will be cascaded to all nested attributes.
+     * @param cascade If true the attribute will be cascaded to all nested
+     *                attributes.
      */
     public void setCascade(boolean cascade) {
         this.cascade = cascade;
@@ -238,17 +226,8 @@ public class PutAttributeTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            name,
-            value,
-            expression,
-            role,
-            type,
-            cascade,
-            request, modelBody
-
-        );
+        model.execute(name, value, expression, role, type, cascade, request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/PutListAttributeTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/PutListAttributeTag.java
index 7befc81d1..1e96972c7 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/PutListAttributeTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/PutListAttributeTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -31,7 +31,7 @@ import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
 
 /**
  * <p>
- * Declare a list that will be pass as attribute to tile. 
+ * Declare a list that will be pass as attribute to tile.
  * </p>
  * <p>
  * Declare a list that will be pass as attribute to tile. List elements are
@@ -52,14 +52,14 @@ public class PutListAttributeTag extends SimpleTagSupport {
     private java.lang.String name;
 
     /**
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * A comma-separated list of roles. If present, the attribute will be rendered
+     * only if the current user belongs to one of the roles.
      */
     private java.lang.String role;
 
     /**
-     * If true, the list attribute will use, as first elements, the
-     * list contained in the list attribute, put with the same name, of the containing definition.
+     * If true, the list attribute will use, as first elements, the list contained
+     * in the list attribute, put with the same name, of the containing definition.
      */
     private boolean inherit;
 
@@ -71,8 +71,7 @@ public class PutListAttributeTag extends SimpleTagSupport {
     /**
      * Getter for name property.
      *
-     * @return
-     * The name of the attribute to put.
+     * @return The name of the attribute to put.
      */
     public java.lang.String getName() {
         return name;
@@ -81,8 +80,7 @@ public class PutListAttributeTag extends SimpleTagSupport {
     /**
      * Setter for name property.
      *
-     * @param name
-     * The name of the attribute to put.
+     * @param name The name of the attribute to put.
      */
     public void setName(java.lang.String name) {
         this.name = name;
@@ -91,9 +89,8 @@ public class PutListAttributeTag extends SimpleTagSupport {
     /**
      * Getter for role property.
      *
-     * @return
-     * A comma-separated list of roles. If present, the attribute
-     * will be rendered only if the current user belongs to one of the roles.
+     * @return A comma-separated list of roles. If present, the attribute will be
+     *         rendered only if the current user belongs to one of the roles.
      */
     public java.lang.String getRole() {
         return role;
@@ -102,9 +99,8 @@ public class PutListAttributeTag extends SimpleTagSupport {
     /**
      * Setter for role property.
      *
-     * @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 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.
      */
     public void setRole(java.lang.String role) {
         this.role = role;
@@ -113,9 +109,9 @@ public class PutListAttributeTag extends SimpleTagSupport {
     /**
      * Getter for inherit property.
      *
-     * @return
-     * If true, the list attribute will use, as first elements, the
-     * list contained in the list attribute, put with the same name, of the containing definition.
+     * @return If true, the list attribute will use, as first elements, the list
+     *         contained in the list attribute, put with the same name, of the
+     *         containing definition.
      */
     public boolean isInherit() {
         return inherit;
@@ -124,9 +120,9 @@ public class PutListAttributeTag extends SimpleTagSupport {
     /**
      * Setter for inherit property.
      *
-     * @param inherit
-     * If true, 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 inherit If true, the list attribute will use, as first elements, the
+     *                list contained in the list attribute, put with the same name,
+     *                of the containing definition.
      */
     public void setInherit(boolean inherit) {
         this.inherit = inherit;
@@ -135,8 +131,7 @@ public class PutListAttributeTag extends SimpleTagSupport {
     /**
      * Getter for cascade property.
      *
-     * @return
-     * If true the attribute will be cascaded to all nested attributes.
+     * @return If true the attribute will be cascaded to all nested attributes.
      */
     public boolean isCascade() {
         return cascade;
@@ -145,8 +140,8 @@ public class PutListAttributeTag extends SimpleTagSupport {
     /**
      * Setter for cascade property.
      *
-     * @param cascade
-     * If true the attribute will be cascaded to all nested attributes.
+     * @param cascade If true the attribute will be cascaded to all nested
+     *                attributes.
      */
     public void setCascade(boolean cascade) {
         this.cascade = cascade;
@@ -162,15 +157,8 @@ public class PutListAttributeTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
+        org.apache.tiles.request.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
-        model.execute(
-            name,
-            role,
-            inherit,
-            cascade,
-            request, modelBody
-
-        );
+        model.execute(name, role, inherit, cascade, request, modelBody);
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/SetCurrentContainerTag.java b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/SetCurrentContainerTag.java
index 802dfb411..370f3b418 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/SetCurrentContainerTag.java
+++ b/plugins/tiles/src/main/java/org/apache/tiles/web/jsp/taglib/SetCurrentContainerTag.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- /*
- * This file was automatically generated by Apache Tiles Autotag.
- */
+/*
+* This file was automatically generated by Autotag.  Please do not edit it manually.
+*/
 package org.apache.tiles.web.jsp.taglib;
 
 import java.io.IOException;
@@ -39,15 +39,16 @@ public class SetCurrentContainerTag extends SimpleTagSupport {
     private org.apache.tiles.template.SetCurrentContainerModel model = new org.apache.tiles.template.SetCurrentContainerModel();
 
     /**
-     * The key of the container to be used as "current". If null, the default one will be used.
+     * The key of the container to be used as "current". If null, the default one
+     * will be used.
      */
     private java.lang.String containerKey;
 
     /**
      * Getter for containerKey property.
      *
-     * @return
-     * The key of the container to be used as "current". If null, the default one will be used.
+     * @return The key of the container to be used as "current". If null, the
+     *         default one will be used.
      */
     public java.lang.String getContainerKey() {
         return containerKey;
@@ -56,8 +57,8 @@ public class SetCurrentContainerTag extends SimpleTagSupport {
     /**
      * Setter for containerKey property.
      *
-     * @param containerKey
-     * The key of the container to be used as "current". If null, the default one will be used.
+     * @param containerKey The key of the container to be used as "current". If
+     *                     null, the default one will be used.
      */
     public void setContainerKey(java.lang.String containerKey) {
         this.containerKey = containerKey;
@@ -73,11 +74,7 @@ public class SetCurrentContainerTag extends SimpleTagSupport {
             tag.setParent(getParent());
             tag.doTag();
         }
-        org.apache.tiles.request.Request request = runtime.createRequest();        
-        model.execute(
-            containerKey,
-            request
-
-        );
+        org.apache.tiles.request.Request request = runtime.createRequest();
+        model.execute(containerKey, request);
     }
 }
diff --git a/plugins/tiles/src/main/resources/META-INF/tld/tiles-jsp.tld b/plugins/tiles/src/main/resources/META-INF/tld/tiles-jsp.tld
index 10d63e325..defe3ef55 100644
--- a/plugins/tiles/src/main/resources/META-INF/tld/tiles-jsp.tld
+++ b/plugins/tiles/src/main/resources/META-INF/tld/tiles-jsp.tld
@@ -19,7 +19,7 @@
  * under the License.
  */
 -->
-<!-- This file was automatically generated.  Please do not edit it manually -->
+<!-- This file was automatically generated by Autotag.  Please do not edit it manually. -->
 <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"
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java b/plugins/tiles/src/main/resources/org/apache/tiles/autotag/freemarker/fmModel.vm
similarity index 52%
copy from plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java
copy to plugins/tiles/src/main/resources/org/apache/tiles/autotag/freemarker/fmModel.vm
index 764846ac7..c307110dd 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java
+++ b/plugins/tiles/src/main/resources/org/apache/tiles/autotag/freemarker/fmModel.vm
@@ -16,66 +16,63 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.tiles.freemarker.template;
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
+package ${packageName};
+
+import java.io.IOException;
+import java.util.Map;
+
+#if(${clazz.hasBody()})
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+#end
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
 
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.AddListAttributeModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
- * <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>
+#foreach($line in $stringTool.splitOnNewlines(${clazz.documentation}))
+ * ${line}
+#end
  */
-public class AddListAttributeFMModel implements TemplateDirectiveModel {
+public class ${clazz.tagClassPrefix}FMModel implements TemplateDirectiveModel {
 
     /**
      * The template model.
      */
-    private final AddListAttributeModel model;
+    private ${clazz.name} model;
 
     /**
      * Constructor.
      *
-     * @param model The template model.
+     * @param model
+     *            The template model.
      */
-    public AddListAttributeFMModel(AddListAttributeModel model) {
+    public ${clazz.tagClassPrefix}FMModel(${clazz.name} model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<${requestClass}> runtime = new ${runtimeClass}();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        ${requestClass} request = runtime.createRequest();
+#if(${clazz.hasBody()})
         ModelBody modelBody = runtime.createModelBody();
+#end
         model.execute(
-            runtime.getParameter("role", String.class, null),
-            request,
-            modelBody
+#foreach($parameter in ${clazz.parameters})
+            runtime.getParameter("${parameter.exportedName}", ${stringTool.getClassToCast(${parameter.type})}.class, $stringTool.getDefaultValue(${parameter.type}, ${parameter.defaultValue})),
+#end
+                request#if(${clazz.hasBody()}), modelBody#end
         );
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java b/plugins/tiles/src/main/resources/org/apache/tiles/autotag/freemarker/repository.vm
similarity index 51%
copy from plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java
copy to plugins/tiles/src/main/resources/org/apache/tiles/autotag/freemarker/repository.vm
index f7f3d9607..a854aa4ac 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java
+++ b/plugins/tiles/src/main/resources/org/apache/tiles/autotag/freemarker/repository.vm
@@ -16,44 +16,42 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.tiles.freemarker.template;
-
-public class TilesFMModelRepository {
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
+package ${packageName};
 
-    /**
-     * The "putAttribute" directive.
-     */
-    private final PutAttributeFMModel putAttribute;
+/**
+#foreach($line in $stringTool.splitOnNewlines(${suite.documentation}))
+ * $line
+#end
+ */
+public class $stringTool.capitalizeFirstLetter(${suite.name})FMModelRepository {
 
+#foreach($clazz in ${suite.getTemplateClasses()})
     /**
-     * The "definition" directive.
+     * The "${clazz.tagName}" directive.
      */
-    private final DefinitionFMModel definition;
+    private ${clazz.tagClassPrefix}FMModel ${clazz.tagName};
 
+#end
     /**
      * Constructor.
      */
     public TilesFMModelRepository() {
-        putAttribute = new PutAttributeFMModel(new org.apache.tiles.template.PutAttributeModel());
-        definition = new DefinitionFMModel(new org.apache.tiles.template.DefinitionModel());
+#foreach($clazz in ${suite.getTemplateClasses()})
+        ${clazz.tagName} = new ${clazz.tagClassPrefix}FMModel(new ${clazz.name}());
+#end
     }
+#foreach($clazz in ${suite.getTemplateClasses()})
 
     /**
-     * Returns the "putAttribute" directive.
+     * Returns the "${clazz.tagName}" directive.
      *
-     * @return The "putAttribute" directive.
+     * @return The "${clazz.tagName}" directive.
      */
-    public PutAttributeFMModel getPutAttribute() {
-        return putAttribute;
+    public ${clazz.tagClassPrefix}FMModel get$stringTool.capitalizeFirstLetter(${clazz.tagName})() {
+        return ${clazz.tagName};
     }
-
-    /**
-     * Returns the "definition" directive.
-     *
-     * @return The "definition" directive.
-     */
-    public DefinitionFMModel getDefinition() {
-        return definition;
-    }
-
+#end
 }
diff --git a/plugins/tiles/src/main/resources/org/apache/tiles/autotag/jsp/bodyTag.vm b/plugins/tiles/src/main/resources/org/apache/tiles/autotag/jsp/bodyTag.vm
index f71d55514..e48be526c 100644
--- a/plugins/tiles/src/main/resources/org/apache/tiles/autotag/jsp/bodyTag.vm
+++ b/plugins/tiles/src/main/resources/org/apache/tiles/autotag/jsp/bodyTag.vm
@@ -17,7 +17,7 @@
  * under the License.
  */
  /*
- * This file was automatically generated.
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
  */
 package ${packageName};
 
diff --git a/plugins/tiles/src/main/resources/org/apache/tiles/autotag/jsp/tld.vm b/plugins/tiles/src/main/resources/org/apache/tiles/autotag/jsp/tld.vm
index 8717882de..2faecf662 100644
--- a/plugins/tiles/src/main/resources/org/apache/tiles/autotag/jsp/tld.vm
+++ b/plugins/tiles/src/main/resources/org/apache/tiles/autotag/jsp/tld.vm
@@ -19,7 +19,7 @@
  * under the License.
  */
 -->
-<!-- This file was automatically generated.  Please do not edit it manually -->
+<!-- This file was automatically generated by Autotag.  Please do not edit it manually. -->
 <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"
diff --git a/plugins/tiles/src/test/java/org/apache/tiles/autotag/freemarker/FMModelGeneratorTest.java b/plugins/tiles/src/test/java/org/apache/tiles/autotag/freemarker/FMModelGeneratorTest.java
new file mode 100644
index 000000000..599e7f472
--- /dev/null
+++ b/plugins/tiles/src/test/java/org/apache/tiles/autotag/freemarker/FMModelGeneratorTest.java
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.autotag.freemarker;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.model.TemplateClass;
+import org.apache.tiles.autotag.model.TemplateMethod;
+import org.apache.tiles.autotag.model.TemplateParameter;
+import org.apache.tiles.autotag.model.TemplateSuite;
+import org.apache.velocity.app.VelocityEngine;
+import org.junit.Test;
+
+/**
+ * Tests TagClassGenerator.
+ */
+public class FMModelGeneratorTest {
+
+    public static final String REQUEST_CLASS = "org.apache.tiles.autotag.freemarker.test.Request";
+
+    /**
+     * Test method for TagClassGenerator#generate(File, String, TemplateSuite,
+     * TemplateClass, java.util.Map).
+     * 
+     * @throws Exception If something goes wrong.
+     */
+    @Test
+    public void testGenerate() throws Exception {
+        Properties props = new Properties();
+        InputStream propsStream = getClass().getResourceAsStream("/org/apache/tiles/autotag/velocity.properties");
+        props.load(propsStream);
+        propsStream.close();
+        VelocityEngine velocityEngine = new VelocityEngine(props);
+
+        FMModelGenerator generator = new FMModelGenerator(velocityEngine);
+        File file = File.createTempFile("autotag", null);
+        file.delete();
+        file.mkdir();
+        file.deleteOnExit();
+        TemplateSuite suite = new TemplateSuite("tldtest", "Test for TLD docs.");
+
+        List<TemplateParameter> params = new ArrayList<TemplateParameter>();
+        TemplateParameter param = new TemplateParameter("one", "one", "java.lang.String", null, true, false);
+        param.setDocumentation("Parameter one.");
+        params.add(param);
+        param = new TemplateParameter("two", "two", "int", null, false, false);
+        param.setDocumentation("Parameter two.");
+        params.add(param);
+        param = new TemplateParameter("three", "three", "boolean", null, false, false);
+        param.setDocumentation("Parameter three.");
+        params.add(param);
+        param = new TemplateParameter("request", "request", REQUEST_CLASS, null, false, true);
+        param.setDocumentation("The request.");
+        params.add(param);
+        param = new TemplateParameter("modelBody", "modelBody", ModelBody.class.getName(), null, false, false);
+        param.setDocumentation("The body.");
+        params.add(param);
+        TemplateMethod executeMethod = new TemplateMethod("execute", params);
+
+        TemplateClass clazz = new TemplateClass("org.apache.tiles.autotag.template.DoStuffTemplate", "doStuff",
+                "DoStuff", executeMethod);
+        clazz.setDocumentation("Documentation of the DoStuff class.");
+
+        generator.generate(file, "org.apache.tiles.autotag.freemarker.test", suite, clazz, null,
+                "org.apache.tiles.autotag.freemarker.test.Runtime", REQUEST_CLASS);
+
+        InputStream expected = getClass()
+                .getResourceAsStream("/org/apache/tiles/autotag/freemarker/test/DoStuffFMModel.javat");
+        File effectiveFile = new File(file, "/org/apache/tiles/autotag/freemarker/test/DoStuffFMModel.java");
+        assertTrue(effectiveFile.exists());
+        InputStream effective = new FileInputStream(effectiveFile);
+        assertTrue(IOUtils.contentEquals(effective, expected));
+        effective.close();
+        expected.close();
+
+        suite.addTemplateClass(clazz);
+        params = new ArrayList<TemplateParameter>();
+        param = new TemplateParameter("one", "one", "java.lang.Double", null, true, false);
+        param.setDocumentation("Parameter one.");
+        params.add(param);
+        param = new TemplateParameter("two", "two", "float", null, false, false);
+        param.setDocumentation("Parameter two.");
+        params.add(param);
+        param = new TemplateParameter("three", "three", "java.util.Date", null, false, false);
+        param.setDocumentation("Parameter three.");
+        params.add(param);
+        param = new TemplateParameter("request", "request", REQUEST_CLASS, null, false, true);
+        param.setDocumentation("The request.");
+        params.add(param);
+        executeMethod = new TemplateMethod("execute", params);
+
+        clazz = new TemplateClass("org.apache.tiles.autotag.template.DoStuffNoBodyTemplate", "doStuffNoBody",
+                "DoStuffNoBody", executeMethod);
+        clazz.setDocumentation("Documentation of the DoStuffNoBody class.");
+
+        suite.addTemplateClass(clazz);
+
+        generator.generate(file, "org.apache.tiles.autotag.freemarker.test", suite, clazz, null,
+                "org.apache.tiles.autotag.freemarker.test.Runtime", REQUEST_CLASS);
+
+        expected = getClass()
+                .getResourceAsStream("/org/apache/tiles/autotag/freemarker/test/DoStuffNoBodyFMModel.javat");
+        effectiveFile = new File(file, "/org/apache/tiles/autotag/freemarker/test/DoStuffNoBodyFMModel.java");
+        assertTrue(effectiveFile.exists());
+        effective = new FileInputStream(effectiveFile);
+        assertTrue(IOUtils.contentEquals(effective, expected));
+        effective.close();
+        expected.close();
+
+        FileUtils.deleteDirectory(file);
+    }
+
+}
diff --git a/plugins/tiles/src/test/java/org/apache/tiles/autotag/freemarker/FMModelRepositoryGeneratorTest.java b/plugins/tiles/src/test/java/org/apache/tiles/autotag/freemarker/FMModelRepositoryGeneratorTest.java
new file mode 100644
index 000000000..ac3b449c4
--- /dev/null
+++ b/plugins/tiles/src/test/java/org/apache/tiles/autotag/freemarker/FMModelRepositoryGeneratorTest.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.autotag.freemarker;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.model.TemplateClass;
+import org.apache.tiles.autotag.model.TemplateMethod;
+import org.apache.tiles.autotag.model.TemplateParameter;
+import org.apache.tiles.autotag.model.TemplateSuite;
+import org.apache.velocity.app.VelocityEngine;
+import org.junit.Test;
+
+/**
+ * Tests TLDGenerator.
+ */
+public class FMModelRepositoryGeneratorTest {
+
+    public static final String REQUEST_CLASS = "org.apache.tiles.autotag.freemarker.test.Request";
+
+    /**
+     * Test method for
+     * {@link FMModelRepositoryGenerator#generate(File, String, TemplateSuite, java.util.Map)}.
+     * 
+     * @throws Exception If something goes wrong.
+     */
+    @Test
+    public void testGenerate() throws Exception {
+        Properties props = new Properties();
+        InputStream propsStream = getClass().getResourceAsStream("/org/apache/tiles/autotag/velocity.properties");
+        props.load(propsStream);
+        propsStream.close();
+        VelocityEngine velocityEngine = new VelocityEngine(props);
+
+        FMModelRepositoryGenerator generator = new FMModelRepositoryGenerator(velocityEngine);
+        File file = File.createTempFile("autotag", null);
+        file.delete();
+        file.mkdir();
+        file.deleteOnExit();
+        TemplateSuite suite = new TemplateSuite("tldtest", "Test for TLD docs.");
+
+        List<TemplateParameter> params = new ArrayList<TemplateParameter>();
+        TemplateParameter param = new TemplateParameter("one", "one", "java.lang.String", null, true, false);
+        param.setDocumentation("Parameter one.");
+        params.add(param);
+        param = new TemplateParameter("two", "two", "int", null, false, false);
+        param.setDocumentation("Parameter two.");
+        params.add(param);
+        param = new TemplateParameter("three", "three", "long", null, false, false);
+        param.setDocumentation("Parameter three.");
+        params.add(param);
+        param = new TemplateParameter("request", "request", REQUEST_CLASS, null, false, true);
+        param.setDocumentation("The request.");
+        params.add(param);
+        param = new TemplateParameter("modelBody", "modelBody", ModelBody.class.getName(), null, false, false);
+        param.setDocumentation("The body.");
+        params.add(param);
+        TemplateMethod executeMethod = new TemplateMethod("execute", params);
+
+        TemplateClass clazz = new TemplateClass("org.apache.tiles.autotag.template.DoStuffTemplate", "doStuff",
+                "DoStuff", executeMethod);
+        clazz.setDocumentation("Documentation of the DoStuff class");
+
+        suite.addTemplateClass(clazz);
+        params = new ArrayList<TemplateParameter>();
+        param = new TemplateParameter("one", "one", "java.lang.Double", null, true, false);
+        param.setDocumentation("Parameter one.");
+        params.add(param);
+        param = new TemplateParameter("two", "two", "float", null, false, false);
+        param.setDocumentation("Parameter two.");
+        params.add(param);
+        param = new TemplateParameter("three", "three", "java.util.Date", null, false, false);
+        param.setDocumentation("Parameter three.");
+        params.add(param);
+        param = new TemplateParameter("request", "request", REQUEST_CLASS, null, false, true);
+        param.setDocumentation("The request.");
+        params.add(param);
+        executeMethod = new TemplateMethod("execute", params);
+
+        clazz = new TemplateClass("org.apache.tiles.autotag.template.DoStuffNoBodyTemplate", "doStuffNoBody",
+                "DoStuffNoBody", executeMethod);
+        clazz.setDocumentation("Documentation of the DoStuffNoBody class");
+
+        suite.addTemplateClass(clazz);
+
+        generator.generate(file, "org.apache.tiles.autotag.freemarker.test", suite, null);
+
+        InputStream expected = getClass()
+                .getResourceAsStream("/org/apache/tiles/autotag/freemarker/test/TldtestFMModelRepository.javat");
+        File effectiveFile = new File(file, "/org/apache/tiles/autotag/freemarker/test/TldtestFMModelRepository.java");
+        assertTrue(effectiveFile.exists());
+        InputStream effective = new FileInputStream(effectiveFile);
+        assertTrue(IOUtils.contentEquals(effective, expected));
+        effective.close();
+        expected.close();
+
+        FileUtils.deleteDirectory(file);
+    }
+
+}
diff --git a/plugins/tiles/src/test/java/org/apache/tiles/autotag/freemarker/FMTemplateGeneratorFactoryTest.java b/plugins/tiles/src/test/java/org/apache/tiles/autotag/freemarker/FMTemplateGeneratorFactoryTest.java
new file mode 100644
index 000000000..c8f91af82
--- /dev/null
+++ b/plugins/tiles/src/test/java/org/apache/tiles/autotag/freemarker/FMTemplateGeneratorFactoryTest.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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.autotag.freemarker;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.File;
+
+import org.apache.tiles.autotag.generate.TemplateGenerator;
+import org.apache.tiles.autotag.generate.TemplateGeneratorBuilder;
+import org.apache.velocity.app.VelocityEngine;
+import org.junit.Test;
+
+/**
+ * Tests FMTemplateGeneratorFactory.
+ */
+public class FMTemplateGeneratorFactoryTest {
+
+    /**
+     * Test method forFMTemplateGeneratorFactory#createTemplateGenerator().
+     */
+    @Test
+    public void testCreateTemplateGenerator() {
+        File classesOutputDirectory = createMock(File.class);
+        VelocityEngine velocityEngine = createMock(VelocityEngine.class);
+        TemplateGeneratorBuilder builder = createMock(TemplateGeneratorBuilder.class);
+        TemplateGenerator generator = createMock(TemplateGenerator.class);
+
+        expect(builder.setClassesOutputDirectory(classesOutputDirectory)).andReturn(builder);
+        expect(builder.addClassesTemplateSuiteGenerator(isA(FMModelRepositoryGenerator.class))).andReturn(builder);
+        expect(builder.addClassesTemplateClassGenerator(isA(FMModelGenerator.class))).andReturn(builder);
+        expect(builder.build()).andReturn(generator);
+
+        replay(classesOutputDirectory, velocityEngine, builder, generator);
+        FMTemplateGeneratorFactory factory = new FMTemplateGeneratorFactory(classesOutputDirectory, velocityEngine,
+                builder);
+        assertSame(generator, factory.createTemplateGenerator());
+        verify(classesOutputDirectory, velocityEngine, builder, generator);
+    }
+
+}
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/freemarker/test/DoStuffFMModel.javat
similarity index 52%
copy from plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java
copy to plugins/tiles/src/test/resources/org/apache/tiles/autotag/freemarker/test/DoStuffFMModel.javat
index 764846ac7..14e3fafc9 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/AddListAttributeFMModel.java
+++ b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/freemarker/test/DoStuffFMModel.javat
@@ -16,66 +16,57 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.tiles.freemarker.template;
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
+package org.apache.tiles.autotag.freemarker.test;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.ModelBody;
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
 
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.autotag.core.runtime.ModelBody;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.AddListAttributeModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
- * <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>
+ * Documentation of the DoStuff class.
  */
-public class AddListAttributeFMModel implements TemplateDirectiveModel {
+public class DoStuffFMModel implements TemplateDirectiveModel {
 
     /**
      * The template model.
      */
-    private final AddListAttributeModel model;
+    private org.apache.tiles.autotag.template.DoStuffTemplate model;
 
     /**
      * Constructor.
      *
-     * @param model The template model.
+     * @param model
+     *            The template model.
      */
-    public AddListAttributeFMModel(AddListAttributeModel model) {
+    public DoStuffFMModel(org.apache.tiles.autotag.template.DoStuffTemplate model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.autotag.freemarker.test.Request> runtime = new org.apache.tiles.autotag.freemarker.test.Runtime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.autotag.freemarker.test.Request request = runtime.createRequest();
         ModelBody modelBody = runtime.createModelBody();
         model.execute(
-            runtime.getParameter("role", String.class, null),
-            request,
-            modelBody
+            runtime.getParameter("one", java.lang.String.class, null),
+            runtime.getParameter("two", java.lang.Integer.class, 0),
+            runtime.getParameter("three", java.lang.Boolean.class, false),
+                request, modelBody
         );
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/SetCurrentContainerFMModel.java b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/freemarker/test/DoStuffNoBodyFMModel.javat
similarity index 50%
copy from plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/SetCurrentContainerFMModel.java
copy to plugins/tiles/src/test/resources/org/apache/tiles/autotag/freemarker/test/DoStuffNoBodyFMModel.javat
index 7703a80aa..8841206d5 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/SetCurrentContainerFMModel.java
+++ b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/freemarker/test/DoStuffNoBodyFMModel.javat
@@ -16,56 +16,55 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.tiles.freemarker.template;
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
+package org.apache.tiles.autotag.freemarker.test;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
 
 import freemarker.core.Environment;
 import freemarker.template.TemplateDirectiveBody;
 import freemarker.template.TemplateDirectiveModel;
 import freemarker.template.TemplateException;
 import freemarker.template.TemplateModel;
-import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
-import org.apache.tiles.request.Request;
-import org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime;
-import org.apache.tiles.template.SetCurrentContainerModel;
-
-import java.io.IOException;
-import java.util.Map;
 
 /**
- * Selects a container to be used as the "current" container.
+ * Documentation of the DoStuffNoBody class.
  */
-public class SetCurrentContainerFMModel implements TemplateDirectiveModel {
+public class DoStuffNoBodyFMModel implements TemplateDirectiveModel {
 
     /**
      * The template model.
      */
-    private final SetCurrentContainerModel model;
+    private org.apache.tiles.autotag.template.DoStuffNoBodyTemplate model;
 
     /**
      * Constructor.
      *
-     * @param model The template model.
+     * @param model
+     *            The template model.
      */
-    public SetCurrentContainerFMModel(SetCurrentContainerModel model) {
+    public DoStuffNoBodyFMModel(org.apache.tiles.autotag.template.DoStuffNoBodyTemplate model) {
         this.model = model;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void execute(
-        Environment env,
-        Map params,
-        TemplateModel[] loopVars,
-        TemplateDirectiveBody body
-    ) throws TemplateException, IOException {
-        AutotagRuntime<Request> runtime = new FreemarkerAutotagRuntime();
-        ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
-        Request request = runtime.createRequest();
+    public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body) throws TemplateException, IOException {
+        AutotagRuntime<org.apache.tiles.autotag.freemarker.test.Request> runtime = new org.apache.tiles.autotag.freemarker.test.Runtime();
+        if (runtime instanceof TemplateDirectiveModel) {
+            ((TemplateDirectiveModel) runtime).execute(env, params, loopVars, body);
+        }
+        org.apache.tiles.autotag.freemarker.test.Request request = runtime.createRequest();
         model.execute(
-            runtime.getParameter("containerKey", String.class, null),
-            request
+            runtime.getParameter("one", java.lang.Double.class, null),
+            runtime.getParameter("two", java.lang.Float.class, 0.0f),
+            runtime.getParameter("three", java.util.Date.class, null),
+                request
         );
     }
 }
diff --git a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/freemarker/test/TldtestFMModelRepository.javat
similarity index 52%
copy from plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java
copy to plugins/tiles/src/test/resources/org/apache/tiles/autotag/freemarker/test/TldtestFMModelRepository.javat
index f7f3d9607..0aaa347f3 100644
--- a/plugins/tiles/src/main/java/org/apache/tiles/freemarker/template/TilesFMModelRepository.java
+++ b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/freemarker/test/TldtestFMModelRepository.javat
@@ -16,44 +16,49 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.tiles.freemarker.template;
+/*
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
+ */
+package org.apache.tiles.autotag.freemarker.test;
 
-public class TilesFMModelRepository {
+/**
+ * Test for TLD docs.
+ */
+public class TldtestFMModelRepository {
 
     /**
-     * The "putAttribute" directive.
+     * The "doStuff" directive.
      */
-    private final PutAttributeFMModel putAttribute;
+    private DoStuffFMModel doStuff;
 
     /**
-     * The "definition" directive.
+     * The "doStuffNoBody" directive.
      */
-    private final DefinitionFMModel definition;
+    private DoStuffNoBodyFMModel doStuffNoBody;
 
     /**
      * Constructor.
      */
     public TilesFMModelRepository() {
-        putAttribute = new PutAttributeFMModel(new org.apache.tiles.template.PutAttributeModel());
-        definition = new DefinitionFMModel(new org.apache.tiles.template.DefinitionModel());
+        doStuff = new DoStuffFMModel(new org.apache.tiles.autotag.template.DoStuffTemplate());
+        doStuffNoBody = new DoStuffNoBodyFMModel(new org.apache.tiles.autotag.template.DoStuffNoBodyTemplate());
     }
 
     /**
-     * Returns the "putAttribute" directive.
+     * Returns the "doStuff" directive.
      *
-     * @return The "putAttribute" directive.
+     * @return The "doStuff" directive.
      */
-    public PutAttributeFMModel getPutAttribute() {
-        return putAttribute;
+    public DoStuffFMModel getDoStuff() {
+        return doStuff;
     }
 
     /**
-     * Returns the "definition" directive.
+     * Returns the "doStuffNoBody" directive.
      *
-     * @return The "definition" directive.
+     * @return The "doStuffNoBody" directive.
      */
-    public DefinitionFMModel getDefinition() {
-        return definition;
+    public DoStuffNoBodyFMModel getDoStuffNoBody() {
+        return doStuffNoBody;
     }
-
 }
diff --git a/plugins/tiles/src/test/resources/org/apache/tiles/autotag/jsp/test/DoStuffNoBodyTag.java b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/jsp/test/DoStuffNoBodyTag.java
index 4dac7e17f..85433d581 100644
--- a/plugins/tiles/src/test/resources/org/apache/tiles/autotag/jsp/test/DoStuffNoBodyTag.java
+++ b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/jsp/test/DoStuffNoBodyTag.java
@@ -17,7 +17,7 @@
  * under the License.
  */
  /*
- * This file was automatically generated.
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
  */
 package org.apache.tiles.autotag.jsp.test;
 
diff --git a/plugins/tiles/src/test/resources/org/apache/tiles/autotag/jsp/test/DoStuffTag.java b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/jsp/test/DoStuffTag.java
index 3116c37eb..6ad8b1e6f 100644
--- a/plugins/tiles/src/test/resources/org/apache/tiles/autotag/jsp/test/DoStuffTag.java
+++ b/plugins/tiles/src/test/resources/org/apache/tiles/autotag/jsp/test/DoStuffTag.java
@@ -17,7 +17,7 @@
  * under the License.
  */
  /*
- * This file was automatically generated.
+ * This file was automatically generated by Autotag.  Please do not edit it manually.
  */
 package org.apache.tiles.autotag.jsp.test;
 
diff --git a/plugins/tiles/src/test/resources/tldtest-jsp.tld b/plugins/tiles/src/test/resources/tldtest-jsp.tld
index 6777e39b7..b2cbb8eb7 100644
--- a/plugins/tiles/src/test/resources/tldtest-jsp.tld
+++ b/plugins/tiles/src/test/resources/tldtest-jsp.tld
@@ -19,7 +19,7 @@
  * under the License.
  */
 -->
-<!-- This file was automatically generated.  Please do not edit it manually -->
+<!-- This file was automatically generated by Autotag.  Please do not edit it manually. -->
 <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"