The Common-Controls Tag Library

<template:put>

Inserts a JSP-fragment in a template.

The fragment can be specified either as an external JSP-file or directly in the tag-body.

The tag may only be used within a <template:insert>-tag.

Body content: JSP
Tag class: PutTag
 

[ Syntax ]

Standard Syntax
<template:put
name = "String"
[ content = "String" ]
[ direct = "boolean" ]
[ locale = "" ]
>
...Body Content...

</template:put>
 

[ Attributes ]

AttributeTypeDescriptionReq.RTExp
contentString Specifies the content of the JSP-fragment. The HTML-code can also be alternatively specified directly in the tag-body.

The direct attribute determines whether the contents involve a literal or a reference to an external file.

A filename is enhanced with the base directory if it starts with $.

Annotation: If the content-attribute is specified, then the tag-body must be empty.

 
directboolean This attribute defines whether the contents should be interpreted as a literal or as a pointer to an external file.  
locale 
nameString Specifies the logical name of a JSP-fragment.

Annotation: The name must match with a placeholder in the JSP template used. The template is defined in the enclosing <template:insert>-tag.

[ Example ]

Binds the JSP-Fragment ToolsMenu.jsp in the placeholder mainmenu of the template MainLayout.jsp.


<%@ taglib uri="http://www.common-controls.com/cc/tags-template" prefix="template" %>

<template:insert  base="/jsp"  template="$/template/MainLayout.jsp">
    <template:put  name="mainmenu"  content="$/include/ToolsMenu.jsp"/>
</template:insert>