You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tiles.apache.org by ap...@apache.org on 2009/06/09 21:27:26 UTC

svn commit: r783101 - in /tiles/framework/trunk/tiles-jsp/src/main: java/org/apache/tiles/jsp/context/ java/org/apache/tiles/jsp/taglib/ java/org/apache/tiles/jsp/taglib/definition/ resources/META-INF/tld/

Author: apetrelli
Date: Tue Jun  9 19:27:26 2009
New Revision: 783101

URL: http://svn.apache.org/viewvc?rev=783101&view=rev
Log:
TILES-410
Tags converted to simple tag style.

Removed:
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/TilesTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/package.html
Modified:
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/context/JspUtil.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddAttributeTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddListAttributeTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/GetAsStringTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/ImportAttributeTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertAttributeTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertDefinitionTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertTemplateTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutAttributeTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutListAttributeTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/TilesBodyTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DefinitionTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DestroyContainerTag.java
    tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/SetCurrentContainerTag.java
    tiles/framework/trunk/tiles-jsp/src/main/resources/META-INF/tld/tiles-jsp.tld

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/context/JspUtil.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/context/JspUtil.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/context/JspUtil.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/context/JspUtil.java Tue Jun  9 19:27:26 2009
@@ -21,10 +21,17 @@
 
 package org.apache.tiles.jsp.context;
 
+import java.io.IOException;
+import java.io.StringWriter;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Stack;
 
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.JspFragment;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.tiles.TilesContainer;
@@ -33,8 +40,6 @@
 import org.apache.tiles.jsp.taglib.TilesJspException;
 import org.apache.tiles.servlet.context.ServletUtil;
 
-import javax.servlet.jsp.PageContext;
-
 /**
  * Utility class for working within a Jsp environment.
  *
@@ -73,7 +78,7 @@
      * @return If <code>true</code> the include operation must be forced.
      * @since 2.0.6
      */
