which is idempotent,,,doGet() or doPost()

will u pls confirm......which method is idempotent ( doGet() 0r doget())explain with shoppingcart exampleand why we use Http protocols in servlets rather than other........is there any additional advantageous for HTtp protocols over others
[260 byte] By [fantasya] at [2007-10-2 12:08:31]
# 1
> idempotent what?> and why we use Http protocols in servlets rather than > other........is there any additional advantageous for HTtp > protocols over othershttp is for websites. other protocols are for other things.
fantasya at 2007-7-13 8:44:36 > top of Java-index,Java Essentials,Java Programming...
# 2
> > idempotent > > what?Well I learnt something new today ... http://dictionary.reference.com/search?q=idempotentStill don't really see how it applies here ...
fantasya at 2007-7-13 8:44:36 > top of Java-index,Java Essentials,Java Programming...
# 3

here take a shopping cart exp.......

in this let us assume that u have requested a book and because of slow processing if u refreshed once again...........

if we use one methods(doGet() or doPost())-in one it willl provide bill for 2 books in one case

in another case it will only for 1 book

let me have a cla\ear idea

thank y ou

fantasya at 2007-7-13 8:44:36 > top of Java-index,Java Essentials,Java Programming...
# 4
Neither doGet nor doPost is inherently idempotent. The spec requires that the implementation of doGet be idempotent, but just submitting with GET or calling doGet doesn't automatically make it so. You have to write your doGet method such that that's the case.
jverda at 2007-7-13 8:44:36 > top of Java-index,Java Essentials,Java Programming...
# 5
Ya I agree with JVERDGet is supposed to be idempotent while Post is not.So the implementation of doGet should be done in such a way that it can be called again and again without any dangerous effect to the application
pinjua at 2007-7-13 8:44:36 > top of Java-index,Java Essentials,Java Programming...