A seesion from database and marshal to String
String xml = XMLUtils.marshallToString(list); sre.getServletRequest().setAttribute("LIST", xml);
and code JS
var regObject = '${requestScope.LIST}';
..... when open in browser. View source i have error Unexpected token ILLEGAL.
var regObject = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>//Unexpected token ILLEGAL <items> <item> <id>ID</id> <productName>PrdName</productName> <productLink>LINK</productLink> <productImage>IMG</productImage> </item> </items>';
No comments:
Post a Comment