turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anmol Khanna" <an...@radiocity.com.au>
Subject using VelocityHtmlEmail outside web-app
Date Tue, 30 Apr 2002 01:56:38 GMT
Hi,=20

I am using turbine 2.2 b 1 in *standalone* mode and am having troubles =
using VelocityHTMLEmail Class.

To create a new Instance of VelocityHtmlEmail RunData is required.=20

How do I obtain RunData?

I had a look at getRunData() method in RunDataFactory.=20

I can't use this method, because, I am not developing  a web-app  and =
don't have a request and response .

Are there any code samples of using VelocityHtmlEmail outside a web app?



When I create a VelocityHtmlEmail with RunData as null    =20
// RunData data =3Dnull; VelocityHtmlEmail ve =3D new =
VelocityHtmlEmail(data);

I get a NullPointerException  as method getContext assumes RunData =
!=3Dnull

Exception in thread "main" java.lang.NullPointerException
        at =
org.apache.turbine.util.velocity.VelocityHtmlEmail.getContext(Velocit
yHtmlEmail.java:271)
        at =
org.apache.turbine.util.velocity.VelocityHtmlEmail.send(VelocityHtmlE
mail.java:179)
        at SendEmail.sendVelHTMLEmail(SendEmail.java:75)
        at SendEmail.<init>(SendEmail.java:24)
        at SendEmail.main(SendEmail.java:81)


Is it possible to use VelocityHtmlEmail outside a web app? (comments in =
the source code say that it is possible, but don't talk about  this =
problem)

Thanks
Anmol


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message