Ethical Hacking: Integrate Google CAPTCHA with Spring MVC

A CAPTCHA (acronym “Completely Automated Public Turing test to tell Computers and Humans Apart”) is a type of challenge-response test used in computing to determine whether or not the user is human. It’s a program that can generate and tests that humans can pass but current computer programs cannot. For example, humans can read distorted text or select an image of heart in between of other image but current computer programs can’t.

Google reCAPTCHA helps prevent automated abuse of your site (such as comment spam or bogus registrations) by using a CAPTCHA to ensure that only humans perform certain actions. It’s a free, secure and popular Web service used by 200,000+ websites across the world. To integrate reCAPTCHA in your website you need to Signup with your google account to generate public and private keys. This keys are later used to google to show CAPTCHA on your register website.

If you want to add Google reCAPTCHA into your website then go to http://www.google.com/recaptcha/whyrecaptcha and SignUp using your Google account and geenrate Public, Private keys used to enable CAPTCHA into your website. Now download reCaptcha4j.jar file from https://code.google.com/p/recaptcha/ and add into eclipse as a jar.

Create a home.jsp with following code…

Now create Spring controller to validate CAPTCHA string entered by User.

Now create a JSP to show the success or failure message.

The output will look similar to following….

About the Author

has written 68 posts.

I Love Coding, Analyzing, Designing and doing it the right way. I am obsessed about learn anything new daily and sharing what I have learn each Day. This Blog is journey of my Zeal, going through step by step to the mountain of desire to become prefect. Google Wanna Hire me ?

Copyright © 2017 http://www.techzoo.org. All rights reserved.
Proudly powered by WordPress. Developed by 7Tech Solutions