You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Antonio Petrelli <an...@gmail.com> on 2008/01/02 10:39:30 UTC
Re: Migrating from Struts Tiles to Tiles 2
2007/12/22, Srikanth Jagannath <sj...@gmail.com>:
> String definitionName = ???;
> // Get the definition (add appropriate catch)
> ComponentDefinition definition
> = DefinitionsUtil.getDefinition(definitionName, request,
> getServletContext());
> // Create new Tiles context, initialized with the definition
> ComponentContext context = new ComponentContext(
> definition.getAttributes() );
> // Save context where the tiles will find it
> ComponentContext.setContext( tileContext, request);
> // Include the tiles
> String uri = definition.getPath();
> RequestDispatcher rd = getServletContext().getRequestDispatcher(uri);
> rd.include(request, response);
Look at this:
http://tiles.apache.org/tutorial/advanced/runtime.html
Ciao
Antonio