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]

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
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.