You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by cacodemon79 <ca...@inwind.it> on 2008/06/02 16:38:07 UTC
JCAPTCHA
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
EhcacheManageableImageCaptchaService
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" />
</plug-in>
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: http://www.nabble.com/JCAPTCHA-tp17602865p17602865.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JCAPTCHA
Posted by Laurie Harper <la...@holoweb.net>.
Looks like the JCaptcha documentation you followed is inconsistent with
the version of JCaptcha you are using. In any case, it's a JCaptcha
issue rather than a Struts one, and you're probably better off asking on
their forms / user lists.
L.
cacodemon79 wrote:
> 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
> EhcacheManageableImageCaptchaService
>
> 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" />
> </plug-in>
>
> 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.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org