Is it Possible To return a xml object from a jsp file?
i tried. but i get an error. i have pasted the code & error below.
Code :
<body>
<table width="100%">
<tr>
<td>
<%
String testOne = request.getPara meter("HeyYou") ;
response.setCon tentType("appli cation/xml");
response.setHea der("Cache-Control", "no-cache");
response.getWri ter().write("<t estValue>"+test One+"</testValue>");
%>
</td>
</tr>
</table>
</body>
Exception :
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Only one top level element is allowed in an XML document. Error processing resource
i tried. but i get an error. i have pasted the code & error below.
Code :
<body>
<table width="100%">
<tr>
<td>
<%
String testOne = request.getPara meter("HeyYou") ;
response.setCon tentType("appli cation/xml");
response.setHea der("Cache-Control", "no-cache");
response.getWri ter().write("<t estValue>"+test One+"</testValue>");
%>
</td>
</tr>
</table>
</body>
Exception :
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Only one top level element is allowed in an XML document. Error processing resource
Comment