On Jul 10, 2006, at 1:18 PM, Mississippi John Hurt wrote:

I have a MainTemplate.jsp with header, body, footer in it. Weird thing is it seems that even though I put taglib declaration in my header.jsp, as in ...

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"; prefix="html" %>

I still also have to put taglibs declaration in the subBody.jsp or else my
struts tags like <html> and <bean> don't work!  Why is this?  Is this
correct? If I have to do this in all my sub.jsp's then why even use Tiles? I want to put all my taglibs declaration once, at the header, and not in every sub.jsp. Is this the way Tiles works? It renders each sub-jsp first then plugs everything in; or it plugs everything in, then renders it as a
whole single jsp page? Thanks.

It has the same functionality as <jsp:include>. With <jsp:include> each JSP page is evaluated separately and the output is included in the output of the "including" page. If you use the @include directive you are doing something like #includes in C. It merges the JSP content together before evaluating it.

You can have both. You can @include your taglibs, but I don't really like this approach. I prefer to just go ahead and explicitly define taglibs.

Greg


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to