Paul Clapham,
I am also kind new to the whole implementation. Since I just was asked to add some minor feature on the top of it. The "process" itself is a class, "serialize" is a method for this class.
is used to generate this "process" object. Right now, I need to return this one to the client.
I hope I explain my question clearly.
Paul Clapham wrote:I don't really understand the question. That code appears to do three things:
(1) It declares that the response will be HTML, encoded in UTF-8.
(2) It calls the "serialize" method of some object which presumably sends something to the response. Your comment says that "something" is an XML document.
(3) It calls the toString() method of that object and appends the result of that to the response.
Those are mutually contradictory -- XML isn't HTML, and it doesn't make sense to append text after an XML document -- but your question is that you want to return the object to the user.
That requirement is incomplete. You are going to have to return it in some format, since HTTP doesn't have a concept of "object". So, what format do you want?