如何在STRUTS中把XML文档发给客户端
我是这么写的但到客户端用JAVASCRIPT解析不了File file=new File(new JavaTOXmlServeric().CreateXml("G:/Tomcat 5.0/webapps/tt/WEB-INF/classes/com/JavaToXml/Orders.xml",listdate));
try
{
InputStream is=new FileInputStream(file);
response.setContentType("text/xml;charset=gb2312");
OutputStream out=response.getOutputStream();
byte []bt=is.toString().getBytes("UTF-8");
out.write(bt);
out.flush();
out.close();
is.close();
}
catch(IOException ex)
{
log.info("数据传送失败");
ex.printStackTrace();
throw new BaseException("数据传送失败");
}