think that's a bad solution, the <include> has been deprecated by the use of tiles and the like to compose pages... and even with that I don't think it will work...
On 8/11/07, Martin Gainty <[EMAIL PROTECTED]> wrote: > > Jim- > > The simplest answer is to put all your tlds in an TLDInclude.jsp > then call that block in for each jsp > /**********contents of TLDinclude.jsp**********/ > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> > <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%> > > /*************Now for each and very jsp include this file at the top of > your > file**********/ > <%@ include file="/path_to_jsp/TLDinclude.jsp"%> > > Im sure there is a more elegant and complex solution out there somewhere > > M-- > This email message and any files transmitted with it contain confidential > information intended only for the person(s) to whom this email message is > addressed. If you have received this email message in error, please > notify > the sender immediately by telephone or email and destroy the original > message without making a copy. Thank you. > > ----- Original Message ----- > From: "Jim Reynolds" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <user@struts.apache.org> > Sent: Friday, August 10, 2007 9:24 PM > Subject: Re: Struts tile and other tag includes > > > >I have something like this: This is the layout, or tiles template as > > the docs state. > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> > > <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%> > > > > <html:html> > > <head> > > <title><bean:message key="global.title"/></title> > > <html:base/> > > </head> > > <body topmargin="0" leftmargin="0" bgcolor="#FFFFFF"> > > > > <!-- Header page information --> > > <tiles:insert attribute="header"/> > > > > So on that page, I have the taglib uris for html, bean, etc. > > > > Now lets say I have this which uses the layout > > <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> > > > > <tiles:insert page="/layouts/storefrontDefaultLayout.jsp" flush="true"> > > <tiles:put name="header" value="/common/header.jsp" /> > > <tiles:put name="menubar" value="/common/menubar.jsp" /> > > <tiles:put name="body-content" value="/index-body.jsp" /> > > <tiles:put name="copyright" value="/common/copyright.jsp" /> > > </tiles:insert> > > > > So in each of my pages now, such as header.jsp, menubar.jsp, etc. I > > have to put the html, bean, etc tags in each of these put pages., like > > so: > > menubar.jsp (example: > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> > > > > So basically, I am finding myself putting in the taglibs in each page > > I am put(ting) in my template. So I feel I am duplicating too much > > code. > > > > Does this make sense? Possibly, I am doing something wrong? > > > > Thanks, > > > > > > On 8/10/07, Dave Newton <[EMAIL PROTECTED]> wrote: > >> Hmm; repeat? > >> > >> --- Jim Reynolds <[EMAIL PROTECTED]> wrote: > >> > Struts 1.29 app that uses tiles definitions. > >> > Question is: I am finding myself having to call the > >> > >> > taglib in the layout, and also in each tile. > >> > >> Remember; every JSP is a standalone servlet. > >> > >> d. > >> > >> > >> > >> > >> > ____________________________________________________________________________________ > >> Need a vacation? Get great deals > >> to amazing places on Yahoo! Travel. > >> http://travel.yahoo.com/ > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Nada fija tan intensamente una cosa a la memoria como el deseo de olvidarla." (Michel de Montaigne) http://yayocaturas.blogspot.com/