张骞的博客
/
首页
/
个人首页
/
管理博客
/
个人相册
/
我的文章
/
登陆
/
首页
/
个人首页
/
控制面板
/
登陆
/
帮助
2006-09-11
用开源组件jcaptcha做jsp彩色验证码
2006-09-11
原文参考
这里
安装
Add jcaptcha-all.jar (provided in
bin-distribution
) and ehcache.jar (not provided see
ehcache site
) to your application class path, ie in you WEB-INF/lib folder.
实例一个jcaptcha服务,注意,必须是单例模式的
import com.octo.captcha.service.image.ImageCaptchaService;
import com.octo.captcha.service.image.DefaultManageableImageCaptchaService;
public class CaptchaServiceSingleton {
private static ImageCaptchaService instance = new DefaultManageableImageCaptchaService();
public static ImageCaptchaService getInstance(){
return instance;
}
}
注:以上是默认的一个实现,下面是其他更多的实现
SimpleListSoundCaptchaEngine //还可以用声音,真爽哦
SpellerSoundCaptchaEngine
SpellerSoundCaptchaEngine
DefaultGimpyEngineCaptcha
BaffleListGimpyEngineCaptcha
BasicListGimpyEngineCaptcha
DeformedBaffleListGimpyEngineCaptcha
DoubleRandomListGimpyEngineCaptcha
SimpleListImageCaptchaEngineCaptcha
SimpleFishEyeEngineCaptcha
详见
http://www.blogjava.net/alex/archive/2006/06/11/51976.html
zhangqian
发表于 >
2006-09-11 11:04:34
[评论 2] [浏览
0
]
文章评论
以下网友留言只代表其个人观点,不代表求学网的观点或立场
[匿名]
2007-8-27 17:59:45
erwerewr
[匿名]
2007-8-27 17:59:41
页1/1 每页10条共2条
首页
1
末页
张骞的博客
公告
这个家伙很懒,什么也没留下。
文章
全部
[34]
默认分类
[0]
forStudy
[19]
forFun
[1]
家庭教育
[14]
相册
全部
[1]
要符合规范
[1]
友情链接