[opencms-dev] the cms:include tag is driving me crazy

Tim Daschner timd at thedoleco.com
Sun Dec 27 23:42:53 CET 2009


PS: I have also tried with setting the property "template" of the jsp and
using that in the calling jsp as

<cms:include property="template"  element="htmlhead"/>

Thank you.


On Sun, Dec 27, 2009 at 4:37 PM, Tim Daschner <timd at thedoleco.com> wrote:

> Folks,
>
> 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:
>
> <cms:include
> file="/system/modules/genvega/templates/common_elements/common.jsp"
>  element="htmlhead"/>
>
> and here is the common.jsp
>
> <%@ page language="java" contentType="text/html; charset=UTF-8"
>     pageEncoding="UTF-8"%>
> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> *<cms:template element="htmlhead">*
> <head>
> <title><cms:property name="Title" escapeHtml="true" /></title>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> <link rel="stylesheet" type="text/css"
> href="<cms:link>../resources/css/style.css</cms:link>" />
> <link rel="stylesheet" type="text/css"
> href="<cms:link>../resources/css/style_cf.css</cms:link>" />
> <link rel="stylesheet" type="text/css"
> href="<cms:link>../resources/css/reset.css</cms:link>" />
> <link rel="stylesheet" type="text/css"
> href="<cms:link>../resources/css/prettyPhoto.css</cms:link>" media="screen"
> />
> <!-- link rel="stylesheet" type="text/css" href="css/style.css" />
> <link rel="stylesheet" type="text/css" href="css/style_cf.css" />
> <link rel="stylesheet" type="text/css" href="css/reset.css" />
> <link rel="stylesheet" type="text/css" href="css/prettyPhoto.css"
> media="screen" / -->
>
> <script type="text/javascript"
> src="<cms:link>../resources/js/jquery-1.3.2.min.js</cms:link>"></script>
> <script type="text/javascript"
> src="<cms:link>../resources/js/jquery.cycle.all.min.js</cms:link>"></script>
> <script type="text/javascript"
> src="<cms:link>../resources/js/jquery.easing.1.1.1.js</cms:link>"></script>
> <script type="text/javascript"
> src="<cms:link>../resources/js/script.js</cms:link>"></script>
> <script type="text/javascript"
> src="<cms:link>../resources/js/jquery.prettyPhoto.js</cms:link>"></script>
> <script t......
>
> continued till
> *<cms:template>*
> and further until </html>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20091227/c573e670/attachment.htm>


More information about the opencms-dev mailing list