# TemplateUsingJSP.jsp Sample

This topic inludes the source code for the TemplateUsingJSP.jsp Sample.

## Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui_template/template/

## Sample Source Code

`01 <%@ page language="java" contentType="text/html;charset=UTF-8"%> 02 <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%> 03 <%@ taglib uri="netui-tags-html.tld" prefix="netui"%> 04 <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%> 05 <netui-template:template templatePage="./template.jsp"> 06 07 <netui-template:setAttribute name="title" value="Template Tags Sample"/> 08 <netui-template:setAttribute name="headerColor" value="lightgreen"/> 09 <netui-template:setAttribute name="footerColor" value="lightblue"/> 10 11 <netui-template:section name="topImage"> 12 <jsp:include page="/resources/jsp/header.jsp" /> 13 </netui-template:section> 14 15 <netui-template:section name="tableHeader"> 16 <h1>header text</h1> 17 </netui-template:section> 18 19 <netui-template:section name="leftCol"> 20 <netui-template:visible visible="true"> 21 <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, 22 sed diam nonummy nibh euismod tincidunt ut laoreet dolore 23 magna aliquam erat volutpat. Ut wisi enim ad minim veniam, 24 quis nostrud exerci tation ullamcorper suscipit lobortis nisl 25 ut aliquip ex ea commodo consequat.</p> 26 </netui-template:visible> 27 </netui-template:section> 28 29 <netui-template:section name="centerCol" visible="false"> 30 <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, 31 sed diam nonummy nibh euismod tincidunt ut laoreet dolore 32 magna aliquam erat volutpat. Ut wisi enim ad minim veniam, 33 quis nostrud exerci tation ullamcorper suscipit lobortis nisl 34 ut aliquip ex ea commodo consequat.</p> 35 </netui-template:section> 36 37 <!--Because this section is commented out, the "rightCol" placeholder will 38 use the "defaultPage.jsp" for its content.--> 39 <%--netui-template:section name="rightCol"> 40 <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, 41 sed diam nonummy nibh euismod tincidunt ut laoreet dolore 42 magna aliquam erat volutpat. Ut wisi enim ad minim veniam, 43 quis nostrud exerci tation ullamcorper suscipit lobortis nisl 44 ut aliquip ex ea commodo consequat.</p> 45 </netui-template:section--%> 46 47 <netui-template:section name="tableFooter"> 48 <h1>footer text</h1> 49 </netui-template:section> 50 51 </netui-template:template>`