The Common-Controls Tag Library


The tag inserts a template blank in the JSP-Page. The template is a JSP-Page that contains placeholder for JSP fragments. The JSP-fragments are addressed by means of a logical name.

The assignment to physical file names is achieved using <template:put>-tags, which are specified within the <template:insert>-tags. For every placeholder in the template, a corresponding <template:put>-tag can be specified.

Body content: JSP
Tag class: InsertTag
Tei class: InsertTei

[ Syntax ]

Standard Syntax
template = "String"
[ base = "String" ]
[ id = "" ]
[ locale = "" ]
...Body Content...


[ Attributes ]

baseString The base directory for the JSP-pages is determined with the base attribute. This also has an action on the included <template:put>-tags.

The base directory can be individually set for every Painter, as the following example shows:


The example uses the base directory /jspCustom for those cases where the Painter myPainter is used. In all other cases, the base directory /jspDef is set.

CAUTION: The pace directory is taken into consideration only in the case of JSP-files that start with$

templateString Specifies the physical filename of the JSP-templates file. The filename is enhanced with the base directory if it starts with $.

[ Example ]

The arrangement of the screen elements of the Tools page is defined by the template MainLayout.jsp.

<%@ taglib uri="" prefix="template" %>

<template:insert id="tm" base="/jsp"  template="$/template/MainLayout.jsp">
    <%--  use resource key translation to localize the title  --%>
    <template:put  name="title"     content="" direct="true" locale="true"/>

    <%--  use a string literal  --%>
    <template:put  name="copyright" content="(c) my company" direct="true"/>

    <template:put  name="mainmenu"  content="$/include/ToolsMenu.jsp"/>
    <template:put  name="sidebar"   content="$/include/ToolsSidebar.jsp"/>
    <template:put  name="content"   content="$/include/ToolsRootContent.jsp"/>

    <%--  use a localized "about" page with the help of EL  --%>
    <template:put  name="about"     content="$/include/${pageScope['tm_locale']}/About.jsp"/>