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 |
How many types of design patterns are there?
is it possible to instantiate the math class?
When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?
What is file class and what is its purpose?
Give a briefing on the life cycle of a thread.
Can we change the value of static variable?
What is variable explain with example?
What are the types of methodology?
In which way does a Primitive data type is passed ?
Is string a keyword in java?
What is the symbol for space?
What is the purpose of garbage collection in java, and when is it used?