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 the difference between throw and throws?
what is custom tags with example?
What is class array in java?
What is meant by class and object in java?
What is string array?
What is the Difference between Final Class && Abstract Class?
When to use runnable interface vs thread class in java?
How to display all the prime numbers between 1 and n (n is the number, get the input from user)
What is a local, member and a class variable?
What is formatted output?
What does super keyword do?
what is check p object in java