Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A CAPTCHA is a program that protects websites against bots by generating and grading tests that humans can pass but current computer programs cannot. For example, humans can read distorted text as the one shown below, but current computer programs can't:

What is reCAPTCHA

reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers and old time radio shows. For more information see the reCAPTCHA website.

Here is a sample of a reCAPTCHA image on a website.

Image Added

Steps

  1. Register your domain with the reCAPTCHA website.
  2. Download the Java library from here.
  3. Download the attachedthe Div.java and ReCaptchaField.java.
  4. Add the following code into your click form.
Code Block

ReCaptchaField  reCaptchaField = new ReCaptchaField("captcha", 
                                                    YOUR_CAPTCHA_PUBLIC_KEY,
                                                    YOUR_CAPTCHA_PRIVATE_KEY, 
                                                    ReCaptchaField.THEME_CLEAN);
Code Block

Div reCaptchaHolder = new Div();
reCaptchaHolder.add(reCaptchaField);
form.add(reCaptchaHolder);