Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting response in body

 
Vibhas Kumar
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I need one help in my current development one of the requirement says:

The server will return 200-OK as a response(httpresponse).

If the panelist is verified then as a result,
the server must also return the panelist id of this panelist.

The server will place the panelist id inside the body of the 200-OK response in the following way:





Now what I can able to do is I can put the httpresponse as

httpServletResponse.setStatus(HttpServletResponse.SC_OK);

And I can put String responseToClient= "<tdcp><cmd><ack cmd=”Init”><panelistid>3849303</panelistid></ack></cmd></tdcp>";

Now what does putting the above xml inside the body of 200-OK response mean??
and how it can be achieved.

Please help me thanks in advance


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic