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 we use string in the switch case?

0 Answers  


What is the difference between length and size in java?

0 Answers  


how to run ecllipse with jettyserver for windows environment using batch file

0 Answers  


Can you inherit from an abstract class java?

0 Answers  


What is meant by flickering?

0 Answers  


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?

3 Answers   Aricent,


Can a method be overloaded based on different return type but same argument type?

0 Answers  


design an lru cache in java?

0 Answers  


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

1 Answers   Huawei,


What is ordered map in java?

0 Answers  


Will the compiler creates a default constructor if I have a parameterized constructor in the class?

0 Answers  


why do we use interface in java?

5 Answers  


Categories