tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Re: Migrating from Struts Tiles to Tiles 2
Date Wed, 02 Jan 2008 09:39:30 GMT
2007/12/22, Srikanth Jagannath <sjaganna@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

Mime
View raw message