After looking at the source code for the T5 Kaptcha implementation, I found
a T5-friendlier way of configuring the Kaptcha.
Just add the following lines to the services.AppModule class and play with
the values and constants:

* @Contribute(KaptchaProducer.class)*
* public static void configureKaptchaProducer(MappedConfiguration<String,
String> configuration) {*
* configuration.add(Constants.KAPTCHA_IMAGE_WIDTH, "200");*
* configuration.add(Constants.KAPTCHA_BACKGROUND_CLR_FROM, "255,255,255");*
* configuration.add(Constants.KAPTCHA_BACKGROUND_CLR_TO, "255,255,255");*
* }*

It is cleaner than polluting the web.xml.
Regards,
J.

2012/1/23 Thiago H. de Paula Figueiredo <thiag...@gmail.com>

> On Mon, 23 Jan 2012 15:40:40 -0200, Julien Martin <bal...@gmail.com>
> wrote:
>
>  Thiago,
>>
>> I meant are the web.xml init params the only way of specifying the config
>> params for the Kaptcha?
>>
>
> From reading the documentation, that seems to be correct.
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>

Reply via email to