RE: prevent multiple form posts using only servlets

2004-12-12 Thread Dale, Matt

The way I handle this is to use javascript to disable the submit button after 
it has been clicked. This used in conjuction with the other suggestions should 
cover all possibilities

-Original Message-
From: Elihu Smails [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 09, 2004 7:13 PM
To: Tomcat User List
Subject: prevent multiple form posts using only servlets


Is there a way to prevent multiple form posts from the
same page/user/session using only servlets?  I have a
page where users can upload files, but I do not want
them to keep smashing the upload button if their files
are large, and the user becomes impatient.

thank you.



__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


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

Re: prevent multiple form posts using only servlets

2004-12-09 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Elihu Smails wrote:
| Is there a way to prevent multiple form posts from the
| same page/user/session using only servlets?  I have a
| page where users can upload files, but I do not want
| them to keep smashing the upload button if their files
| are large, and the user becomes impatient.
~  When they click the button, store a cookie, or set a value on the
page, saying that the button was pressed, then ignore anything with the
same filenames until this value is cleared.  Or, just save each filename
that is uploaded as a hidden variable in the form, and ignore duplicate
names.
- --
Love is mutual self-giving that ends in self-recovery. Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBuKR98psvJTl+fosRAu3HAJ41haEp/Oq52WfPGyn20OJq53ENiQCg2SNQ
7eBN42uboeFtE8lrbgxOYCk=
=odrz
-END PGP SIGNATURE-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: prevent multiple form posts using only servlets

2004-12-09 Thread Roberto Cosenza
Yes there is.
But the problem is not really related to a servlet just to web architecture.
A strategy is to put an object token  in the session when you show the 
form and remove it when the user clicks upload.
You will then deny uploads if you don't have  the token in the session .
Spring forms have  support for it (www.springframework.com).

/Roberto
Elihu Smails wrote:
Is there a way to prevent multiple form posts from the
same page/user/session using only servlets?  I have a
page where users can upload files, but I do not want
them to keep smashing the upload button if their files
are large, and the user becomes impatient.
thank you.
		
__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

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


--
Roberto Cosenza
Infoflex Connect AB, Sweden
Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861
--
Nordic Messaging Technologies is a trademark of Infoflex Connect.
Please visit www.nordicmessaging.se for more information about our
carrier-grade messaging products.

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


Re: prevent multiple form posts using only servlets

2004-12-09 Thread Mark
Try this one:
http://java.sun.com/developer/EJTechTips/2003/tt0114.html

look on Preventing Repeated Operations

Mark.

--- Roberto Cosenza [EMAIL PROTECTED] wrote:

 Yes there is.
 But the problem is not really related to a servlet just to web
 architecture.
 A strategy is to put an object token  in the session when you
 show the 
 form and remove it when the user clicks upload.
 You will then deny uploads if you don't have  the token in the
 session .
 Spring forms have  support for it (www.springframework.com).
 
 /Roberto
 
 Elihu Smails wrote:
 
 Is there a way to prevent multiple form posts from the
 same page/user/session using only servlets?  I have a
 page where users can upload files, but I do not want
 them to keep smashing the upload button if their files
 are large, and the user becomes impatient.
 
 thank you.
 
 
  
 __ 
 Do you Yahoo!? 
 Read only the mail you want - Yahoo! Mail SpamGuard. 
 http://promotions.yahoo.com/new_mail 
 

-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
   
 
 
 
 -- 
 Roberto Cosenza
 Infoflex Connect AB, Sweden
 Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861
 --
 Nordic Messaging Technologies is a trademark of Infoflex Connect.
 Please visit www.nordicmessaging.se for more information about our
 carrier-grade messaging products.
 
 
 

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




__ 
Do you Yahoo!? 
Dress up your holiday email, Hollywood style. Learn more. 
http://celebrity.mail.yahoo.com

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



[OT] Re: prevent multiple form posts using only servlets

2004-12-09 Thread Dennis Payne
Use javascript to disable or remove the button.

 [EMAIL PROTECTED] 12-09-2004 12:12 
Is there a way to prevent multiple form posts from the
same page/user/session using only servlets?  I have a
page where users can upload files, but I do not want
them to keep smashing the upload button if their files
are large, and the user becomes impatient.

thank you.



__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

-
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]