Components have been
renamed to Tiles.
Please use the new Tiles site
This page is left as an
the Components website. This "portal" page is an
example of what can be done with Components. It is made by
assembling Components. It is an example of what you can do
Components can be seen as extended templates.
If you want to know
more, take a glance to the quick overview examples, or start by the
Components Concept :
Template mechanism :
A component extends the Template concept by adding new
- A component is a JSP page that can be inserted in any
JSP pages, and that can take "parameters" (String, URLs, List,
- Inside the
Component / JSP page, you can use parameter value : write it or use it to include another Component / JSP page
If well defined, components can be reused
Can propose "library" of reusable
Components, you can easilly build portal pages
Define Components that will make your portal
Components in a list fashion (see the Components Documentation as example)
Components, you can easilly build menu : just pass a lists of items to
show, and list of links to a Component that will do the job
own Components taking parameters (simple or list), and doing what you want
Component / Template Definitions :
- Compatible with Struts JSP Templates
- You can use Components in place of Templates
- A template is a page made of
- Templates can be defined in a
centralized file (see Components Definitions)
fix some parameters of your component (like URLs of header and footer),
and you got a definition .
Definitions can be described in a centralized XML
Definition can be created in a Struts
action, and parameters can be set
A definition can also be described in JSP
definition can inherit from another definition .
This allows to define a main definition, with
fixed header, title, body, footer and menu, and let other
inherit from it,
just overiding requested parameters (usually body and
in struts-config file can specify a definition
name as target.
|Dynamic Portal Example|
|Portal page is build according to a
user profile, or whatever you want.
|Components Configuration File|
- Add the ability
to have attribute value in tag body. This is already the case in JSP pages, but not in Configuration file.
- Add role attribute to tags in instance
- Be able to reload instance
descriptions without restarting Tomcat
Components have been
renamed to Tiles. Please use the new Tiles site !
Last (please use Tiles now) development version of Component Library
can be downloaded from following web sites (choose one site) :
Latest build : 2001 07 04
(with struts2001 06 27 - 1.1dev)
: Deprecated tags from
previous builds have been removed in the new build. Check the backward compatibility table
help update your sites.
While I have proposed the
"Components", David Geary has proposed the "JSP Templates".
In fact, JSP Templates provide nearly the
same solution, with nearly the same implementation. But, Components go
one step beyond and extend the concept of "templates" to the
concept of "components".
A component is a JSP page
that can be inserted in any JSP pages (like templates !), and that can
takes "parameters" (URLs or 'direct' string in templates). Furthermore,
you can create 'definitions' of components (or templates) in a XML description file,
allowing a central point for modifications, inheritance of existing
definition, parameters overload, ...
the JSP Templates proposal, I have try to merge both.
Now, Components are compatible with JSP Templates
To test JSP Templates compatibility, try this :
Futhermore, parts of Components features will be integrated in Struts
- take original JSP Template example (struts-template),
- put "components.jar" in WEB-INF/lib,
- put "components.tld" in WEB_INF/tlds,
- in WEB-INF/web.xml change the taglib uri location to
- try the example. It now use the component library.
- Have a look to comps-template,
it is the (old) template example, using instances declared
in a centralized file
|Integration with Struts
As "Struts committer", I will
progressively integrate parts
of Components proposal in the Struts project.
This will start soon with Struts 1.1.
For now, this library is a proposal.
have tried to minimize modifications in Struts code.
Rather than to provide modified copy of Struts, I prefer
to subclass classes needing modifications. Tags needing modification are
also subclassed, and declared in a separate tld file.
Following is a list of actual modifications :
- Add a "processForward" method.
- Purpose : be able to subclass
servlet, and override the forward mechanism.
- Needed if you want to forward to a definition in
| text tag|
mandatory, can be omitted if not used
- Add a "prefix" attribute.
- Purpose : be able to add a prefix
to the name of generated input tag. This modification is not mandatory.
It is only useful in some examples.
| 12 jul. 2001 |
componentContext before setting it in pageContext in
InsertTag (Silverstream issue ?)
| 04 jul. 2001 |
flush attribute to get
- Update tutorial
- Add a DTD for
configuration file. However, DTD is not used (yet)
| 02 jul. 2001 |
- Tested successfully on
Tomcat-3.2.1, Tomcat-4.0b5, Orion-1.4.5, Resin-2.0.0
- Correct the release() bug preventing framework to run
- Remove calls to release() in doEndTag(), call to
| 17 jun. 2001 |
Remove backward compatibility with deprecated tags. Update webapps accordingly
Release multi-channels example.
| 20 may. 2001 |
definition factory implementation. This simplify design and usage
of others implementations. A 'multi-channel' implementation is in study.
- Allow to insert an 'action URL' as
well as a 'definition' or a 'jsp'. This implies a check in ActionServlet
just before doing effective forward or include.
| 29 apr. 2001Stable version |
- Role attribute is taken into account.
- PutList accept nested putList.
- Clearly separate definition factory.
- Possibility to implement others definition factory
- Can provide definition factory class name as servlet
- Change nested tags implementation (PutTag, PutListTag,
AddTag, InsertTag, DefinitionTag).
| 19 apr. 2001 |
Correct a bug
preventing Components to run on Orion 1.4.5. Call
release() at the end of
| 08 apr. 2001 |
Add attribute 'ignore' to tags
- Add tag <getAsString> to replace
Change tests suite
| 02 apr. 2001 |
Use word "definition" instead of "instance". Concretely, a lot of class names and
tag names change. Have replaced a lot of
word "instance" by "definition. Old tags still exist for
Can define a "definition" in XML file, in an Action, or by using
| 14 feb. 2001 |
Added role attribute in tags. Components are again fully compatible with
| 07 feb. 2001 |
Modification of 'ActionComponentServlet.java' to be
compliant with latest Struts servlet implementation. Import the right
| 11 jan. 2001 |
- Modification of
'ActionComponentServlet.java' to be compliant with new Struts servlet
implementation. New classes are not compatible with Struts prior
- Redesign of classes related to
- Can now switch off/on debug output from
|03 jan. 2001 |
Tested on Weblogic 6.0. (Have modify ComponentMapFactory to
- Now examples use struts-config.xml (instead of old
|more ... |