struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anjib Mulepati <>
Subject [S 1.3.8] Adding tag lib
Date Fri, 20 May 2011 19:03:57 GMT

I have a query regarding adding tag lib in web pages while using tiles.
Is it enough to put tag lib directive in layout page only? Will all 
other pages loaded in layout get that?


1. In tiles layout page I have

<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!doctype html>

<title><tiles:getAsString name="title" ignore="true" /></title>
<tiles:insert attribute="content" />

2. Now some other page (/jsp/login.jsp) can I just use tags without 
adding <%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>.

<html:link action="/">Log-In</html:link>

3. My tiles definition file looks like


<definition name="basicLayout" path="/jsp/basicLayout.jsp">
<put name="title"   value=":: Main Page ::" />
<put name="content" value="" />

<definition name="loginPage" extends="basicLayout">
<put name="title"   value=":: Login Page ::" />
<put name="content" value="/jsp/login.jsp" />


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message