PS: I have also tried with setting the property "template" of the jsp and using that in the calling jsp as<div><br><cms:include property="template"  element="htmlhead"/></div><div><br></div>
<div>Thank you.</div><div><br></div><div><br><div class="gmail_quote">On Sun, Dec 27, 2009 at 4:37 PM, Tim Daschner <span dir="ltr"><<a href="mailto:timd@thedoleco.com">timd@thedoleco.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Folks,<div><br></div><div>I have consulted the wiki, Liliedahl book and the javadocs etc. I am trying to do the very simple task of including an element of another file into my jsp using the cms:include tag. For whatever reason, opencms keeps including the entire target file instead of the named element. I must have a mistake somewhere but i cant seem to find it. How does one do this? Here is what I have in my calling JSP:</div>

<div><div><br></div><div><cms:include file="/system/modules/genvega/templates/common_elements/common.jsp"  element="htmlhead"/></div><div><br></div><div>and here is the common.jsp</div><div><br>
</div>
<div><div><%@ page language="java" contentType="text/html; charset=UTF-8"</div><div>    pageEncoding="UTF-8"%></div><div><%@ taglib prefix="cms" uri="<a href="http://www.opencms.org/taglib/cms" target="_blank">http://www.opencms.org/taglib/cms</a>" %></div>

<div><br></div><div><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"></div>

<div><html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>"></div><div><b><cms:template element="htmlhead"></b></div><div><head> </div>
<div><title><cms:property name="Title" escapeHtml="true" /></title></div>
<div><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></div><div><link rel="stylesheet" type="text/css" href="<cms:link>../resources/css/style.css</cms:link>" /></div>

<div><link rel="stylesheet" type="text/css" href="<cms:link>../resources/css/style_cf.css</cms:link>" /></div><div><link rel="stylesheet" type="text/css" href="<cms:link>../resources/css/reset.css</cms:link>" /></div>

<div><link rel="stylesheet" type="text/css" href="<cms:link>../resources/css/prettyPhoto.css</cms:link>" media="screen" /></div><div><!-- link rel="stylesheet" type="text/css" href="css/style.css" /></div>

<div><link rel="stylesheet" type="text/css" href="css/style_cf.css" /></div><div><link rel="stylesheet" type="text/css" href="css/reset.css" /></div>

<div><link rel="stylesheet" type="text/css" href="css/prettyPhoto.css" media="screen" / --></div><div><br></div><div><script type="text/javascript" src="<cms:link>../resources/js/jquery-1.3.2.min.js</cms:link>"></script></div>

<div><script type="text/javascript" src="<cms:link>../resources/js/jquery.cycle.all.min.js</cms:link>"></script></div><div><script type="text/javascript" src="<cms:link>../resources/js/jquery.easing.1.1.1.js</cms:link>"></script></div>

<div><script type="text/javascript" src="<cms:link>../resources/js/script.js</cms:link>"></script></div><div><script type="text/javascript" src="<cms:link>../resources/js/jquery.prettyPhoto.js</cms:link>"></script></div>

<div><script t......</div><div><br></div><div>continued till </div><div><b><cms:template></b></div><div>and further until </html></div></div><div><br></div></div>
</blockquote></div><br></div>