Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

JCaptcha tries to strictly respect the Inversion of Control pattern, to ease creation of components for concrete applications.
On the other side the Spring Framework allows to use the power of IOC combined with XML declarations.
So that, every single component of jCaptcha can be declared in XML, and instanced through Spring.
An
application using jCaptcha should only manipulate a CaptchaService instance.

...

This component has a special section because it is the top level component, which is actually manipulated within your application. As for the engine, there is many already configured CaptchaService, but the one we need is a custom one, which takes an CaptchaEngine, as you can see, the BufferedEngineContairner, is in fact CaptchaEngine.

The arg index1 is the captcha session expering time, in seconds. Next arg especifies the maximun storage size.

solid
Code Block
xml
xml
borderStylesolid
<bean id="captchaService" class="com.octo.captcha.service.multitype.GenericManageableCaptchaService">
	<constructor-arg index="0"><ref bean="imageEngine"/></constructor-arg>
	<constructor-arg index="1"><value>180</value></constructor-arg>
	<constructor-arg index="2"><value>180000</value></constructor-arg>
</bean>
Code Block
xmlxmlborderStyle

Other links, resources:

Please refers to External resources