struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <>
Subject Re: Templates: a design question
Date Thu, 02 Aug 2001 14:49:23 GMT

  Another way is to use Tiles, which can be seem as "extended templates", and are compatible
with Templates.
  Tiles allow to describe  "screen definitions" in a central config file, using the same syntax
than Template ! Then, you can forward your Struts action to any screen definition. Also, screens
can be defined by extending other screens.
  By using screen definitions, you can avoid the second page needed by templates. Tiles also
propose other mechanism that can help you.
  I'm currently integrting Tiles in Struts 1.1. They are already available in the source distribution,
and will be soon in the binary distribution. In the meantime, you can download Tiles from
their original website


Tiles sites :
  (mirror) :

Oleg Bondarenko wrote:

> Hello all,
> I am very new to Struts and I find it interesting. I like the action mapping and also
templates, but I have difficulties using them together.
> E.g. I have a central page, say Main.jsp that has a template which contains constant
header and footer and a variable content part. This content part (a jsp) must be determined
at the run-time. Because of the template I have to always send back to the user the Main.jsp.
How to use action mapping then?
> One possible solution would be the following. The action handler stores the variable
content part as a session attribute and always returns the global mapping "main" (which is
mapped to the Main.jsp). The Main.jsp retrieves the central variable part from the session
and pass it to the template.
> This works, but I have a feeling that I am not correctly using the Struts. Any input
from experts would be highly appreciated.
> Best Regards,
> Oleg Bondarenko
> --
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn
Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren
Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail ist nicht gestattet.
> This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender immediately
and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.

View raw message