On Wed, Dec 08, 2004 at 12:28:35AM +0800, Zerol Tib wrote: : As we know, <%@ include%> can include another jsp page : at "translation time" while <jsp:include> can include another : jsp at "runtime". But when to use each? Could anyone give me : a scenario?
Adding to the fine responses you've already received: The build-time include is useful for sharing a JSP fragment amongst several full JSPs. If you use a full-blown layout system such as Tiles, this is moot; but for a more homegrown setup, <%@ include%> is a nice approximation. Two notes if you go this route: 1/ name your JSP fragments something other than ".jsp" (".jspf" is the unofficial standard) such that they aren't picked up by a precompiler 2/ watch those file sizes. Overusing the build-time include can fatten up the resultant .java file to the point it doesn't compile. (or was that the JSP itself gets too big to be translated to Java source? Either way, it's ugly.) -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]