Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Roshni on Jun 17, 2008 22:03
open dhtmlx forum
Loading xml srting to jsp

Is it possible to pass a server side xml string to client-side without creating xml file?I created a doc and converted it to an xml string using the function getStringFromDocument(Document doc); can i directly pass it to jsp?
Answer posted by Support on Jun 18, 2008 02:51
You can load data directly from jsp document as

grid.load("some.jsp")

and in some.jsp
<%@ page language="java" contentType="text/xml; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"
%>
....
    response.setContentType("text/xml");
    PrintWriter out = response.getWriter();
    out.print(getStringFromDocument(Document doc));

Basically, the client side code request jsp document, which outputs XML string as response.