http://thread.gmane.org/gmane.comp.apache.tiles.user/356/focus=363
(the documentation for tiles-3 is still in need of a full moderation)
git-svn-id: https://svn.apache.org/repos/asf/tiles/framework/trunk@1186263 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/tiles-parent/src/site/apt/tutorial/advanced/runtime.apt b/tiles-parent/src/site/apt/tutorial/advanced/runtime.apt
index e363fa8..c80dee0 100644
--- a/tiles-parent/src/site/apt/tutorial/advanced/runtime.apt
+++ b/tiles-parent/src/site/apt/tutorial/advanced/runtime.apt
@@ -76,7 +76,7 @@
To create definitions at runtime, first of all you need to configure your
Tiles-based application to use a
{{{../../config-reference.html#org.apache.tiles.factory.TilesContainerFactory.MUTABLE}mutable container}}.
-
+
In your JSP page, now you can create definitions. This definition will be
available during the request, and then it will expire.
@@ -93,12 +93,12 @@
environment, you can use the <<container>> feature of Tiles. Essentially Tiles
is a container that stores definitions, allow to render pages and allows to
modify the configuration at runtime.
-
+
* Using the Tiles container
To get the current container (in a servlet environment) you can use the
<<TilesAccess>> class:
-
+
-------------------------------------
TilesContainer container = TilesAccess.getContainer(
request.getSession().getServletContext());
@@ -109,7 +109,7 @@
all the configured attributes.
--------------------------------------
-TilesAttributeContext attributeContext = container.getAttributeContext(request,
+AttributeContext attributeContext = container.getAttributeContext(request,
response);
--------------------------------------
@@ -118,8 +118,7 @@
the Tiles container:
--------------------------------------
-TilesAttributeContext attributeContext = container.startContext(request,
- response);
+AttributeContext attributeContext = container.startContext(request, response);
attributeContext.setAttribute("body", "/tiles/body_customer.jsp");
container.render("myapp.homepage", request, response);
container.endContext(request, response);
@@ -129,8 +128,7 @@
contains all of its attributes filled, it will be rendered correctly.
--------------------------------------
-TilesAttributeContext attributeContext = container.startContext(request,
- response);
+AttributeContext attributeContext = container.startContext(request, response);
attributeContext.setAttribute("body", "/tiles/body_customer.jsp");
// Put all the other attributes.
RequestDispatcher rd = request.getRequestDispatcher("/layouts/my_template.jsp");