I have one Shopping cart application, i that i have
selected some items, while clicking submit button by
mistake i have clicked twice or trice, that time items are
selected twice or trice. Actually i want only one copy of
items but its selected twice or trice. So how can we avoid
this problem?
Answers were Sorted based on User's Feedback
Answer / veera
If this question in core (jave Collection): if you are
using list,it will take the duplicate values. so pass
through this list into set it will remove the duplicate
values.
if this question in J2EE servlets: use post method, it it
is not idempotent. once you add item to cart, it will give
the acknowledge before changing in server.
| Is This Answer Correct ? | 12 Yes | 2 No |
Answer / balagangadhar
Using token mechanism in struts we can duplicate requests in
web applications.
| Is This Answer Correct ? | 2 Yes | 2 No |
What is Distributed Application and what is its usage?
Why you should not use singleton?
What is the GregorianCalendar class?
Differentiate between a constructor and a method? Can we mark constructors final?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
what is the difference between applet and swing and gui application in java . What we do with the collections set and list interface
2 Answers CTS, Phoenix Technologies,
What is bool mean?
Which java version is latest?
What are the important methods of java exception class?
What are the three parts of a lambda expression?
What are the two environment variables that must be set in order to run any java programs?
What is java reflection api?