| Author |
response from servlet of xml format
|
venkat
Greenhorn
Joined: Feb 03, 2007
Posts: 5
|
|
hi, i am trying to get a xml response from a servlet.I am getting the xml as response from servlet along with some junk characters.Kindly tell me how can i avoid the junk characters as i need to marshall this stream. response.setContentType("application/x-java-serialized-object"); OutputStream outputStream = response.getOutputStream(); System.out.println(outputStream); ObjectOutputStream output = new ObjectOutputStream(outputStream); 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>");
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56191
|
|
"venkat", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post. Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Be aware that accounts with invalid display names are removed. bear JavaRanch Sheriff
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: response from servlet of xml format
|
|
|