You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by 32...@gmail.com on 2006/08/07 10:54:26 UTC

How does the captcha valid. in forms work?

Hello,
I know how to put in in the form and make it work, but what I do not
understand is how it works, especially whats in the sitemap

you put s.th like that in your form:
<fd:captcha id="captcha" required="true" length="5">
       <fd:datatype base="string"/>
            <fd:validation>
                <fd:captcha/>
            </fd:validation>
 </fd:captcha>

sitemap:
<map:match pattern="captcha-*.jpg">
      <map:generate type="jx" src="documents/xml/captcha-image.xml">
        <map:parameter name="capt" value="{session-attr:captcha-{1}}"/>
      </map:generate>
      <map:serialize type="svg2jpeg"/>
  </map:match>

does it mean this: <fd:captcha id="captcha" required="true" length="5">
calls that: <map:match pattern="captcha-*.jpg">
and what about this entry: value="{session-attr:captcha-{1}}" ??

A description of the whole process would be great....
Thank you
Marco

Re: AW: How does the captcha valid. in forms work?

Posted by Dennis Dam <d....@hippo.nl>.
that's how I thought it worked too (after some puzzling) .. some 
documentation would be nice and make things clearer!

Christofer Dutz wrote:
>
> Hi Marco
>
> As far as I understand it, the widget generates a string with the 
> expected value and gives this an id.
>
> This is stored in the session. When rendering the widget to html an 
> image with the name capcha-{id}.jpg is requested. Cocoon now takes 
> this id to generate the image for that particular id containing the 
> information in the session. All the Validator has to do now is to 
> compare the value entered with the one stored in the session.
>
> Hope I’m correct.
>
> Chris
>
> [ c h r i s t o f e r d u t z ]
>
> IT-Berater
>
> univativ GmbH & Co. KG
>
> Robert-Bosch-Str. 7, 64293 Darmstadt
>
> fon: 0 61 51 / 66 717 - 21
>
> fax: 0 61 51 / 66 717 - 29
>
> email: christofer.dutz@univativ.de
>
> http://www.univativ.de
>
> Darmstadt, Stuttgart, Karlsruhe, Düsseldorf
>
> ------------------------------------------------------------------------
>
> *Von:* kochch@gmail.com [mailto:kochch@gmail.com] *Im Auftrag von 
> *321los@gmail.com
> *Gesendet:* Montag, 7. August 2006 10:54
> *An:* users@cocoon.apache.org
> *Betreff:* How does the captcha valid. in forms work?
>
> Hello,
> I know how to put in in the form and make it work, but what I do not 
> understand is how it works, especially whats in the sitemap
>
> you put s.th <http://s.th> like that in your form:
> <fd:captcha id="captcha" required="true" length="5">
> <fd:datatype base="string"/>
> <fd:validation>
> <fd:captcha/>
> </fd:validation>
> </fd:captcha>
>
> sitemap:
> <map:match pattern="captcha-*.jpg">
> <map:generate type="jx" src="documents/xml/captcha-image.xml">
> <map:parameter name="capt" value="{session-attr:captcha-{1}}"/>
> </map:generate>
> <map:serialize type="svg2jpeg"/>
> </map:match>
>
> does it mean this: <fd:captcha id="captcha" required="true" 
> length="5"> calls that: <map:match pattern="captcha-*.jpg">
> and what about this entry: value="{session-attr:captcha-{1}}" ??
>
> A description of the whole process would be great....
> Thank you
> Marco
>


-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
d.dam@hippo.nl / http://www.hippo.nl
-------------------------------------------------------------- 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


AW: How does the captcha valid. in forms work?

Posted by Christofer Dutz <du...@c-ware.de>.
Hi Marco

 

As far as I understand it, the widget generates a string with the expected
value and gives this an id.

This is stored in the session. When rendering the widget to html an image
with the name capcha-{id}.jpg is requested. Cocoon now takes this id to
generate the image for that particular id containing the information in the
session. All the Validator has to do now is to compare the value entered
with the one stored in the session.

 

Hope I’m correct.

 

Chris

 

[ c h r i s t o f e r   d u t z ]

 

IT-Berater

univativ GmbH & Co. KG

Robert-Bosch-Str. 7, 64293 Darmstadt

 

fon: 0 61 51 / 66 717 - 21

fax: 0 61 51 / 66 717 - 29

email: christofer.dutz@univativ.de

http://www.univativ.de

 

Darmstadt, Stuttgart, Karlsruhe, Düsseldorf

 

 

  _____  

Von: kochch@gmail.com [mailto:kochch@gmail.com] Im Auftrag von
321los@gmail.com
Gesendet: Montag, 7. August 2006 10:54
An: users@cocoon.apache.org
Betreff: How does the captcha valid. in forms work?

 

Hello,
I know how to put in in the form and make it work, but what I do not
understand is how it works, especially whats in the sitemap

you put s.th like that in your form:
<fd:captcha id="captcha" required="true" length="5"> 
       <fd:datatype base="string"/>
            <fd:validation>
                <fd:captcha/>
            </fd:validation>
 </fd:captcha>

sitemap:
<map:match pattern="captcha-*.jpg"> 
      <map:generate type="jx" src="documents/xml/captcha-image.xml">
        <map:parameter name="capt" value="{session-attr:captcha-{1}}"/>
      </map:generate> 
      <map:serialize type="svg2jpeg"/>
  </map:match>

does it mean this: <fd:captcha id="captcha" required="true" length="5">
calls that: <map:match pattern="captcha-*.jpg"> 
and what about this entry: value="{session-attr:captcha-{1}}" ??

A description of the whole process would be great....
Thank you
Marco