[opencms-dev] Displaying the content

Jonathan Woods jonathan.woods at scintillance.com
Wed Sep 27 11:21:20 CEST 2006


Don't know if this helps, but from a quick scan through the source code,
this seems to imply that the request parameter named
I_CmsResourceLoader.PARAMETER_ELEMENT (i.e. "__element") is not defined, and
hence the creation of the corresponding Xpath expression fails.
 
Jon

  _____  

From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Jordi Marquès
Sent: 27 September 2006 10:11
To: The OpenCms mailing list
Subject: [opencms-dev] Displaying the content



Hi all,

I am trying to display the content of a News item in a JSP in the same
directory, but keep getting an NPE. The code below shows a minimal
example:

------- Display_News.jsp -----------------
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms"
<http://www.opencms.org/taglib/cms%22>  %>
<% org.opencms.jsp.CmsJspActionElement cms = new
org.opencms.jsp.CmsJspActionElement(pageContext, request, response); %>

<cms:include page="New_News.html" />
-------------------------------------------

The exception begins:

java.lang.NullPointerException
at org.opencms.xml.CmsXmlUtils.createXpath(CmsXmlUtils.java:144)
at
org.opencms.xml.A_CmsXmlDocument.getLocales(A_CmsXmlDocument.java:255)
at
org.opencms.loader.A_CmsXmlDocumentLoader.dumpAsString(A_CmsXmlDocumentL
oader.java:118)
at
org.opencms.loader.A_CmsXmlDocumentLoader.service(A_CmsXmlDocumentLoader
.java:238)


Does anyone have any ideas on what I am doing wrong here? (What I am
actually trying to do is iterate over the news items in the folder and
display the teaser text. The iteration is working fine, but I cannot get
the content of the news item itself...)

Thanks, 

--
Jordi Marquès Ferré

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060927/341ed0ea/attachment.htm>


More information about the opencms-dev mailing list