Gurpreet:

Don't mean to jump in if you already have found a good solution, but wouldn't it be 
simpler to just not allow the user to press the submit btton twice?  It is easy (using 
Javascript) to disable a submit button once it has already been pressed..

Regards,
Geeta

"Mainguy, Mike" wrote:

> Call saveToken() in GET (or read)
> Test isTokenValid() in the POST (or write) to see if it is a dupe (duplicate
> returns false [bad token])
>
> worse is better
>
> -----Original Message-----
> From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 19, 2003 11:19 PM
> To: Struts Users Mailing List
> Subject: Re: Tokens
>
> hi  Ramadoss
>
> Thanks for your help. But this is not i m looking for.
> I may not be able to explain my question proeprly .
> But i m looking for saveTOken() method implementation in struts which does
> not allow duplicate entry of records into the database when the user click
> on submit button twice.
>
> ----- Original Message -----
> From: "Ramadoss Chinnakuzhandai" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 19, 2003 7:56 PM
> Subject: RE: Tokens
>
> > Hi Gurpreet,
> >         If what I understand is correct from your question, you can
> > use
> split function the same way as you use String Token...following is sample
> snap shot
> >
> >   String str = "botherouioero:and:foroffo:mar:ssod:slave";
> >         String[] arr = str.split(":", 9);
> >         System.out.println("length of arr[] is:" + arr.length);
> >         for (int i = 0; i < arr.length; i++) {
> >             System.out.println("value is :" + arr[i]);
> >         }
> >         String[] ar = str.split("o", 8);
> >         System.out.println("length of arr[] is:" + ar.length);
> >         for (int i = 0; i < ar.length; i++) {
> >             System.out.println("value is :" + ar[i]);
> >         }
> > Where the number 9 and 8 denotes number of occurences you want to
> > consider
> after which it will be treated as whole single string and will be included
> into your String Array.
> >
> > Hope this help,
> >
> > -Ram
> >
> >
> >
> >
> > -----Original Message-----
> > From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, November 19, 2003 6:19 AM
> > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > Subject: Tokens
> >
> >
> > hi All
> >
> >  Can somebody explain small code snap shot of using Tokens. AS i am
> > trying to use it in one of my application. but due to some unknown
> > reason it is
> not
> > working. I may be doing something wrong.
> >
> >
> > Any help will be appreciated
> >
> >
> > Regards
> > GAry
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -----------------------------------------
> This message and its contents (to include attachments) are the property of Kmart 
> Corporation (Kmart) and may contain confidential and proprietary information. You 
> are hereby notified that any disclosure, copying, or distribution of this message, 
> or the taking of any action based on information contained herein is strictly 
> prohibited. Unauthorized use of information contained herein may subject you to 
> civil and criminal prosecution and penalties. If you are not the intended recipient, 
> you should delete this message immediately.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to