each page needs the taglibs. remember each jsp must be complied first, and without the taglib directives, the compile would fail.
peace, scott On May 20, 2011 2:04 PM, "Anjib Mulepati" <anji...@hotmail.com> wrote: > Hi, > > 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? > > Example > > 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> > > <html> > <head> > <title><tiles:getAsString name="title" ignore="true" /></title> > </head> > <body> > <tiles:insert attribute="content" /> > </body> > </html> > > 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="/login.do">Log-In</html:link> > > 3. My tiles definition file looks like > > <tiles-definitions> > > <definition name="basicLayout" path="/jsp/basicLayout.jsp"> > <put name="title" value=":: Main Page ::" /> > <put name="content" value="" /> > </definition> > > <definition name="loginPage" extends="basicLayout"> > <put name="title" value=":: Login Page ::" /> > <put name="content" value="/jsp/login.jsp" /> > </definition> > > </tiles-definitions> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org >