Forums Register Login

junk characters in xml response

+Pie Number of slices to send: Send
hi,
i am getting some junk characters along with xml response.how can i avoid the junk characters.pl tell me

response.setContentType("application/x-java-serialized-object");
OutputStream os = response.getOutputStream();
ObjectOutputStream output = new ObjectOutputStream(os);
output.writeObject("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
"<text timestamp=\"08:45:00.000\">"+
"The deadline of <name>homework 1</name> is"+
"<emph>March 9th 2001</emph>."+
"</text>");
output.flush();
output.close();
+Pie Number of slices to send: Send
For the second time, please do not post the same question more than once.

And, you have previously been warned on multiple occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional, and this is your final warning. Adjust your display name to comply with the required standards prior to your next post.

Failure to comply will result in the removal of your account.

bear
JavaRanch Sheriff
We're being followed by intergalactic spies! Quick! Take this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


Reply locked
This thread has been viewed 753 times.
Similar Threads
DB app: complex text structure
Customizing Epic Editor
XML response from servlet
why do i get few junk characters in the XML response
response from servlet of xml format
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:57:11.