I have a servlet returning dynamically generated xml which I am requesting via AJAX using the prototype library.
However I'm having a slight issue with multiple requests to the servlet (which is expected as I'm feeding values from a database to update some fields in the html) and it is appending the xml to the previous request.
For example: First request returns <code> <root> <item1 price="12.30" name="tie" /> <item2 price="1.50" name="shoelace" /> </root>
In attempting to issolate the bug so I could post a consise sample, I discovered the problem to be an arraylist that I allocated on object creation, but not in the doGet(). I moved it into the doGet() method and all is well.