I'm assuming you are referring to
$captcha.getServletId($request)
 I said getServletId because I couldn't think of a way a request could
 yield any other type of id, maybe you can think of one?
 I do want to use captchaId for:
 $captcha.isAnswerCorrect($servletId, $answer)
 the method would look like:
 boolean isAnswerCorrect(String captchaId, String answer)
 In most implementations the servletId would be used as the captchaId.
 On the one hand I feel like getServletId should be a function of the
 $captchaservice but as you can see here:
 If a configuration is set to ID_GENERATED=true then it uses a different method
 (this is the function called by the struts jcaptcha action)
 Caleb
 Asiri Rathnayake wrote:
  Hi Caleb,
 On Fri, Jan 15, 2010 at 4:21 PM, Caleb James DeLisle <
 calebdelisle(a)lavabit.com> wrote:
  Whoops I made a mistake in my example:
 How about:
 #set($captcha = $captchaservice.getCaptcha("defaultImageCaptcha"))
 #set($servletId = $captcha.getServletId($request))
 $captcha.isAnswerCorrect($answer)
 should be:
 $captcha.isAnswerCorrect($servletId, $answer)
 
 Why is it called servletId? shouldn't it be captchaId? Or may be I have
 misunderstood you.
  >
$captchaservice.isAnswerCorrect($sessionId, $answer)
> Yes. I believe here sessionId is generated by the captcha service for 
 each
 > captcha displayed? Or is it something else?
>
> I'm asking because recaptcha generates a unque captchaId for each 
 captcha
it
 > generates. Then you need to handover this
captchaId + user's answer to 
 the
>> server to verify the answer. 
  May be my above question got commented out on
your mail reader.
 Thanks.
 - Asiri
 _______________________________________________
 devs mailing list
 devs(a)xwiki.org
 
http://lists.xwiki.org/mailman/listinfo/devs
 
 _______________________________________________
 devs mailing list
 devs(a)xwiki.org