src/main/java/js/http/captcha/Captcha.java
@Remote
	public Challenge getChallenge(int captchaIndex) {
		if (imagesRepositoryDir == null) {
			log.debug("Simple CAPTCHA not properly initialized. Missing <captcha> section from application descriptor:\r\n" + //
					"\t<captcha>\r\n" + //
					"\t\t<property name=\"captcha.repository.path\" value=\"/path/to/captcha/images\" />\r\n" + //
					"\t\t<property name=\"captcha.set.size\" value=\"5\" />\r\n" + //
					"\t</captcha>");
			throw new BugError("Missing CAPTCHA images repository. Most probably <captcha> section is missing from application descriptor.");
		}

		Challenge challenge = new Challenge(imagesRepositoryDir, challengeSetSize);
		getChallenges().put(captchaIndex, challenge);
		return challenge;
	}
@Remote
	public Challenge getChallenge(int captchaIndex) {
		if (imagesRepositoryDir == null) {
			log.debug("Simple CAPTCHA not properly initialized. Missing <captcha> section from application descriptor:\r\n" + //
					"\t<captcha>\r\n" + //
					"\t\t<property name=\"captcha.repository.path\" value=\"/path/to/captcha/images\" />\r\n" + //
					"\t\t<property name=\"captcha.set.size\" value=\"5\" />\r\n" + //
					"\t</captcha>");
			throw new BugError("Missing CAPTCHA images repository. Most probably <captcha> section is missing from application descriptor.");
		}

		Challenge challenge = new Challenge(imagesRepositoryDir, challengeSetSize);
		getChallenges().put(captchaIndex, challenge);
		return challenge;
	}
Create a new challenge and store it on HTTP session. If HTTP session does not exist, create it. This challenge is used by
client to update user interface accordingly. It is called on initial form rendering and every time user choose to load
another challenge if current one cannot be solved.
<p>
Client is free to display multiple Simple CAPTCHA instances but all instances should have distinct index, generated in
sequence, starting from zero.

@param captchaIndex CAPTCHA instance index,
@return newly created CAPTCHA challenge.
@throws BugError if this CAPTCHA manager is not properly initialized.