Search code examples
javacaptcha

How to add Dynamic captcha in Java


I want to add dynamic captcha on page.Whenever more than 3 request comes inspecific time from same IP address then Captcha will appear on the screen..


Solution

    • You can write a code in servlet filter to check if many requests come from a specific IP within a specific time duration. In this case, you can add some flag in the session.

    • Use this flag to check on the page if to display the captcha or not.