You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Denis McCarthy <dm...@annadaletech.com> on 2006/10/04 17:07:45 UTC
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: tapestry-captcha/acegi integration
Posted by James Carman <ja...@carmanconsulting.com>.
Denis,
The tapestry-captcha library does work, at least in isolation. Have you
tried running with without the Acegi stuff baked in too? Can you turn up
logging to see what HiveMind is trying to wire in when it creates that
CaptchaEngineService? It will tell you what it wires and I'm pretty sure
that it'll tell you why it doesn't wire the other properties (two service
points exist that match the type, maybe).
James
> Thanks again James.
> I see what you're saying, but the fact is that I _am_ getting an NPE
> when calling a method on the LinkFactory in the CaptchaEngineService,
> and the LinkFactory within the Service is indeed null (meaning that it
> is not getting wired up, I assume). I'm sure I'm missing something in my
> app that's causing this, but I don't know what.
>
> I'm using tap 4.1. I thought that might be the problem (as
> tapestry-captcha has 4.0 as a dependency in its pom) But I get the same
> exception in CaptchaEngineService when I try it with 4.0.
>
> If anyone knows of any error that would cause hivemind not to wire up
> services properly I'd be more than grateful - I know this is something
> small
> TIA
> Denis
>
> James Carman wrote:
>> HiveMind doesn't require you to explicitly set your properties. It has
>> an
>> "autowire" feature. So, HiveMind will set those properties for you just
>> becuase it has service points defined which implement those interfaces.
>>
>> Tapestry-Acegi is not very well documented currently, but it's not
>> really
>> rocket science. All I did was set up the servlet filters as HiveMind
>> services and create a mechanism where you can supply servlet filters as
>> web request servicer filters (it wraps them and plugs them into the
>> pipeline). I didn't want to rewrite all of the servlet filters that
>> Acegi
>> is based upon, so I came up with the bridging idea and it seems to work
>> out well. I plan on doing more work, like setting up form-based
>> authentication and giving examples of all of the setup options.
>>
>>
>>> where did you find any documentation on tapestry-acegi ? I tried using
>>> it
>>> breifly, but gave up as I couldn't find the source or any
>>> documentation.
>>>
>>> On 10/5/06, Denis McCarthy <dm...@annadaletech.com> wrote:
>>>> 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:dmccarthy@annadaletech.com]
>>>>> 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: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>> --
>>> Ed Ross
>>> edross15057@gmail.com
>>>
>>
>>
>> James Carman, President
>> Carman Consulting, Inc.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
James Carman, President
Carman Consulting, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: tapestry-captcha/acegi integration
Posted by Denis McCarthy <dm...@annadaletech.com>.
Thanks again James.
I see what you're saying, but the fact is that I _am_ getting an NPE
when calling a method on the LinkFactory in the CaptchaEngineService,
and the LinkFactory within the Service is indeed null (meaning that it
is not getting wired up, I assume). I'm sure I'm missing something in my
app that's causing this, but I don't know what.
I'm using tap 4.1. I thought that might be the problem (as
tapestry-captcha has 4.0 as a dependency in its pom) But I get the same
exception in CaptchaEngineService when I try it with 4.0.
If anyone knows of any error that would cause hivemind not to wire up
services properly I'd be more than grateful - I know this is something small
TIA
Denis
James Carman wrote:
> HiveMind doesn't require you to explicitly set your properties. It has an
> "autowire" feature. So, HiveMind will set those properties for you just
> becuase it has service points defined which implement those interfaces.
>
> Tapestry-Acegi is not very well documented currently, but it's not really
> rocket science. All I did was set up the servlet filters as HiveMind
> services and create a mechanism where you can supply servlet filters as
> web request servicer filters (it wraps them and plugs them into the
> pipeline). I didn't want to rewrite all of the servlet filters that Acegi
> is based upon, so I came up with the bridging idea and it seems to work
> out well. I plan on doing more work, like setting up form-based
> authentication and giving examples of all of the setup options.
>
>
>> where did you find any documentation on tapestry-acegi ? I tried using it
>> breifly, but gave up as I couldn't find the source or any documentation.
>>
>> On 10/5/06, Denis McCarthy <dm...@annadaletech.com> wrote:
>>> 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:dmccarthy@annadaletech.com]
>>>> 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: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>> --
>> Ed Ross
>> edross15057@gmail.com
>>
>
>
> James Carman, President
> Carman Consulting, Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: tapestry-captcha/acegi integration
Posted by James Carman <ja...@carmanconsulting.com>.
HiveMind doesn't require you to explicitly set your properties. It has an
"autowire" feature. So, HiveMind will set those properties for you just
becuase it has service points defined which implement those interfaces.
Tapestry-Acegi is not very well documented currently, but it's not really
rocket science. All I did was set up the servlet filters as HiveMind
services and create a mechanism where you can supply servlet filters as
web request servicer filters (it wraps them and plugs them into the
pipeline). I didn't want to rewrite all of the servlet filters that Acegi
is based upon, so I came up with the bridging idea and it seems to work
out well. I plan on doing more work, like setting up form-based
authentication and giving examples of all of the setup options.
> where did you find any documentation on tapestry-acegi ? I tried using it
> breifly, but gave up as I couldn't find the source or any documentation.
>
> On 10/5/06, Denis McCarthy <dm...@annadaletech.com> wrote:
>>
>> 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:dmccarthy@annadaletech.com]
>> > 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: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> Ed Ross
> edross15057@gmail.com
>
James Carman, President
Carman Consulting, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: tapestry-captcha/acegi integration
Posted by Ed Ross <ed...@gmail.com>.
where did you find any documentation on tapestry-acegi ? I tried using it
breifly, but gave up as I couldn't find the source or any documentation.
On 10/5/06, Denis McCarthy <dm...@annadaletech.com> wrote:
>
> 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:dmccarthy@annadaletech.com]
> > 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: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Ed Ross
edross15057@gmail.com
Re: tapestry-captcha/acegi integration
Posted by Denis McCarthy <dm...@annadaletech.com>.
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:dmccarthy@annadaletech.com]
> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: tapestry-captcha/acegi integration
Posted by James Carman <ja...@carmanconsulting.com>.
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:dmccarthy@annadaletech.com]
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org