Kaptcha : 比jCaptcha还简单的Java验证码组件
jCaptcha是很多Java开发者使用的验证码组件,但是默认的配置相对有点恶心,而且使用也不够精简;于是有人开发了一个simplecaptcha,但是据说BUG很多。这里推荐一个非常简单的验证码组件:Kaptcha 。
使用方法:
- 到http://code.google.com/p/kaptcha/ 下载jar文件到 WEB-INF/lib目录下
- 在web.xml中配置servlet:
<servlet> <servlet-name>Kaptcha</servlet-name> <servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Kaptcha</servlet-name> <url-pattern>/kaptcha.jpg</url-pattern> </servlet-mapping>
- html中添加代码:
<img src="kaptcha.jpg" />
- Java中获取真实的验证码:
String kaptchaExpected = (String)request.getSession() .getAttribute(com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY);
原创文章如转载,请注明:转载自CODIGG [ http://www.codigg.com/ ]
本文链接地址:http://www.codigg.com/2009/08/kaptcha-jcaptcha-java/


六月 5th, 2011 at 09:55
I definitely enjoy every little bit of it and I have bookmarked your blog.
[回复]
六月 20th, 2011 at 19:10
Fantastic beat ! I would like to apprentice while you amend your site, how could i subscribe for a blog site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast offered bright clear idea
[回复]
一月 15th, 2012 at 01:44
I got what you will, thanks for putting up. Woh I am willing to label this website through google. Thanks For Share Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG.
[回复]
一月 15th, 2012 at 02:05
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this web site by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my problem. You’re wonderful! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Veronica
[回复]
一月 15th, 2012 at 13:50
Hey There. I found your blog using msn. This is a really well written article. I will make sure to bookmark it and return to read more of Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG . Thanks for the post. I will definitely comeback.
[回复]
一月 16th, 2012 at 23:02
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was suggested this web site by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my problem. You’re amazing! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG Best Regards Lisa Lawrence
[回复]
一月 17th, 2012 at 14:07
Hardly ever do I encounter a blog that’s both educated and entertaining, and let me inform you, you may have hit the nail on the head. Your idea is outstanding; the problem is something that not enough people are talking intelligently about. I’m very comfortable that I stumbled across this in my search for something regarding this.
[回复]
一月 18th, 2012 at 14:22
After I originally commented I clicked the -Notify me when new feedback are added- checkbox and now each time a remark is added I get four emails with the identical comment. Is there any approach you may remove me from that service? Thanks!
[回复]
一月 18th, 2012 at 14:34
Excellent goods from you, man. Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I’ve understand your stuff previous to and you are just too excellent. I actually like what you have acquired here, certainly like what you are saying and the way in which you say it. You make it entertaining and you still care for to keep it smart. I can’t wait to read far more from you. This is actually a great Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG informations.
[回复]
一月 19th, 2012 at 03:31
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You are amazing! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Veronica
[回复]
一月 19th, 2012 at 05:14
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this website by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my difficulty. You are incredible! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Yoder
[回复]
一月 19th, 2012 at 06:01
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this web site by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You are amazing! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards SchaadAndy
[回复]
一月 19th, 2012 at 13:24
Hello There. I found your blog using msn. This is a very well written article. I’ll make sure to bookmark it and come back to read more of Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG . Thanks for the post. I will definitely return.
[回复]
一月 19th, 2012 at 22:34
Great goods from you, man. Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I have understand your stuff previous to and you’re just too fantastic. I really like what you’ve acquired here, certainly like what you’re stating and the way in which you say it. You make it enjoyable and you still take care of to keep it wise. I can’t wait to read much more from you. This is really a wonderful Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG informations.
[回复]
一月 20th, 2012 at 02:33
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was suggested this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my trouble. You are incredible! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Agata
[回复]
一月 20th, 2012 at 22:33
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this web site by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my trouble. You’re incredible! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Veronica
[回复]
一月 20th, 2012 at 22:34
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this web site by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my difficulty. You’re amazing! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Rolf
[回复]
一月 21st, 2012 at 00:10
Love your blog!
[回复]
一月 22nd, 2012 at 00:12
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this web site by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my difficulty. You’re wonderful! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Craig
[回复]
一月 22nd, 2012 at 20:27
I got what you plan, thanks for swing up. Woh I am pleased to encounter this website through google. Thanks For Share Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG.
[回复]
一月 23rd, 2012 at 00:12
Couldn’t have said it better myself.
[回复]
一月 25th, 2012 at 07:26
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this web site by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my difficulty. You’re amazing! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG Best Regards Shane Cassetta
[回复]
一月 27th, 2012 at 15:43
I got what you signify, thanks for swing up. Woh I am cheerful to learn this website through google. Thanks For Share Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG.
[回复]
一月 27th, 2012 at 21:39
One of my favorite posts.
[回复]
一月 28th, 2012 at 01:27
I wish to express appreciation to the writer for this wonderful post.
[回复]
一月 28th, 2012 at 13:52
I got what you intend, thanks for swing up. Woh I am cheerful to exploit this website finished google. Thanks For Share Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG.
[回复]
一月 29th, 2012 at 03:09
Fantastic goods from you, man. Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I have understand your stuff previous to and you’re just too great. I actually like what you’ve acquired here, really like what you’re saying and the way in which you say it. You make it enjoyable and you still care for to keep it smart. I cant wait to read far more from you. This is actually a wonderful Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG informations.
[回复]
一月 29th, 2012 at 07:54
Not often do I encounter a blog that’s both educated and entertaining, and let me tell you, you’ve hit the nail on the head. Your idea is excellent; the difficulty is something that not enough people are talking intelligently about. I’m very pleased that I stumbled throughout this in my search for something regarding this.
[回复]
一月 29th, 2012 at 08:01
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this blog by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my problem. You are incredible! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG Best Regards Lawrence Agata
[回复]
一月 29th, 2012 at 08:52
Hey There. I found your blog using msn. This is a very well written article. I’ll make sure to bookmark it and come back to read more of Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG . Thanks for the post. I will definitely return.
[回复]
一月 30th, 2012 at 01:36
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this web site by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You’re wonderful! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG Best Regards Cassetta Andy
[回复]
一月 30th, 2012 at 03:35
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was suggested this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my difficulty. You are incredible! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Agata
[回复]
一月 30th, 2012 at 22:53
Hey There. I found your blog using msn. This is an extremely well written article. I will make sure to bookmark it and return to read more of your useful information. Thanks for the post. I will certainly return.
[回复]
一月 31st, 2012 at 00:48
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this web site by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my difficulty. You are wonderful! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Cindy
[回复]
一月 31st, 2012 at 00:56
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was suggested this website by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my trouble. You are incredible! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGGBest Regards Craig
[回复]
一月 31st, 2012 at 05:58
Hello There. I found your blog using msn. This is a really well written article. I will be sure to bookmark it and return to read more of Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG . Thanks for the post. I’ll certainly comeback.
[回复]
一月 31st, 2012 at 09:03
I just want to say I am beginner to blogging and site-building and absolutely enjoyed this page. More than likely I’m planning to bookmark your blog post . You actually come with wonderful articles. With thanks for sharing your blog.
[回复]
一月 31st, 2012 at 10:02
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was suggested this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You’re amazing! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG Best Regards Nick Craig
[回复]
一月 31st, 2012 at 11:33
I got what you convey, thanks for swing up. Woh I am cheerful to mature this website finished google. Thanks For Share Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG.
[回复]
一月 31st, 2012 at 12:22
I got what you designate, thanks for putting up. Woh I am pleased to undergo this website through google. Thanks For Share Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG.
[回复]
二月 1st, 2012 at 06:00
Excellent goods from you, man. Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I’ve understand your stuff previous to and you are just too magnificent. I actually like what you have acquired here, really like what you are saying and the way in which you say it. You make it enjoyable and you still take care of to keep it smart. I can’t wait to read much more from you. This is actually a tremendous Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG informations.
[回复]
二月 1st, 2012 at 08:20
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this web site by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my problem. You’re incredible! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG Best Regards Cassetta Lawrence
[回复]
二月 1st, 2012 at 14:20
I got what you think, thanks for swing up. Woh I am cheerful to feat this website finished google. Thanks For Share Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG.
[回复]
二月 2nd, 2012 at 03:02
Hey There. I found your blog using msn. This is a very well written article. I will make sure to bookmark it and come back to read more of Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG . Thanks for the post. I will certainly comeback.
[回复]
二月 2nd, 2012 at 03:35
Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I was recommended this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my difficulty. You’re amazing! Thanks! your article about Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG Best Regards Andy Yoder
[回复]
二月 2nd, 2012 at 08:44
Magnificent goods from you, man. Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG I’ve understand your stuff previous to and you are just too magnificent. I actually like what you’ve acquired here, certainly like what you’re saying and the way in which you say it. You make it entertaining and you still care for to keep it sensible. I can not wait to read far more from you. This is actually a tremendous Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG informations.
[回复]
二月 2nd, 2012 at 12:33
Great stuff.I’d like to suggest taking a look at things like sausages. What do you think?
[回复]
二月 2nd, 2012 at 21:13
This is the best web blog I have read.
[回复]
二月 3rd, 2012 at 01:25
I got what you plan, thanks for putting up. Woh I am pleased to happen this website through google. Thanks For Share Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG.
[回复]
二月 3rd, 2012 at 03:01
Great blog. make party with our girls and rejoice with them on hot nights. they are hot and look forward to you
[回复]
二月 3rd, 2012 at 04:12
Hi dee hi vso convertxtodvd keygen beneficial content article vso convertxtodvd freeware for Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG
[回复]
二月 3rd, 2012 at 14:43
I got what you impart, thanks for swing up. Woh I am happy to hit this website through google. Thanks For Share Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG.
[回复]
二月 5th, 2012 at 07:28
Hey There. I found your blog using msn. This is a very well written article. I will be sure to bookmark it and come back to read more of Kaptcha : 比jCaptcha还简å•çš„Java验è¯ç 组件 – CODIGG . Thanks for the post. I’ll definitely return.
[回复]