I have an android application that requests a list of objects from a servlet. The first time I run the android application it works fine by sending the correct list.
But when I run the application for the second time, it returns the list that it has already sent plus the new list. I am not sure why this is causing an issue. I use the out.flush() method but still there is no use. Could someone please tell me what is wrong with this.
I guess the servlet has to be reset after every use so that all its variables are cleared, reset to null and then used.