Attributes for Struts template tags

This reference material describes the attributes for the Struts template tag library. By default, each tag name has a template: prefix.

Remember: As of Struts 1.1, the template tag library is deprecated. In Struts 1.2, the template tag library is removed and can not be used in a Struts application. Use the tiles tag library instead.

For more information about the Struts tags and tag attributes, refer to the Apache Struts specifications.

Each Struts tag has a number of attributes that you can set by using the Properties view of the tag. Use this table of attributes while working with the Properties view of the tag, to look up attributes for which you want additional detail. Some attributes have the same name but different usage in different elements. The attributes are listed in alphabetical order.

Tag Attribute Description
<template: get /> flush If

true, flushes the current page out stream before inserting a new page. The default is

false.

Note: This attribute exists as a work around on some containers.

name Specifies the name of the content to get from the tile scope.
role Causes the element to be ignored if the user is not in the specified role.
<template: insert/> template Specifies a string that represents the URI of a template to insert.
<template: put/> content Is a synonym for

value.

direct Specifies how content is handled:

true means that content is contained in the file;

false, the default, means that content is included from elsewhere. This is another way to specify content type. If you specify true, the content is interpreted as a string; otherwise, the content is interpreted as a page. This attribute exists for compatibility with the JSP template.

name Specifies the name of the attribute that is being put.
role Causes the tag to be ignored if the user is not in the specified role.