<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000" style="">
enrico,<br>
<br>
I've just reported the bug:<br>
<a class="moz-txt-link-freetext" href="http://www.opencms.org/bugzilla/show_bug.cgi?id=912">http://www.opencms.org/bugzilla/show_bug.cgi?id=912</a><br>
<br>
daniel<br>
<br>
<br>
Enrico Ballarin Dolfin schrieb:<br>
<blockquote cite="mid200507191403.03537.eballarin@innopark.ch"
 type="cite">
  <pre wrap="">Hi Daniel,

I'm having the same problem with 'Recommend page' and with 'Send email to the 
editor'.

If I follow your suggestion, I can send the mails, but the information needed 
in the confirmation form is missing.

We have to find out why this nullPointerException is generated...

If I look at the java source I can find at line 161 of 
CmsTemplateFormRecommend.sendMail following line:

theMail.setTextMsg(getContent("recommend_mail.html", "text", 
getRequestContext().getLocale()));

The problem seems to be in the getRequestContext() method.

Strange, because the line before (line 160) has a similar command that seems 
to have been successfully executed:

theMail.setHtmlMsg(getContent("recommend_mail.html", "html", 
getRequestContext().getLocale()));

Any idea?

Thank
Enrico

Am Montag, 11. Juli 2005 10:57 schrieb Daniel Wiesner:
  </pre>
  <blockquote type="cite">
    <pre wrap="">hello,

I found the solution:

in /system/modules/de.smg.homepage.templateone/pages/recommend.html I
removed the attribute scope="request"



<jsp:useBean id="cms"
class="de.smg.homepage.templateoneCmsTemplateFormRecommend"
scope="request"> <jsp:setProperty name="cms" property="*"/>
</jsp:useBean>



<jsp:useBean id="cms"
class="de.smg.homepage.templateoneCmsTemplateFormRecommend" >
    <jsp:setProperty name="cms" property="*"/>
</jsp:useBean>

now it works as it should.

Daniel

Wiesner, Daniel schrieb:
    </pre>
    <blockquote type="cite">
      <pre wrap="">The recomend page feature doesn't work in the demo version og osms 6.0
final. Has anyone get got it working?

java.lang.NullPointerException
        at org.opencms.jsp.CmsJspBean.getRequestContext(CmsJspBean.java:144)
        at
org.opencms.frontend.templateone.CmsTemplateFormRecommend.sendMail(CmsTemp
la teFormRecommend.java:161)
        at
org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_frontend
_t
emplateone.pages.recommend_html_jsp._jspService(org.apache.jsp.WEB_002dIN
F.j
sp.offline.system.modules.org_opencms_frontend_templateone.pages.recommen
d_h tml_jsp:58)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)

regards daniel


_______________________________________________
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
<a class="moz-txt-link-freetext" href="http://mail.opencms.org/mailman/listinfo/opencms-dev">http://mail.opencms.org/mailman/listinfo/opencms-dev</a>
      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
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
<a class="moz-txt-link-freetext" href="http://mail.opencms.org/mailman/listinfo/opencms-dev">http://mail.opencms.org/mailman/listinfo/opencms-dev</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
<br>
</body>
</html>