What is CAPTCHA
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.
- Register your domain with the reCAPTCHA website.
- Download the Java library from here.
- Download the Div.java and ReCaptchaField.java.
- Add the following code into your click form.
ReCaptchaField reCaptchaField = new ReCaptchaField("captcha", YOUR_CAPTCHA_PUBLIC_KEY, YOUR_CAPTCHA_PRIVATE_KEY, ReCaptchaField.THEME_CLEAN);
Div reCaptchaHolder = new Div(); reCaptchaHolder.add(reCaptchaField); form.add(reCaptchaHolder);