RE: What is token and When/Why/Where to use it?

2001-04-26 Thread Rajan Gupta

Look at the struts-example, it explains it very well.
--- "Suriyanarayanan, Senthil Kumar"
<[EMAIL PROTECTED]> wrote:
> Ted,
>   Can you please elaborate "prepares the form" and "processes the
> form". Preferably with an example or code snippet.
> 
> 
> Thanks
> Senthil Kumar.S
> 
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 7:59 PM
> To: [EMAIL PROTECTED]
> Subject: Re: What is token and When/Why/Where to use it?
> 
> 
> Mostly to keep people from pressing submit more than once, which can
> result things like duplicate sales. 
> 
> In the action that prepares the form, call saveToken(request). 
> 
> In the action the processes the form, check isTokenValid(request)). If
> it is not valid, you can send them to an error or help page. If it is
> valid, resetToken(request) and process. 
> 
> "Suriyanarayanan, Senthil Kumar" wrote:
> > 
> > Hello,
> > I would like to know what is the significant of the token in
> the
> > Action class.
> > Also I would like to know when/Why/Where to use it.
>  
>
**
> The Information transmitted herewith is sensitive information intended
> only
> for use to the individual or entity to which it is addressed. If the
> reader
> of this message is not the intended recipient, you are hereby notified
> that
> any review, retransmission, dissemination, distribution, copying or
> other
> use of, or taking of any action in reliance upon, this information is
> strictly prohibited. If you have received this communication in error,
> please contact the sender and delete the material from your computer.


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Re: What is token and When/Why/Where to use it?

2001-04-25 Thread Ted Husted


1. Setup an action to be called before the form you want to protect. 

2. Before the action returns with a forwards to the form, call
saveToken(request)

3. The form will submit back to an action, in that action call
isTokenValid(request) to see if you have a valid token. If so, call
resetToken; if not return a forward to an error page. 

See also SaveRegistrationAction in the example application.


"Suriyanarayanan, Senthil Kumar" wrote:
> 
> Ted,
> Can you please elaborate "prepares the form" and "processes the
> form". Preferably with an example or code snippet.
> 
> Thanks
> Senthil Kumar.S



RE: What is token and When/Why/Where to use it?

2001-04-25 Thread Suriyanarayanan, Senthil Kumar

Ted,
Can you please elaborate "prepares the form" and "processes the
form". Preferably with an example or code snippet.


Thanks
Senthil Kumar.S

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 7:59 PM
To: [EMAIL PROTECTED]
Subject: Re: What is token and When/Why/Where to use it?


Mostly to keep people from pressing submit more than once, which can
result things like duplicate sales. 

In the action that prepares the form, call saveToken(request). 

In the action the processes the form, check isTokenValid(request)). If
it is not valid, you can send them to an error or help page. If it is
valid, resetToken(request) and process. 

"Suriyanarayanan, Senthil Kumar" wrote:
> 
> Hello,
> I would like to know what is the significant of the token in the
> Action class.
> Also I would like to know when/Why/Where to use it.
 
**
The Information transmitted herewith is sensitive information intended only
for use to the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon, this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.



Re: What is token and When/Why/Where to use it?

2001-04-25 Thread Ted Husted

Mostly to keep people from pressing submit more than once, which can
result things like duplicate sales. 

In the action that prepares the form, call saveToken(request). 

In the action the processes the form, check isTokenValid(request)). If
it is not valid, you can send them to an error or help page. If it is
valid, resetToken(request) and process. 

"Suriyanarayanan, Senthil Kumar" wrote:
> 
> Hello,
> I would like to know what is the significant of the token in the
> Action class.
> Also I would like to know when/Why/Where to use it.



Re: What is token and When/Why/Where to use it?

2001-04-25 Thread Jonathan

Im not sure...but if you get more please pass one my way


- Original Message -
From: "Suriyanarayanan, Senthil Kumar"
<[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 25, 2001 7:00 PM
Subject: What is token and When/Why/Where to use it?


> Hello,
> I would like to know what is the significant of the token in the
> Action class.
> Also I would like to know when/Why/Where to use it.
>
> Thanks in advance,
> Senthil Kumar.S
>
> **
> The Information transmitted herewith is sensitive information intended
only
> for use to the individual or entity to which it is addressed. If the
reader
> of this message is not the intended recipient, you are hereby notified
that
> any review, retransmission, dissemination, distribution, copying or other
> use of, or taking of any action in reliance upon, this information is
> strictly prohibited. If you have received this communication in error,
> please contact the sender and delete the material from your computer.
>