public class RegAciton extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse respose) throws Exception { Document doc = new Document();
Element root = new Element("regres");
Element res = new Element("resvalue");
res.addContent("1");
root.addContent(res);
doc.addContent(root);
XMLOutputter xmloutput = new XMLOutputter(Format.getPrettyFormat().setEncoding("ISO-8859-1"));
xmloutput.output(doc,respose.getWriter()); return mapping.findForward("");
}
}return mapping.findForward("");之后,js中就不能获得xml了.
请教如何解决.
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse respose) throws Exception { Document doc = new Document();
Element root = new Element("regres");
Element res = new Element("resvalue");
res.addContent("1");
root.addContent(res);
doc.addContent(root);
XMLOutputter xmloutput = new XMLOutputter(Format.getPrettyFormat().setEncoding("ISO-8859-1"));
xmloutput.output(doc,respose.getWriter()); return mapping.findForward("");
}
}return mapping.findForward("");之后,js中就不能获得xml了.
请教如何解决.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货