Thanks for the response James. The relevant part of the hivemodule.xml
in the version I downloaded looks like this:
<module id="tapestry.captcha" version="1.0.0">
.
.
.
<service-point id="CaptchaEngineService"
interface="org.apache.tapestry.engine.IEngineService">
<invoke-factory>
<construct
class="com.javaforge.tapestry.captcha.service.CaptchaEngineService">
<set property="mimeType"
value="${tapestry.captcha.mimeType}"/>
</construct>
</invoke-factory>
</service-point>
.
.
.
</module>
As you can see there is no LinkFactory set for the CaptchaEngineService
here. When I step through the code in the CaptchaEngineService prior to
the NPE, the LinkFactory is indeed null. Am I missing some extra
configuration or something?
Thanks for your help
Denis
James Carman wrote:
Denis,
The hivemodule.xml file for Tapestry-Captcha will take care of wiring in the
linkFactory and imageCaptchaService.
James
-----Original Message-----
From: Denis McCarthy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 04, 2006 11:08 AM
To: Tapestry users
Subject: tapestry-captcha/acegi integration
Hi,
I'm attempting to integrate James Carman's tapestry-captcha library into
a proof of concept app I'm putting together. The acegi stuff is
redirecting correctly to a very simple captcha page just containg a
reference to the captcha component from tapestry-captcha.
Here's the .page:
<page-specification class="org.apache.tapestry.html.BasePage">
<component id="captcha" type="captcha:CaptchaImage"></component>
</page-specification>
However, when the app jumps to this page, I'm getting a null pointer
exception in the getLink() method. After looking at the code in the
CaptchaEngineService class, it seems like I need to define both a
LinkFactory and an ImageCaptchaService for the component. I haven't
messed with services before, so I'd like to know how to go about
defining a linkfactory for this component?.
As I'm using Acegi, I'd like to use acegi's
CaptchaValidationProcessingFilter to process the captcha's success or
failure. This filter uses the presence of a validation parameter
(defined in the spring application context) to decide whether to
validate the request or not. Is it possible in tapestry to ensure that
the validation parameter passed back in the http request has a specific
name, so that the filter will pick it up and validate whether the
captcha was correctly entered?
If anyone needs any further info just ask
TIA
Denis Mc.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]