struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cacodemon79 <>
Date Mon, 02 Jun 2008 14:38:07 GMT

Hi, i'm using jcaptcha with Struts 1.3.
I already configured my web application following the suggestions present at
the JCAPTCHA homepage and all works.

Now, I'd like to customize the captcha: I'd like to use another engine than
the default one and try to change other options (size, colour, ...).

I tried to follow the suggestion present at the JCAPTCHA homepage:

Basically follow these steps to use another engine in struts:

1) create a new service class like this:

package mypackage;
import com.octo.captcha.engine.image.gimpy.SimpleListImageCaptchaEngine;

import com.octo.captcha.service.image.EhcacheManageableImageCaptchaService;

import com.octo.captcha.service.image.ImageCaptchaService;

public class MyOwnManageableImageCaptchaService extends

implements ImageCaptchaService {

	public MyOwnManageableImageCaptchaService() {
		super(new SimpleListImageCaptchaEngine(), 180, 100000);
	}}and here pass the wished engine (here SimpleListImageCaptchaEngine which
I like best) to the superclass...

2) in the strus-config.xml pass the new service class to the
CaptchaServicePlugin like this:

<plug-in className="com.octo.captcha.module.struts.CaptchaServicePlugin">
      <set-property property="serviceClass"
          value="mypackage.MyOwnManageableImageCaptchaService" />

but I got some errors/warnings:
- The type MyOwnManageableImageCaptchaService must implement the inherited
abstract method ManageableCaptchaService.setCaptchaEngine(CaptchaEngine)
- The type EhcacheManageableImageCaptchaService is deprecated
- The constructor EhcacheManageableImageCaptchaService(CaptchaEngine, int,
int) is deprecated

How can I solve this problem?

Can you help me?

Thanks a lot in advance. 
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message