Category Archives: JCaptcha4Struts2

JCaptcha4Struts2 Version 2.0.1 Released !

JCaptcha4Struts2 is a Struts 2 Plugin which allows to add Captcha support to your Struts 2 Applications with a single JSP tag, and slight configuration in your struts.xml. It uses the powerful JCaptcha engine internally to generate the captcha.

Project is hosted at Google Code (http://code.google.com/p/jcaptcha4struts2/) and released under Apache License 2.0.

Version 1.0 of the plugin was downloaded ~2500 times.
Continue reading

Ohloh !

I recently stumbled upon Ohloh, and I have to say, it’s a fascinating website, with lots of cool features and gadgets. I registered my two little open source projects there, and I got following statistics.

JCaptcha4Struts2

Across all Java projects on Ohloh, 34% of all source code lines are comments. For jcaptcha4struts2, this figure is 58%.

This very impressive number of comments puts jcaptcha4struts2 among the best 10% of all Java projects on Ohloh.

A high number of comments might indicate that the code is well-documented and organized, and could be a sign of a helpful and disciplined development team.

Nebula Framework

Across all Java projects on Ohloh, 34% of all source code lines are comments. For nebulaframework, this figure is 47%.

This high number of comments puts nebulaframework among the highest one-third of all Java projects on Ohloh.

A high number of comments might indicate that the code is well-documented and organized, and could be a sign of a helpful and disciplined development team.

And look at the cost. That’s about 18 million in Sri Lankan Rupees ! Oh my.

JCaptcha4Struts2

While I was working on a Struts 2 Project, I wanted to add captcha support to some of my forms. For those who are not familiar with the name, captcha is that small image with letters in forms asking you to type whatever in there (CAPTHCA = Completely Automated Public Test to tell Computers and Humans Apart). So, my first stop was to check the Struts 2 Plugin Repository to find out whether there’s a plugin which can do that. But I had no luck there, and I thought of Googling for some library which could help me with this. I found JCaptcha, an interesting library with lots of features and customizability.

Looking through the product, I found several guides which shows integration of JCaptcha with classic JSP/Servlets, Struts etc, but nothing for Struts 2. When I closely followed the JSP/Servlet example, it was obvious that writing a Struts 2 application to do the same is “no big deal”, but there are some things to be done. So I thought how cool if there was a plugin to do this.

Finally, since I had this idea of trying to develop a plugin for Struts 2 for sometime, I thought of giving it a try, and JCaptcha4Struts2 was born. JCaptcha4Struts2 allows smooth integration of JCaptcha and Struts2, and provides a JSP tag library which developers can use to put a JCaptcha image validation component to their forms with through a single JSP Tag. It supports transparent captcha validation through a base action class or alternatively, through intercepters. If the interceptors are used, it requires slight configuration in the struts.xml file.

The plugin binaries, source, javadoc and a sample web app is available for download in the project site  at http://code.google.com/p/jcaptcha4struts2/. Currently the project supports only image captcha generation (where as JCaptcha supports various engines, and captcha types such as sound captcha). Also no i18n support is available yet. I am still working on those areas of the plugin in my free time.