Page JS as follows
function postXML () {if (window.XMLHttpRequest) req = new XMLHttpRequest (); else if (window.ActiveXObject) req = new ActiveXObject ( "Microsoft.XMLHTTP"); else return; req.open ( "POST", "http : // LocalHost: 8080 / MPS / ORDERS.DO? Action = save "); Req.SetRequestHeader ('Content-Type', 'Text / XML'); Req.onReadyStateChange = XMLposted; Req.send (ORDERDOC); Function Xmlposted () {if (Req.ReadyState! = 4) Return; if (Req.status == 200) {var result = req.responsexml; Alert ("Records Saved SuccessFully);} else {}}
Backstage Action
SAXReader Reader = New SaxReader (); Document Doc = Reader.Read (Request.getInputStream ());