[jboss-user] [JBoss Seam] - Re: Seam Captcha configuration

msznapka do-not-reply at jboss.com
Wed Aug 15 08:17:34 EDT 2007


I configured captcha by myself inside CaptchaImage.java:


  |    @Create
  |    public void create()
  |    {
  |        DefaultManageableImageCaptchaService serviceTmp = new DefaultManageableImageCaptchaService();
  |        DefaultGimpyEngine engine = (DefaultGimpyEngine) serviceTmp.getEngine();
  |        
  |        CaptchaFactory[] factories = new CaptchaFactory[1];
  |        factories[0] = new GimpyFactory(
  |                new RandomWordGenerator("ABCDEFHIJKLMNOPRSTUVYZ"),
  |                new ComposedWordToImage(
  |                        new RandomFontGenerator(new Integer(20), new Integer(20)),
  |                        new FunkyBackgroundGenerator(new Integer(160), new Integer(60)),
  |                        new RandomTextPaster(new Integer(4), new Integer(4), Color.BLACK)
  |                )
  |        );
  |        engine.setFactories(factories);
  |        
  |        service = serviceTmp;
  |    }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074406#4074406

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074406



More information about the jboss-user mailing list