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 |
Can we use string in the switch case?
What is the difference between length and size in java?
how to run ecllipse with jettyserver for windows environment using batch file
Can you inherit from an abstract class java?
What is meant by flickering?
Q) I have a ArrayList object, in that object i have added 5 integer values, 5 float values, 5 string values. Now question is how can delete particular type of data ( i.e all int values or all float values or string values) in that list object at a time?
Can a method be overloaded based on different return type but same argument type?
design an lru cache in java?
program to find 25 square = 625 here the 625 of last two digits is equal to 25, i don't know excatly what this type of number is called
What is ordered map in java?
Will the compiler creates a default constructor if I have a parameterized constructor in the class?
why do we use interface in java?