The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

kurinosuke (156) [Avatar] Offline
Listing 5.15,
The servlet is reading the incoming xml data, looking for the root tag "commands".

I can't figure out where the "commands" tag is being set.
In listing 5.13, CommandQueue object, we set a request parameter called "data" to, appending each command in the queue. So all "command" tags will be concatenated to the "data" request parameter. I can't see where the root tag is being set.

Anything I'm missing, or is it an inconsistency in the sample code ?

Moreover, we are using a ContentLoader in Listing 5.13 with POST method, not specifying the contentType. So it will default to x-www-form-urlencoded. How can we make a Document in Listing 5.15 although the request is not in xml format ? The doPost method seems out of context in this chapter.