-    public static boolean isForceInclude(PageContext context) {
+    public static boolean isForceInclude(JspContext context) {
         Boolean retValue = (Boolean) context.getAttribute(
                 ServletUtil.FORCE_INCLUDE_ATTRIBUTE_NAME,
                 PageContext.REQUEST_SCOPE);
@@ -88,7 +93,7 @@
      * forced.
      * @since 2.0.6
      */
-    public static void setForceInclude(PageContext context, boolean forceInclude) {
+    public static void setForceInclude(JspContext context, boolean forceInclude) {
         Boolean retValue = Boolean.valueOf(forceInclude);
         context.setAttribute(
                 ServletUtil.FORCE_INCLUDE_ATTRIBUTE_NAME,
@@ -102,7 +107,7 @@
      * @return The default Tiles container.
      * @since 2.1.2
      */
-    public static TilesContainer getContainer(PageContext context) {
+    public static TilesContainer getContainer(JspContext context) {
         return getContainer(context, TilesAccess.CONTAINER_ATTRIBUTE);
     }
 
@@ -115,7 +120,7 @@
      * @return The requested Tiles container.
      * @since 2.1.2
      */
-    public static TilesContainer getContainer(PageContext context, String key) {
+    public static TilesContainer getContainer(JspContext context, String key) {
         if (key == null) {
             key = TilesAccess.CONTAINER_ATTRIBUTE;
         }
@@ -130,7 +135,7 @@
      * @param container The container object to set.
      * @since 2.1.2
      */
-    public static void setContainer(PageContext context,
+    public static void setContainer(JspContext context,
             TilesContainer container) {
         setContainer(context, container, TilesAccess.CONTAINER_ATTRIBUTE);
     }
@@ -143,7 +148,7 @@
      * @param key The key under which the container will be stored.
      * @since 2.1.2
      */
-    public static void setContainer(PageContext context,
+    public static void setContainer(JspContext context,
             TilesContainer container, String key) {
         Log log = LogFactory.getLog(ServletUtil.class);
         if (key == null) {
@@ -169,7 +174,7 @@
      * @param key The key under which the container is stored.
      * @since 2.1.0
      */
-    public static void setCurrentContainer(PageContext context, String key) {
+    public static void setCurrentContainer(JspContext context, String key) {
         TilesContainer container = getContainer(context, key);
         if (container != null) {
             context.setAttribute(ServletUtil.CURRENT_CONTAINER_ATTRIBUTE_NAME,
@@ -187,7 +192,7 @@
      * @param container The container to use as the current container.
      * @since 2.1.0
      */
-    public static void setCurrentContainer(PageContext context,
+    public static void setCurrentContainer(JspContext context,
             TilesContainer container) {
         if (container != null) {
             context.setAttribute(ServletUtil.CURRENT_CONTAINER_ATTRIBUTE_NAME,
@@ -204,7 +209,7 @@
      * @return The current Tiles container to use in web pages.
      * @since 2.1.0
      */
-    public static TilesContainer getCurrentContainer(PageContext context) {
+    public static TilesContainer getCurrentContainer(JspContext context) {
         TilesContainer container = (TilesContainer) context.getAttribute(
                 ServletUtil.CURRENT_CONTAINER_ATTRIBUTE_NAME,
                 PageContext.REQUEST_SCOPE);
@@ -226,7 +231,7 @@
      * @since 2.2.0
      */
     @SuppressWarnings("unchecked")
-    public static Stack<Object> getComposeStack(PageContext context) {
+    public static Stack<Object> getComposeStack(JspContext context) {
         Stack<Object> composeStack = (Stack<Object>) context.getAttribute(
                 COMPOSE_STACK_ATTRIBUTE_NAME, PageContext.REQUEST_SCOPE);
         if (composeStack == null) {
@@ -260,4 +265,41 @@
 
         return scope;
     }
+
+    /**
+     * Evaluates the fragment (invokes it with a null Writer) if not null.
+     *
+     * @param fragment The fragment to evaluate.
+     * @throws JspException If the fragment invocation fails.
+     * @throws IOException If the fragment invocation fails.
+     * @since 2.2.0
+     */
+    public static void evaluateFragment(JspFragment fragment) throws JspException, IOException {
+        if (fragment != null) {
+            fragment.invoke(null);
+        }
+    }
+
+    /**
+     * Evaluates the fragment and returns its content as a string.
+     *
+     * @param fragment The fragment to evaluate.
+     * @return The fragment evaluated as a string.
+     * @throws JspException If the fragment invocation fails.
+     * @throws IOException If the fragment invocation fails with an I/O error.
+     * @since 2.2.0
+     */
+    public static String evaluateFragmentAsString(JspFragment fragment) throws JspException, IOException {
+        String body = null;
+        if (fragment != null) {
+            StringWriter writer = new StringWriter();
+            try {
+                fragment.invoke(writer);
+            } finally {
+                writer.close();
+            }
+            body = writer.toString();
+        }
+        return body;
+    }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddAttributeTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddAttributeTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddAttributeTag.java Tue Jun  9 19:27:26 2009
@@ -21,7 +21,11 @@
 
 package org.apache.tiles.jsp.taglib;
 
+import java.io.IOException;
+
+import javax.servlet.jsp.JspContext;
 import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
 
 import org.apache.tiles.jsp.context.JspUtil;
 import org.apache.tiles.template.AddAttributeModel;
@@ -33,7 +37,6 @@
  * <li>&lt;putListAttribute&gt;</li>
  * <li>&lt;putAttribute&gt;</li>
  * </ul>
- * (or any other tag which implements the <code>{@link AddAttributeTagParent}</code> interface.
  * Exception is thrown if no appropriate tag can be found.</p>
  * <p>Put tag can have following atributes :
  * <ul>
@@ -55,7 +58,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class AddAttributeTag extends TilesBodyTag {
+public class AddAttributeTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -158,29 +161,11 @@
 
     /** {@inheritDoc} */
     @Override
-    protected void reset() {
-        super.reset();
-        role = null;
-        value = null;
-        type = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doStartTag() throws JspException {
+    public void doTag() throws JspException, IOException {
+        JspContext pageContext = getJspContext();
         model.start(JspUtil.getComposeStack(pageContext));
-        return EVAL_BODY_BUFFERED;
-    }
-
-    /** {@inheritDoc} */
-    public int doEndTag() throws TilesJspException {
-        String body = null;
-        if (bodyContent != null) {
-            body = bodyContent.getString();
-        }
+        String body = JspUtil.evaluateFragmentAsString(getJspBody());
         model.end(JspUtil.getComposeStack(pageContext), value, null, body,
                 role, type);
-
-        return EVAL_PAGE;
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddListAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddListAttributeTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddListAttributeTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/AddListAttributeTag.java Tue Jun  9 19:27:26 2009
@@ -21,6 +21,12 @@
 
 package org.apache.tiles.jsp.taglib;
 
+import java.io.IOException;
+
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
 import org.apache.tiles.jsp.context.JspUtil;
 import org.apache.tiles.template.AddListAttributeModel;
 
@@ -30,7 +36,7 @@
  * @since Tiles 1.0
  * @version $Rev$ $Date$
  */
-public class AddListAttributeTag extends TilesBodyTag {
+public class AddListAttributeTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -109,14 +115,11 @@
     }
 
     /** {@inheritDoc} */
-    public int doStartTag() {
-        model.start(JspUtil.getComposeStack(pageContext), role);
-        return EVAL_BODY_BUFFERED;
-    }
-
-    /** {@inheritDoc} */
-    public int doEndTag() throws TilesJspException {
-        model.end(JspUtil.getComposeStack(pageContext));
-        return EVAL_PAGE;
+    @Override
+    public void doTag() throws JspException, IOException {
+        JspContext jspContext = getJspContext();
+        model.start(JspUtil.getComposeStack(jspContext), role);
+        JspUtil.evaluateFragment(getJspBody());
+        model.end(JspUtil.getComposeStack(jspContext));
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/GetAsStringTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/GetAsStringTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/GetAsStringTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/GetAsStringTag.java Tue Jun  9 19:27:26 2009
@@ -22,6 +22,11 @@
 
 import java.io.IOException;
 
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
 import org.apache.tiles.Attribute;
 import org.apache.tiles.jsp.context.JspUtil;
 import org.apache.tiles.template.DefaultAttributeResolver;
@@ -34,7 +39,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class GetAsStringTag extends TilesBodyTag {
+public class GetAsStringTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -296,39 +301,16 @@
 
     /** {@inheritDoc} */
     @Override
-    protected void reset() {
-        super.reset();
-        name = null;
-        value = null;
-        defaultValue = null;
-        defaultValueType = null;
-        defaultValueType = null;
-        preparer = null;
-        flush = false;
-        ignore = false;
-        role = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doStartTag() throws TilesJspException {
-        model.start(JspUtil.getComposeStack(pageContext), JspUtil
-                .getCurrentContainer(pageContext), ignore, preparer, role,
+    public void doTag() throws JspException, IOException {
+        JspContext jspContext = getJspContext();
+        model.start(JspUtil.getComposeStack(jspContext), JspUtil
+                .getCurrentContainer(jspContext), ignore, preparer, role,
                 defaultValue, defaultValueRole, defaultValueType, name,
-                (Attribute) value, pageContext);
-        return EVAL_BODY_INCLUDE;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doEndTag() throws TilesJspException {
-        try {
-            model.end(JspUtil.getComposeStack(pageContext), JspUtil
-                    .getContainer(pageContext), pageContext.getOut(), ignore,
-                    pageContext);
-        } catch (IOException e) {
-            throw new TilesJspException("Cannot insert an attribute", e);
-        }
-        return EVAL_PAGE;
+                (Attribute) value, jspContext);
+        JspWriter writer = jspContext.getOut();
+        JspUtil.evaluateFragment(getJspBody());
+        model.end(JspUtil.getComposeStack(jspContext), JspUtil
+                .getContainer(jspContext), writer, ignore,
+                jspContext);
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/ImportAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/ImportAttributeTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/ImportAttributeTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/ImportAttributeTag.java Tue Jun  9 19:27:26 2009
@@ -22,7 +22,9 @@
 
 import java.util.Map;
 
+import javax.servlet.jsp.JspContext;
 import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
 
 import org.apache.tiles.jsp.context.JspUtil;
 import org.apache.tiles.template.ImportAttributeModel;
@@ -36,7 +38,7 @@
  * @since Tiles 1.0
  * @version $Rev$ $Date$
  */
-public class ImportAttributeTag extends TilesTag {
+public class ImportAttributeTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -145,24 +147,14 @@
 
     /** {@inheritDoc} */
     @Override
-    protected void reset() {
-        super.reset();
-        name = null;
-        scopeName = null;
-        ignore = false;
-        toName = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doStartTag() throws JspException {
+    public void doTag() throws JspException {
+        JspContext jspContext = getJspContext();
         Map<String, Object> attributes = model.getImportedAttributes(JspUtil
-                .getCurrentContainer(pageContext), name, toName, ignore,
-                pageContext);
+                .getCurrentContainer(jspContext), name, toName, ignore,
+                jspContext);
         int scopeId = JspUtil.getScope(scopeName);
         for (Map.Entry<String, Object> entry : attributes.entrySet()) {
-            pageContext.setAttribute(entry.getKey(), entry.getValue(), scopeId);
+            jspContext.setAttribute(entry.getKey(), entry.getValue(), scopeId);
         }
-        return EVAL_PAGE;
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertAttributeTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertAttributeTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertAttributeTag.java Tue Jun  9 19:27:26 2009
@@ -23,6 +23,10 @@
 
 import java.io.IOException;
 
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
 import org.apache.tiles.Attribute;
 import org.apache.tiles.jsp.context.JspUtil;
 import org.apache.tiles.template.DefaultAttributeResolver;
@@ -35,7 +39,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class InsertAttributeTag extends TilesBodyTag {
+public class InsertAttributeTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -297,38 +301,14 @@
 
     /** {@inheritDoc} */
     @Override
-    protected void reset() {
-        super.reset();
-        name = null;
-        value = null;
-        defaultValue = null;
-        defaultValueType = null;
-        defaultValueType = null;
-        preparer = null;
-        flush = false;
-        ignore = false;
-        role = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doStartTag() throws TilesJspException {
-        model.start(JspUtil.getComposeStack(pageContext), JspUtil
-                .getCurrentContainer(pageContext), ignore, preparer, role,
+    public void doTag() throws JspException, IOException {
+        JspContext jspContext = getJspContext();
+        model.start(JspUtil.getComposeStack(jspContext), JspUtil
+                .getCurrentContainer(jspContext), ignore, preparer, role,
                 defaultValue, defaultValueRole, defaultValueType, name,
-                (Attribute) value, pageContext);
-        return EVAL_BODY_INCLUDE;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doEndTag() throws TilesJspException {
-        try {
-            model.end(JspUtil.getComposeStack(pageContext), JspUtil
-                    .getContainer(pageContext), ignore, pageContext);
-        } catch (IOException e) {
-            throw new TilesJspException("Cannot insert an attribute", e);
-        }
-        return EVAL_PAGE;
+                (Attribute) value, jspContext);
+        JspUtil.evaluateFragment(getJspBody());
+        model.end(JspUtil.getComposeStack(jspContext), JspUtil
+                .getContainer(jspContext), ignore, jspContext);
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertDefinitionTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertDefinitionTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertDefinitionTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertDefinitionTag.java Tue Jun  9 19:27:26 2009
@@ -21,6 +21,12 @@
 
 package org.apache.tiles.jsp.taglib;
 
+import java.io.IOException;
+
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
 import org.apache.tiles.jsp.context.JspUtil;
 import org.apache.tiles.template.InsertDefinitionModel;
 
@@ -30,7 +36,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class InsertDefinitionTag extends TilesBodyTag {
+public class InsertDefinitionTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -265,28 +271,11 @@
 
     /** {@inheritDoc} */
     @Override
-    public void release() {
-        super.release();
-        name = null;
-        preparer = null;
-        flush = false;
-        ignore = false;
-        role = null;
-        template = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doStartTag() throws TilesJspException {
-        model.start(JspUtil.getCurrentContainer(pageContext), pageContext);
-        return EVAL_BODY_INCLUDE;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doEndTag() throws TilesJspException {
-        model.end(JspUtil.getCurrentContainer(pageContext), name, template,
-                templateType, templateExpression, role, preparer, pageContext);
-        return EVAL_PAGE;
+    public void doTag() throws JspException, IOException {
+        JspContext jspContext = getJspContext();
+        model.start(JspUtil.getCurrentContainer(jspContext), jspContext);
+        JspUtil.evaluateFragment(getJspBody());
+        model.end(JspUtil.getCurrentContainer(jspContext), name, template,
+                templateType, templateExpression, role, preparer, jspContext);
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertTemplateTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertTemplateTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertTemplateTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/InsertTemplateTag.java Tue Jun  9 19:27:26 2009
@@ -21,6 +21,12 @@
 
 package org.apache.tiles.jsp.taglib;
 
+import java.io.IOException;
+
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
 import org.apache.tiles.jsp.context.JspUtil;
 import org.apache.tiles.template.InsertTemplateModel;
 
@@ -30,7 +36,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class InsertTemplateTag extends TilesBodyTag {
+public class InsertTemplateTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -242,27 +248,11 @@
 
     /** {@inheritDoc} */
     @Override
-    protected void reset() {
-        super.reset();
-        preparer = null;
-        flush = false;
-        ignore = false;
-        role = null;
-        template = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doStartTag() throws TilesJspException {
-        model.start(JspUtil.getCurrentContainer(pageContext), pageContext);
-        return EVAL_BODY_INCLUDE;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doEndTag() throws TilesJspException {
-        model.end(JspUtil.getCurrentContainer(pageContext), template,
-                templateType, templateExpression, role, preparer, pageContext);
-        return EVAL_PAGE;
+    public void doTag() throws JspException, IOException {
+        JspContext jspContext = getJspContext();
+        model.start(JspUtil.getCurrentContainer(jspContext), jspContext);
+        JspUtil.evaluateFragment(getJspBody());
+        model.end(JspUtil.getCurrentContainer(jspContext), template,
+                templateType, templateExpression, role, preparer, jspContext);
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutAttributeTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutAttributeTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutAttributeTag.java Tue Jun  9 19:27:26 2009
@@ -21,7 +21,11 @@
 
 package org.apache.tiles.jsp.taglib;
 
+import java.io.IOException;
+
+import javax.servlet.jsp.JspContext;
 import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
 
 import org.apache.tiles.jsp.context.JspUtil;
 import org.apache.tiles.template.PutAttributeModel;
@@ -36,7 +40,6 @@
  * <li>&lt;insertDefinition&gt;</li>
  * <li>&lt;putList&gt;</li>
  * </ul>
- * (or any other tag which implements the <code>{@link PutAttributeTagParent}</code> interface.
  * Exception is thrown if no appropriate tag can be found.</p>
  * <p>Put tag can have following atributes :
  * <ul>
@@ -66,7 +69,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class PutAttributeTag extends TilesBodyTag {
+public class PutAttributeTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -219,32 +222,12 @@
 
     /** {@inheritDoc} */
     @Override
-    protected void reset() {
-        super.reset();
-        name = null;
-        cascade = false;
-        role = null;
-        value = null;
-        type = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doStartTag() throws JspException {
-        model.start(JspUtil.getComposeStack(pageContext));
-        return EVAL_BODY_BUFFERED;
-    }
-
-    /** {@inheritDoc} */
-    public int doEndTag() throws TilesJspException {
-        String body = null;
-        if (bodyContent != null) {
-            body = bodyContent.getString();
-        }
-        model.end(JspUtil.getCurrentContainer(pageContext), JspUtil
-                .getComposeStack(pageContext), name, value, null, body, role,
-                type, cascade, pageContext);
-
-        return EVAL_PAGE;
+    public void doTag() throws JspException, IOException {
+        JspContext jspContext = getJspContext();
+        model.start(JspUtil.getComposeStack(jspContext));
+        String body = JspUtil.evaluateFragmentAsString(getJspBody());
+        model.end(JspUtil.getCurrentContainer(jspContext), JspUtil
+                .getComposeStack(jspContext), name, value, null, body, role,
+                type, cascade, jspContext);
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutListAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutListAttributeTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutListAttributeTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/PutListAttributeTag.java Tue Jun  9 19:27:26 2009
@@ -21,7 +21,11 @@
 
 package org.apache.tiles.jsp.taglib;
 
+import java.io.IOException;
+
+import javax.servlet.jsp.JspContext;
 import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
 
 import org.apache.tiles.jsp.context.JspUtil;
 import org.apache.tiles.template.PutListAttributeModel;
@@ -32,7 +36,7 @@
  * @since Tiles 1.0
  * @version $Rev$ $Date$
  */
-public class PutListAttributeTag extends TilesBodyTag {
+public class PutListAttributeTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -193,27 +197,11 @@
 
     /** {@inheritDoc} */
     @Override
-    protected void reset() {
-        super.reset();
-        name = null;
-        cascade = false;
-        role = null;
-        type = null;
-        inherit = false;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doStartTag() throws JspException {
-        model.start(JspUtil.getComposeStack(pageContext), role, inherit);
-        return EVAL_BODY_BUFFERED;
-    }
-
-    /** {@inheritDoc} */
-    public int doEndTag() throws TilesJspException {
-        model.end(JspUtil.getCurrentContainer(pageContext), JspUtil
-                .getComposeStack(pageContext), name, cascade, pageContext);
-
-        return EVAL_PAGE;
+    public void doTag() throws JspException, IOException {
+        JspContext jspContext = getJspContext();
+        model.start(JspUtil.getComposeStack(jspContext), role, inherit);
+        JspUtil.evaluateFragment(getJspBody());
+        model.end(JspUtil.getCurrentContainer(jspContext), JspUtil
+                .getComposeStack(jspContext), name, cascade, jspContext);
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/TilesBodyTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/TilesBodyTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/TilesBodyTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/TilesBodyTag.java Tue Jun  9 19:27:26 2009
@@ -29,7 +29,9 @@
  *
  * @version $Rev$ $Date$
  * @since 2.1.1
+ * @deprecated Since simple style of tags is used, this class is useless.
  */
+@Deprecated
 public abstract class TilesBodyTag extends BodyTagSupport implements
         TryCatchFinally {
 

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/UseAttributeTag.java Tue Jun  9 19:27:26 2009
@@ -24,7 +24,9 @@
 
 import java.util.Map;
 
+import javax.servlet.jsp.JspContext;
 import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
 import javax.servlet.jsp.tagext.TagData;
 import javax.servlet.jsp.tagext.TagExtraInfo;
 import javax.servlet.jsp.tagext.VariableInfo;
@@ -39,7 +41,7 @@
  * @since Tiles 1.0
  * @version $Rev$ $Date$
  */
-public class UseAttributeTag extends TilesTag {
+public class UseAttributeTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -47,6 +49,11 @@
     private ImportAttributeModel model = new ImportAttributeModel();
 
     /**
+     * The id of the imported scripting variable.
+     */
+    private String id;
+
+    /**
      * The scope name.
      */
     private String scopeName = null;
@@ -67,6 +74,26 @@
     private String classname = null;
 
     /**
+     * Returns the id of the imported scripting variable.
+     *
+     * @return The id of the imported scripting variable.
+     * @since 2.2.0
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the id of the imported scripting variable.
+     *
+     * @param id The id of the imported scripting variable.
+     * @since 2.2.0
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
      * Set the scope.
      *
      * @param scope Scope.
@@ -142,18 +169,9 @@
     }
 
     /** {@inheritDoc} */
-    protected void reset() {
-        super.reset();
-        name = null;
-        scopeName = null;
-        ignore = false;
-        classname = null;
-        id = null;
-    }
-
-    /** {@inheritDoc} */
     @Override
-    public int doStartTag() throws JspException {
+    public void doTag() throws JspException {
+        JspContext pageContext = getJspContext();
         Map<String, Object> attributes = model.getImportedAttributes(JspUtil
                 .getCurrentContainer(pageContext), name, id, ignore,
                 pageContext);
@@ -162,7 +180,6 @@
             pageContext.setAttribute(getScriptingVariable(), attributes
                     .values().iterator().next(), scopeId);
         }
-        return EVAL_PAGE;
     }
 
     /**

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DefinitionTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DefinitionTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DefinitionTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DefinitionTag.java Tue Jun  9 19:27:26 2009
@@ -20,9 +20,14 @@
  */
 package org.apache.tiles.jsp.taglib.definition;
 
+import java.io.IOException;
+
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
 import org.apache.tiles.TilesContainer;
 import org.apache.tiles.jsp.context.JspUtil;
-import org.apache.tiles.jsp.taglib.TilesBodyTag;
 import org.apache.tiles.jsp.taglib.TilesJspException;
 import org.apache.tiles.mgmt.MutableTilesContainer;
 import org.apache.tiles.template.DefinitionModel;
@@ -34,7 +39,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class DefinitionTag extends TilesBodyTag {
+public class DefinitionTag extends SimpleTagSupport {
 
     /**
      * The template model.
@@ -158,30 +163,16 @@
 
     /** {@inheritDoc} */
     @Override
-    protected void reset() {
-        super.reset();
-        name = null;
-        template = null;
-        extend = null;
-        role = null;
-        preparer = null;
-    }
-
-    /** {@inheritDoc} */
-    public int doStartTag() throws TilesJspException {
-        model.start(JspUtil.getComposeStack(pageContext), name, template, role, extend, preparer);
-        return EVAL_BODY_INCLUDE;
-    }
-
-    /** {@inheritDoc} */
-    public int doEndTag() throws TilesJspException {
-        TilesContainer container = JspUtil.getCurrentContainer(pageContext);
+    public void doTag() throws JspException, IOException {
+        JspContext jspContext = getJspContext();
+        model.start(JspUtil.getComposeStack(jspContext), name, template, role, extend, preparer);
+        JspUtil.evaluateFragment(getJspBody());
+        TilesContainer container = JspUtil.getCurrentContainer(jspContext);
         if (container instanceof MutableTilesContainer) {
             model.end((MutableTilesContainer) container, JspUtil
-                    .getComposeStack(pageContext), pageContext);
+                    .getComposeStack(jspContext), jspContext);
         } else {
             throw new TilesJspException("The current container is not mutable");
         }
-        return EVAL_PAGE;
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DestroyContainerTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DestroyContainerTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DestroyContainerTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/DestroyContainerTag.java Tue Jun  9 19:27:26 2009
@@ -20,15 +20,16 @@
  */
 package org.apache.tiles.jsp.taglib.definition;
 
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
 import org.apache.tiles.jsp.context.JspUtil;
-import org.apache.tiles.jsp.taglib.TilesTag;
 
 /**
  * Destroys the accessible container.
  *
  * @version $Rev$ $Date$
  */
-public class DestroyContainerTag extends TilesTag {
+public class DestroyContainerTag extends SimpleTagSupport {
 
     /**
      * The key of the container to destroy.
@@ -55,17 +56,10 @@
         this.containerKey = containerKey;
     }
 
-    /** {@inheritDoc} */
-    @Override
-    protected void reset() {
-        super.reset();
-        this.containerKey = null;
-    }
 
     /** {@inheritDoc} */
     @Override
-    public int doEndTag() {
-        JspUtil.setContainer(pageContext, null, containerKey);
-        return EVAL_PAGE;
+    public void doTag() {
+        JspUtil.setContainer(getJspContext(), null, containerKey);
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/SetCurrentContainerTag.java
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/SetCurrentContainerTag.java?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/SetCurrentContainerTag.java (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/java/org/apache/tiles/jsp/taglib/definition/SetCurrentContainerTag.java Tue Jun  9 19:27:26 2009
@@ -22,9 +22,9 @@
 package org.apache.tiles.jsp.taglib.definition;
 
 import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
 
 import org.apache.tiles.jsp.context.JspUtil;
-import org.apache.tiles.jsp.taglib.TilesTag;
 
 /**
  * Sets the current container, to be used by Tiles tags.
@@ -32,7 +32,7 @@
  * @version $Rev$ $Date$
  * @since 2.1.0
  */
-public class SetCurrentContainerTag extends TilesTag {
+public class SetCurrentContainerTag extends SimpleTagSupport {
 
     /**
      * The key under which the container is stored.
@@ -61,15 +61,7 @@
 
     /** {@inheritDoc} */
     @Override
-    protected void reset() {
-        super.reset();
-        this.containerKey = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int doEndTag() throws JspException {
-        JspUtil.setCurrentContainer(pageContext, containerKey);
-        return SKIP_BODY;
+    public void doTag() throws JspException {
+        JspUtil.setCurrentContainer(getJspContext(), containerKey);
     }
 }

Modified: tiles/framework/trunk/tiles-jsp/src/main/resources/META-INF/tld/tiles-jsp.tld
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-jsp/src/main/resources/META-INF/tld/tiles-jsp.tld?rev=783101&r1=783100&r2=783101&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-jsp/src/main/resources/META-INF/tld/tiles-jsp.tld (original)
+++ tiles/framework/trunk/tiles-jsp/src/main/resources/META-INF/tld/tiles-jsp.tld Tue Jun  9 19:27:26 2009
@@ -21,23 +21,19 @@
  * under the License.
  */
 -->
-<!DOCTYPE taglib PUBLIC
-    "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
-    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
-<taglib>
-   <tlib-version>2.1</tlib-version>
-   <jsp-version>1.2</jsp-version>
-   <short-name>tiles</short-name>
-   <uri>http://tiles.apache.org/tags-tiles</uri>
+<taglib
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	version="2.1">
    <description>
    <![CDATA[
    <p>This tag library provides Tiles tags.</p>
    ]]>
    </description>
+   <tlib-version>1.2</tlib-version>
+   <short-name>tiles</short-name>
+   <uri>http://tiles.apache.org/tags-tiles</uri>
    <tag>
-      <name>insertTemplate</name>
-      <tag-class>org.apache.tiles.jsp.taglib.InsertTemplateTag</tag-class>
-      <body-content>JSP</body-content>
       <description>
       <![CDATA[
       <p><strong>Insert a template.</strong></p>
@@ -66,10 +62,10 @@
       </pre>
       ]]>
       </description>
+      <name>insertTemplate</name>
+      <tag-class>org.apache.tiles.jsp.taglib.InsertTemplateTag</tag-class>
+      <body-content>scriptless</body-content>
       <attribute>
-         <name>template</name>
-         <required>true</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>A string representing the URI of a template (for example, a JSP
@@ -77,24 +73,23 @@
          </p>
          ]]>
          </description>
+         <name>template</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>flush</name>
-         <required>false</required>
-         <rtexprvalue>false</rtexprvalue>
-         <type>boolean</type>
          <description>
          <![CDATA[
          <p>True or false. If true, current page out stream is flushed
          before insertion.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>ignore</name>
+         <name>flush</name>
          <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
+         <rtexprvalue>false</rtexprvalue>
          <type>boolean</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>If this attribute is set to true, and the attribute specified by the
@@ -103,32 +98,33 @@
          thrown.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>role</name>
+         <name>ignore</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>If the user is in the specified role, the tag is taken into account;
          otherwise, the tag is ignored (skipped).</p>
          ]]>
          </description>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
 
       <attribute>
+         <description>
+             The fully qualified class name of the preparer.
+         </description>
          <name>preparer</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
-          <description>
-              The fully qualified class name of the preparer.
-          </description>
       </attribute>
    </tag>
    <tag>
-      <name>insertDefinition</name>
-      <tag-class>org.apache.tiles.jsp.taglib.InsertDefinitionTag</tag-class>
-      <body-content>JSP</body-content>
       <description>
       <![CDATA[
       <p><strong>Insert a definition.</strong></p>
@@ -157,20 +153,20 @@
       </pre>
       ]]>
       </description>
+      <name>insertDefinition</name>
+      <tag-class>org.apache.tiles.jsp.taglib.InsertDefinitionTag</tag-class>
+      <body-content>scriptless</body-content>
       <attribute>
-         <name>name</name>
-         <required>true</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>Name of the definition to insert.</p>
          ]]>
          </description>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>template</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>A string representing the URI of a template (for example, a JSP
@@ -178,24 +174,23 @@
          </p>
          ]]>
          </description>
+         <name>template</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>flush</name>
-         <required>false</required>
-         <rtexprvalue>false</rtexprvalue>
-         <type>boolean</type>
          <description>
          <![CDATA[
          <p>True or false. If true, current page out stream is flushed
          before insertion.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>ignore</name>
+         <name>flush</name>
          <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
+         <rtexprvalue>false</rtexprvalue>
          <type>boolean</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>If this attribute is set to true, and the attribute specified by the
@@ -204,32 +199,33 @@
          thrown.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>role</name>
+         <name>ignore</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>If the user is in the specified role, the tag is taken into account;
          otherwise, the tag is ignored (skipped).</p>
          ]]>
          </description>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
 
       <attribute>
+         <description>
+             The fully qualified class name of preparer.
+         </description>
          <name>preparer</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
-          <description>
-              The fully qualified class name of preparer.
-          </description>
       </attribute>
    </tag>
    <tag>
-      <name>insertAttribute</name>
-      <tag-class>org.apache.tiles.jsp.taglib.InsertAttributeTag</tag-class>
-      <body-content>JSP</body-content>
       <description>
       <![CDATA[
       <p><strong>Inserts the value of an attribute into the page.</strong></p>
@@ -249,46 +245,45 @@
       </pre>
       ]]>
       </description>
+      <name>insertAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.InsertAttributeTag</tag-class>
+      <body-content>scriptless</body-content>
       <attribute>
-         <name>name</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>Name of the attribute to insert. This attribute will be ignored if
          the <code>value</code> attribute is specified.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>value</name>
+         <name>name</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
-         <type>java.lang.Object</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>Attribute object to render directly. If it specified, the <code>name</code>
          attribute will be ignored.</p>
          ]]>
          </description>
+         <name>value</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>java.lang.Object</type>
       </attribute>
       <attribute>
-         <name>flush</name>
-         <required>false</required>
-         <rtexprvalue>false</rtexprvalue>
-         <type>boolean</type>
          <description>
          <![CDATA[
          <p>True or false. If true, current page out stream is flushed
          before insertion.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>ignore</name>
+         <name>flush</name>
          <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
+         <rtexprvalue>false</rtexprvalue>
          <type>boolean</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>If this attribute is set to true, and the attribute specified by the
@@ -297,55 +292,55 @@
          thrown.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>role</name>
+         <name>ignore</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>If the user is in the specified role, the tag is taken into account;
          otherwise, the tag is ignored (skipped).</p>
          ]]>
          </description>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
+         <description>
+             The fully qualified name of the preparer.
+         </description>
          <name>preparer</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
-          <description>
-              The fully qualified name of the preparer.
-          </description>
       </attribute>
       <attribute>
-         <name>defaultValue</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
-         <type>java.lang.Object</type>
          <description>
          <![CDATA[
          <p>This value is evaluated only if <code>value</code> is null and the
          attribute with the associated <code>name</code> is null.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>defaultValueType</name>
+         <name>defaultValue</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          <type>java.lang.Object</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>The type of the <code>defaultValue</code>, if it is a string.
          To be used in conjunction with <code>defaultValue</code> attribute.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>defaultValueRole</name>
+         <name>defaultValueType</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          <type>java.lang.Object</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>The role to check for the default value. If the user is in the specified
@@ -354,12 +349,13 @@
          To be used in conjunction with <code>defaultValue</code> attribute.</p>
          ]]>
          </description>
+         <name>defaultValueRole</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>java.lang.Object</type>
       </attribute>
    </tag>
    <tag>
-      <name>definition</name>
-      <tag-class>org.apache.tiles.jsp.taglib.definition.DefinitionTag</tag-class>
-      <body-content>JSP</body-content>
       <description>
          <![CDATA[
          <p><strong>Create a definition at runtime.
@@ -367,33 +363,33 @@
          <p>Create a new definition at runtime.
          Newly created definition will be available across the entire request.
          </p>]]>
-         </description>
+      </description>
+      <name>definition</name>
+      <tag-class>org.apache.tiles.jsp.taglib.definition.DefinitionTag</tag-class>
+      <body-content>scriptless</body-content>
       <attribute>
-         <name>name</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>Specifies the name under which the newly created definition bean
          will be saved.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>template</name>
+         <name>name</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>A string representing the URI of a template
          (a JSP page).</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>role</name>
+         <name>template</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>Role to check before inserting this definition. If role is not
@@ -401,34 +397,34 @@
          done at insert time, not during definition process.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>extends</name>
+         <name>role</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>Name of a parent definition that is used to initialize this new
          definition. Parent definition is searched in definitions factory.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>preparer</name>
+         <name>extends</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>Specifies the preparer name to use. The specified preparer will
          be executed before rendering this newly created definition.</p>
          ]]>
          </description>
+         <name>preparer</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
    </tag>
    <tag>
-      <name>putAttribute</name>
-      <tag-class>org.apache.tiles.jsp.taglib.PutAttributeTag</tag-class>
-      <body-content>JSP</body-content>
       <description>
       <![CDATA[
       <p><strong>Put an attribute in enclosing attribute container tag.</strong></p>
@@ -458,31 +454,31 @@
 		"string", unless tag body define another type.</p>
       ]]>
       </description>
+      <name>putAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.PutAttributeTag</tag-class>
+      <body-content>scriptless</body-content>
       <attribute>
-         <name>name</name>
-         <required>true</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>Name of the attribute.</p>
          ]]>
          </description>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>value</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
-         <type>java.lang.Object</type>
          <description>
          <![CDATA[
          <p>Attribute value. Could be a String or an Object.</p>
          ]]>
          </description>
+         <name>value</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>java.lang.Object</type>
       </attribute>
       <attribute>
-         <name>type</name>
-         <required>false</required>
-         <rtexprvalue>false</rtexprvalue>
          <description>
          <![CDATA[
          <p>Specify content type: string, template or definition.</p>
@@ -496,11 +492,11 @@
          </ul>
          ]]>
          </description>
+         <name>type</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
-         <name>role</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>
@@ -509,12 +505,11 @@
          </p>
          ]]>
          </description>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>cascade</name>
-         <required>false</required>
-         <rtexprvalue>false</rtexprvalue>
-         <type>boolean</type>
          <description>
          <![CDATA[
          <p>
@@ -523,12 +518,13 @@
          </p>
          ]]>
          </description>
+         <name>cascade</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+         <type>boolean</type>
       </attribute>
    </tag>
    <tag>
-      <name>putListAttribute</name>
-      <tag-class>org.apache.tiles.jsp.taglib.PutListAttributeTag</tag-class>
-      <body-content>JSP</body-content>
       <description>
       <![CDATA[
       <p><strong>Declare a list that will be pass as attribute to tile.
@@ -539,21 +535,20 @@
       'definition' tags.</p>
       ]]>
       </description>
+      <name>putListAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.PutListAttributeTag</tag-class>
+      <body-content>scriptless</body-content>
       <attribute>
-         <name>name</name>
-         <required>true</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>Name of the list.</p>
          ]]>
          </description>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>cascade</name>
-         <required>false</required>
-         <rtexprvalue>false</rtexprvalue>
-         <type>boolean</type>
          <description>
          <![CDATA[
          <p>
@@ -562,12 +557,12 @@
          </p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>inherit</name>
+         <name>cascade</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <type>boolean</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>If true, the attribute will put the elements of the attribute
@@ -575,18 +570,13 @@
          specified here. By default, it is 'false'.</p>
          ]]>
          </description>
+         <name>inherit</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
+         <type>boolean</type>
       </attribute>
    </tag>
    <tag>
-      <name>addAttribute</name>
-       <!--
-           Intentionally PutTag, it doubles for the AddTag
-           The only difference between the two is that the name
-           is not used in the Add Tag (and it's only valid within
-           the PutList
-        -->
-      <tag-class>org.apache.tiles.jsp.taglib.AddAttributeTag</tag-class>
-      <body-content>JSP</body-content>
       <description>
       <![CDATA[
       <p><strong>Add an element to the surrounding list.
@@ -597,21 +587,21 @@
       Value can come from a direct assignment (value="aValue")</p>
       ]]>
       </description>
+      <name>addAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.AddAttributeTag</tag-class>
+      <body-content>scriptless</body-content>
       <attribute>
+         <description>
+	         <![CDATA[
+	         <p>Attribute value. Can be a String or Object.</p>
+	         ]]>
+         </description>
          <name>value</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          <type>java.lang.Object</type>
-         <description>
-         <![CDATA[
-         <p>Attribute value. Can be a String or Object.</p>
-         ]]>
-      </description>
       </attribute>
       <attribute>
-         <name>type</name>
-         <required>false</required>
-         <rtexprvalue>false</rtexprvalue>
          <description>
          <![CDATA[
          <p>Specify content type: string, template or definition.</p>
@@ -625,23 +615,23 @@
          </ul>
          ]]>
          </description>
+         <name>type</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
-         <name>role</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>If the user is in the specified role, the tag is taken into account;
          otherwise, the tag is ignored (skipped).</p>
          ]]>
          </description>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
    </tag>
    <tag>
-      <name>addListAttribute</name>
-      <tag-class>org.apache.tiles.jsp.taglib.AddListAttributeTag</tag-class>
-      <body-content>JSP</body-content>
       <description>
       <![CDATA[
       <p><strong>Declare a list that will be pass as an attribute.
@@ -652,11 +642,11 @@
       or 'definition' tag.</p>
       ]]>
       </description>
+      <name>addListAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.AddListAttributeTag</tag-class>
+      <body-content>scriptless</body-content>
    </tag>
    <tag>
-      <name>getAsString</name>
-      <tag-class>org.apache.tiles.jsp.taglib.GetAsStringTag</tag-class>
-      <body-content>empty</body-content>
       <description>
       <![CDATA[
       <p><strong>
@@ -669,21 +659,20 @@
       <p>Throw a JSPException if named value is not found.</p>
       ]]>
       </description>
+      <name>getAsString</name>
+      <tag-class>org.apache.tiles.jsp.taglib.GetAsStringTag</tag-class>
+      <body-content>empty</body-content>
       <attribute>
-         <name>name</name>
-         <required>true</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>Attribute name.</p>
          ]]>
          </description>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>ignore</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
-         <type>boolean</type>
          <description>
          <![CDATA[
          <p>
@@ -693,11 +682,12 @@
          </p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>role</name>
+         <name>ignore</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>
@@ -706,13 +696,12 @@
          </p>
          ]]>
          </description>
+         <name>role</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
    </tag>
    <tag>
-      <name>useAttribute</name>
-      <tag-class>org.apache.tiles.jsp.taglib.UseAttributeTag</tag-class>
-      <tei-class>org.apache.tiles.jsp.taglib.UseAttributeTag$Tei</tei-class>
-      <body-content>empty</body-content>
       <description>
       <![CDATA[
       <p><strong>Use attribute value inside page.</strong></p>
@@ -722,51 +711,51 @@
       or the original name if not specified.</p>
       ]]>
       </description>
+      <name>useAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.UseAttributeTag</tag-class>
+      <tei-class>org.apache.tiles.jsp.taglib.UseAttributeTag$Tei</tei-class>
+      <body-content>empty</body-content>
       <attribute>
-         <name>id</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>Declared attribute and variable name.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>classname</name>
+         <name>id</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>Class of the declared variable.</p>
          ]]>
          </description>
+         <name>classname</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>scope</name>
-         <required>false</required>
-         <rtexprvalue>false</rtexprvalue>
          <description>
          <![CDATA[
          <p>Scope of the declared attribute. Default to 'page'.</p>
          ]]>
          </description>
+         <name>scope</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
-         <name>name</name>
-         <required>true</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>Attribute name.</p>
          ]]>
          </description>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>ignore</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
-         <type>boolean</type>
          <description>
          <![CDATA[
          <p>
@@ -776,12 +765,13 @@
          </p>
          ]]>
          </description>
+         <name>ignore</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
       </attribute>
    </tag>
    <tag>
-      <name>importAttribute</name>
-      <tag-class>org.apache.tiles.jsp.taglib.ImportAttributeTag</tag-class>
-      <body-content>empty</body-content>
       <description>
       <![CDATA[
       <p><strong>Import attribute(s) in specified context.</strong></p>
@@ -792,43 +782,42 @@
       contexts.</p>
       ]]>
       </description>
+      <name>importAttribute</name>
+      <tag-class>org.apache.tiles.jsp.taglib.ImportAttributeTag</tag-class>
+      <body-content>empty</body-content>
       <attribute>
-         <name>name</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
          <description>
          <![CDATA[
          <p>Attribute name. If not specified, all attributes are
          imported.</p>
          ]]>
          </description>
-      </attribute>
-      <attribute>
-         <name>toName</name>
+         <name>name</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
          <description>
          <![CDATA[
          <p>Name of the destination bean. If not specified, the name will
          be the same as specified in <code>name</code> attribute</p>
          ]]>
          </description>
+         <name>toName</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
-         <name>scope</name>
-         <required>false</required>
-         <rtexprvalue>false</rtexprvalue>
          <description>
          <![CDATA[
          <p>Scope into which attribute is imported. Default to page.</p>
          ]]>
          </description>
+         <name>scope</name>
+         <required>false</required>
+         <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
-         <name>ignore</name>
-         <required>false</required>
-         <rtexprvalue>true</rtexprvalue>
-         <type>boolean</type>
          <description>
          <![CDATA[
          <p>If this attribute is set to true, and the attribute specified by
@@ -836,12 +825,13 @@
          value is false, which will cause a runtime exception to be thrown.</p>
          ]]>
          </description>
+         <name>ignore</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+         <type>boolean</type>
       </attribute>
    </tag>
    <tag>
-      <name>initContainer</name>
-      <tag-class>org.apache.tiles.jsp.taglib.definition.InitContainerTag</tag-class>
-      <body-content>JSP</body-content>
       <description>
       <![CDATA[
       <p><strong>THIS TAG HAS BEEN DEPRECATED! Please use TilesInitializer or a
@@ -860,53 +850,56 @@
       </p>
       ]]>
       </description>
+      <name>initContainer</name>
+      <tag-class>org.apache.tiles.jsp.taglib.definition.InitContainerTag</tag-class>
+      <body-content>scriptless</body-content>
       <attribute>
+         <description> <![CDATA[ <p>Container Factory implementation used to instantiate the container.</p> ]]> </description>
          <name>containerFactory</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
-         <description> <![CDATA[ <p>Container Factory implementation used to instantiate the container.</p> ]]> </description>
       </attribute>
       <attribute>
+         <description> <![CDATA[ <p>The key under which the container will be stored.</p>
+         <p>If not defined, the container will be the default container</p> ]]> </description>
          <name>containerKey</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
-         <description> <![CDATA[ <p>The key under which the container will be stored.</p>
-         <p>If not defined, the container will be the default container</p> ]]> </description>
       </attribute>
    </tag>
 
     <tag>
-        <name>destroyContainer</name>
-        <tag-class>org.apache.tiles.jsp.taglib.definition.DestroyContainerTag</tag-class>
-        <body-content>empty</body-content>
         <description>
             <![CDATA[
             <p><strong>Destroy the TilesContainer.</strong></p>
             ]]>
         </description>
+        <name>destroyContainer</name>
+        <tag-class>org.apache.tiles.jsp.taglib.definition.DestroyContainerTag</tag-class>
+        <body-content>empty</body-content>
         <attribute>
+            <description> <![CDATA[ <p>The key of the container to destroy.</p>
+            <p>If not defined, the destroyed container will be the default container</p> ]]> </description>
             <name>containerKey</name>
             <required>false</required>
             <rtexprvalue>true</rtexprvalue>
-            <description> <![CDATA[ <p>The key of the container to destroy.</p>
-            <p>If not defined, the destroyed container will be the default container</p> ]]> </description>
         </attribute>
     </tag>
     <tag>
-        <name>setCurrentContainer</name>
-        <tag-class>org.apache.tiles.jsp.taglib.definition.SetCurrentContainerTag</tag-class>
-        <body-content>empty</body-content>
         <description>
             <![CDATA[
             <p><strong>Sets the current Tiles container to use in Tiles tags.</strong></p>
             ]]>
         </description>
+        <name>setCurrentContainer</name>
+        <tag-class>org.apache.tiles.jsp.taglib.definition.SetCurrentContainerTag</tag-class>
+        <body-content>empty</body-content>
         <attribute>
+            <description> <![CDATA[ <p>The key of the container that will be set as "current".</p>
+            <p>If not defined, the current container will be the default container</p> ]]> </description>
             <name>containerKey</name>
             <required>false</required>
             <rtexprvalue>true</rtexprvalue>
-            <description> <![CDATA[ <p>The key of the container that will be set as "current".</p>
-            <p>If not defined, the current container will be the default container</p> ]]> </description>
         </attribute>
     </tag>
 </taglib>