1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
OutputStream os = response.getOutputStream();
response.setContentType("text/xml");
response.setCharacterEncoding("iso-8859-1");
xml = new StringBuffer();
xml.append("<?xml version='1.0' encoding='ISO-8859-1' ?>");
xml.append("<reponse>");
// contenu du xml
xml.append("</reponse>");
os.write(xml.toString().getBytes());
os.close();
if (logger.isDebugEnabled()) {
logger.debug(xml);
}
return null;
} |
Partager