<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=525281010-27092006>Jodi -</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=525281010-27092006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=525281010-27092006>The value you use for __element presumably depends on
which element it is whose content you want to display.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=525281010-27092006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=525281010-27092006>Jon</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Jordi Marquès
[mailto:jordi.marques@gmail.com] <BR><B>Sent:</B> 27 September 2006
10:50<BR><B>To:</B> Jonathan Woods<BR><B>Cc:</B> 'Jordi Marquès'; 'The OpenCms
mailing list'<BR><B>Subject:</B> RE: RE: [opencms-dev] Displaying the
content<BR></FONT><BR></DIV>
<DIV></DIV>
<P>that value I use for __element? </P>
<P> </P>
<P><cms:include page="commons/banners_head.html"><BR>
<cms:param name="__element" value="???"
/><BR></cms:include>
<BR></P>
<P>Thanks </P>
<P>--<BR>Jordi Marquès Ferré (jordi.marques@iigov.org)<BR><BR></P>
<DIV id=rep style="PADDING-LEFT: 10px">
<DIV id=repRep style="PADDING-LEFT: 10px; BORDER-LEFT: red 2px solid">
<DIV dir=ltr align=left><SPAN class=667341809-27092006><FONT face=Arial
color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=667341809-27092006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=667341809-27092006><FONT face=Arial
color=#0000ff size=2>Jon</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><STRONG>From:</STRONG> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <STRONG>On Behalf Of </STRONG>Jordi
Marquès<BR><STRONG>Sent:</STRONG> 27 September 2006
10:11<BR><STRONG>To:</STRONG> The OpenCms mailing
list<BR><STRONG>Subject:</STRONG> [opencms-dev] Displaying the
content<BR></FONT><BR></DIV>
<P>Hi all,<BR><BR>I am trying to display the content of a News item in a JSP in
the same<BR>directory, but keep getting an NPE. The code below shows a
minimal<BR>example:<BR><BR>------- Display_News.jsp -----------------<BR><%@
taglib prefix="cms" uri="<A
href="http://www.opencms.org/taglib/cms%22">http://www.opencms.org/taglib/cms"</A>
%><BR><% org.opencms.jsp.CmsJspActionElement cms =
new<BR>org.opencms.jsp.CmsJspActionElement(pageContext, request, response);
%><BR><BR><cms:include page="New_News.html"
/><BR>-------------------------------------------<BR><BR>The exception
begins:<BR><BR>java.lang.NullPointerException<BR>at
org.opencms.xml.CmsXmlUtils.createXpath(CmsXmlUtils.java:144)<BR>at<BR>org.opencms.xml.A_CmsXmlDocument.getLocales(A_CmsXmlDocument.java:255)<BR>at<BR>org.opencms.loader.A_CmsXmlDocumentLoader.dumpAsString(A_CmsXmlDocumentL<BR>oader.java:118)<BR>at<BR>org.opencms.loader.A_CmsXmlDocumentLoader.service(A_CmsXmlDocumentLoader<BR>.java:238)<BR><BR><BR>Does
anyone have any ideas on what I am doing wrong here? (What I am<BR>actually
trying to do is iterate over the news items in the folder and<BR>display the
teaser text. The iteration is working fine, but I cannot get<BR>the content of
the news item itself...)<BR><BR>Thanks, </P>
<P>--<BR>Jordi Marquès Ferré</P></DIV></DIV></BODY></HTML>