<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>HELP needed - template elements</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">I am having a problem using template elements in a JSP page.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I have a JSP template that uses <cms:template element="...">some content</cms:template> to declare element blocks (based on many examples I have found in mailing list posts and in the OpenCms book). When I try to use these blocks in a JSP page, however, I can only use one include, otherwise I get a Resource loader error (FlexDispatcher: Detected inclusion loop for target).</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Included below are the page and template. If I comment out the head or foot include in the JSP page, then the other element will show up in the compiled page. But if both includes are there, then I get the error. </FONT></P>
<P><FONT SIZE=2 FACE="Arial">Does anyone know why I cannot include both head and foot at the same time?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Here is the JSP page</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><%@ page session="false" %></FONT>
<BR><FONT SIZE=2 FACE="Arial"><%@ taglib prefix="cms" uri="<A HREF="http://www.opencms.org/taglib/cms">http://www.opencms.org/taglib/cms</A>" %></FONT>
<BR><FONT SIZE=2 FACE="Arial"><cms:include property="template" element="head"/></FONT>
<BR><FONT SIZE=2 FACE="Arial">FOOEY!</FONT>
<BR><FONT SIZE=2 FACE="Arial"><cms:include property="template" element="foot"/></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Here is the JSP template</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><%@ page session="false" %></FONT>
<BR><FONT SIZE=2 FACE="Arial"><%@ taglib prefix="cms" uri="<A HREF="http://www.opencms.org/taglib/cms">http://www.opencms.org/taglib/cms</A>" %></FONT>
<BR><FONT SIZE=2 FACE="Arial"><!DOCTYPE html public "-//W3C/DTD HTML 4.01 Transitional//EN"></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><cms:template element="head"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <html></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <head></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <title></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <cms:property name="title" escapeHtml="true"/></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </title></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </head></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <body></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <h1></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <cms:property name="title" escapeHtml="true"/></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </h1></FONT>
<BR><FONT SIZE=2 FACE="Arial"></cms:template></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><cms:template element="body"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <cms:include element="body"/></FONT>
<BR><FONT SIZE=2 FACE="Arial"></cms:template></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><cms:template element="foot"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </body></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </html></FONT>
<BR><FONT SIZE=2 FACE="Arial"></cms:template></FONT>
</P>
<P><FONT COLOR="#808080" SIZE=2 FACE="Arial">Andy Kriger | Software</FONT> <FONT COLOR="#808080" SIZE=2 FACE="Arial">Director</FONT><FONT COLOR="#808080" SIZE=2 FACE="Arial"> | Greater Than One, Inc.</FONT>
<BR><FONT COLOR="#808080" SIZE=2 FACE="Arial">395 Hudson</FONT><FONT COLOR="#808080" SIZE=2 FACE="Arial"> Street |</FONT> <FONT COLOR="#808080" SIZE=2 FACE="Arial">5</FONT><FONT COLOR="#808080" SIZE=2 FACE="Arial">th Floor | New York, NY 100</FONT><FONT COLOR="#808080" SIZE=2 FACE="Arial">14</FONT>
<BR><FONT COLOR="#808080" SIZE=2 FACE="Arial">P: 212.252.7197 | F: 212.252.7364 | E: akriger@greaterthanone.com </FONT>
</P>
</BODY>
</HTML>