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



I have one Shopping cart application, i that i have selected some items, while clicking submit but..

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

I have one Shopping cart application, i that i have selected some items, while clicking submit but..

Answer / balagangadhar

Using token mechanism in struts we can duplicate requests in
web applications.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Core Java Interview Questions

Can list be final in java?

0 Answers  


Explain static nested classes ?

0 Answers  


What is core java called?

0 Answers  


How do listeners work?

0 Answers  


Why can't you declare a class as protected?

0 Answers  






what is check p object in java

1 Answers   TCS,


What is string substring?

0 Answers  


Is hashmap thread safe?

0 Answers  


Does java support multiple inheritance or not?

0 Answers   Hexaware,


Explain the difference between hashmap and hashtable in java?

0 Answers  


How will you convert an ArrayList to Arrays?

4 Answers   KPIT,


How to convert string to byte array and vice versa?

0 Answers  


Categories