[opencms-dev] Erro using cms:include

Joe Desbonnet jdesbonnet at gmail.com
Wed Aug 3 19:04:10 CEST 2005


As far as I can tell, you need to specify an 'element' attribute in
addition to the file or page
attribute of the cms:include tag

eg
<cms:include page="menu.html" element="text1" editable="true"/>

Joe.

On 8/3/05, arthur costa <arthur.grupos at gmail.com> wrote:
> I have created a template using this code:
> 
> <%@ page session="false" %>
> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
> 
> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
> <head>
> 
> </head>
> 
> <cms:include page="menu.html" />
> 
> but everytime a use this as a template for a page a get this erro:
> 
> java.lang.NullPointerException
>         at org.opencms.xml.CmsXmlUtils.createXpath(CmsXmlUtils.java:143)
>         at org.opencms.xml.A_CmsXmlDocument.getLocales(A_CmsXmlDocument.java:217)
>         at org.opencms.loader.CmsXmlPageLoader.service(CmsXmlPageLoader.java:229)
>         at org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:417)
>         at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:175)
>         at org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:215)
>         at org.opencms.jsp.CmsJspTagInclude.doEndTag(CmsJspTagInclude.java:346)
>         at org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.br_com_novaeraconsultores_templates.templates.TmpltPrncNE_jsp._jspx_meth_cms_include_0(TmpltPrncNE_jsp.java:239)
>         at org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.br_com_novaeraconsultores_templates.templates.TmpltPrncNE_jsp._jspService(TmpltPrncNE_jsp.java:110)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
>         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
> ...
> 
> Does anyone had the same problem or know how to solve it?
> 
> Thanks.
> 
> Arthur Costa
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>



More information about the opencms-dev mailing list