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

What is return code?

0 Answers  


where singleton classes are used in j2ee web application.can we use it for connection pooling.

1 Answers  


What are the 7 types of characters?

0 Answers  


Why volatile is used in java?

0 Answers  


what is wrapper class and its uses?

2 Answers  






JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isThreadSafe="false". Explain it? Thanks, Seenu

9 Answers   Huawei,


Can you access the private method from outside the class?

0 Answers  


strings in java are objects.why?

2 Answers  


What is a string what operation can be performed out with the help of a string?

0 Answers  


what do you meant by Platform-Independent?

6 Answers   Persistent,


What is the use of jtable?

0 Answers  


what are depricated methods in threads and explain the lifecycle methods

5 Answers   CTS,


Categories