Versions Compared

Key

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

...

This integration module provides the shortest way to integrate JCaptcha to your web application.
This module is available since jcaptcha 2.0

This integration module provides the new default captcha configuration :
Image AddedImage AddedImage AddedImage Added

All you need to do is add the jcaptcha jar to your project, make a reference to the SimpleImageCaptchaServlet in your web.xml and then use the servlet session id to validate what the user submits on your form against the captcha service.

...

Code Block
java
java
String userCaptchaResponse = request.getParameter("jcaptcha");
boolean captchaPassed = SimpleImageCaptchaServlet.validateResponse(request, userCaptchaResponse);
if(captchaPassed){
// proceed to submit action
}else{
// return error to user
}

And that's it!

Sample Web App