BotDetect Java CAPTCHA Deployment Packages

Note: The BotDetect Java Captcha library currently requires:

  • Java 5+
  • Servlet 2.3+
  • JavaServer Pages 2.0+
  • JavaServer Faces 1.2+

The BotDetect Java Captcha is distributed as .zip archive containing BotDetect jar library files and examples.

BotDetect Java CAPTCHA Download Package Contents

The packages package subfolder contains the BotDetect Java redistributable packages and their API documentation in HTML format.

The examples/traditional-api package subfolder contains code examples.

BotDetect Java CAPTCHA Library Deployment

When adding BotDetect Captcha to your JSP / Spring MVC web application, you need to place the following BotDetect jar files to your application's WEB-INF/lib folder (to assure the BotDetect Captcha library is in the application's classpath):

  • botdetect-4.0.beta3.7.jar
  • botdetect-servlet-4.0.beta3.7.jar
  • botdetect-jsp20-4.0.beta3.7.jar

When adding Captcha to your JSF web application, you need to place the following four BotDetect jar files to your application's WEB-INF/lib folder (to assure the BotDetect Captcha library is in the application's classpath):

  • botdetect-4.0.beta3.7.jar
  • botdetect-servlet-4.0.beta3.7.jar
  • botdetect-jsp20-4.0.beta3.7.jar
  • botdetect-jsf<JSF_VERSION>-4.0.beta3.7.jar

In order to share these BotDetect library packages among multiple applications within same web container (or application server's domain) you need to copy library package files to the container's (or domain's) lib folder.

Most web containers search classpath from application's WEB-INF/lib folder "upwards". Therefore, by placing different BotDetect Captcha library versions in different lib folders, you can have different applications running different versions of BotDetect Captcha library within the same web container.

BotDetect Java CAPTCHA Code Examples Deployment

The BotDetect Java Captcha library download package also contains a number of Captcha JavaServer Pages, JavaServer Faces, and Spring MVC code examples.

The BotDetect demo allows you to experiment with various BotDetect options, while the code examples contain BotDetect Java Captcha integration code for many different (real-life) usage scenarios.

You can copy .war files to your web container's autodeploy folder (e.g. /webapps folder in default Tomcat installation or /autodeploy subfolder of GlassFish's domain folder) or use container's admin console interface to deploy each example war. Normally, you should first deploy bdc4-traditional-api-captcha-index.war application which describes each example and provides links you can use to launch deployed examples.

Typically, you will only deploy the BotDetect examples on your development machines.

BotDetect Java CAPTCHA Audio Localizations Deployment

BotDetect supports easy Captcha localization, but localized Captcha audio requires language-specific pronunciation sounds distributed as .bdsp files. The pronunciation files can be downloaded from the Captcha localizations page.

Deploying these localized pronunciation files is as easy as copying the downloaded .bdsp files for the locales you want to support to the WEB-INF\BotDetectSounds subfolder of your application.

You can also use a different folder to keep .bdsp files (for example, deploy the pronunciation files once and share them between all applications running on the same server). You just have to specify the desired location in the web.xml file, and make sure it can be read by the web server worker process running your application.

Deploying BotDetect Java CAPTCHA Updates

Updated Captcha library can usually just be copied over the old one in your folders. Eventually you will have to restart your web container to apply changes.


Please Note

BotDetect Java Captcha Library v4.0.Beta3.7 is an in-progress port of BotDetect 4 Captcha, and we need you to guide our efforts towards a polished product. Please let us know if you encounter any bugs, implementation issues, or a usage scenario you would like to discuss.