[opencms-dev] Displaying the content of a News article in a JSP.
Anthony Roy
aroy at hpi.co.uk
Mon Jul 31 17:43:17 CEST 2006
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" %>
<% 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,
Anthony Roy.
This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. This communication represents the originator's personal views and opinions, which do not necessarily reflect those of HPI Limited. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately notify postmaster at hpi.co.uk.This message has been scanned by Anti-Virus. Recipients are advised to apply their own virus checks to this message on delivery.
More information about the opencms-dev
mailing list