日期:2014-05-16  浏览次数:20368 次

JSP返回的关键代码
		String xmlStr = sb.toString();
		if (xmlStr != null && !"".equals(xmlStr)) {

			response.setContentType("text/xml;charset=UTF-8");
			response.getWriter().write(xmlStr);
			response.flushBuffer();
			response.setContentType("application/octet-stream");
			response.addHeader("Content-Disposition",
					"inline;filename=1.xml");
		}