Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to return custom object from http servlet to GWT client?

    I need to upload one excel input file by using smartgwt. So i added one custom HTTP Servelt to handle it. How to return custom object from servlet to client side.?

    I have created one custom object which contains three strings & 1 boolean. Now i wanted it back on my client end of GWT so that I can display the same in my UI. How can we send custom object from HTTP servlet of GWT to GWT client?

    Earlier i used to send string in the following way to call JSNI method at client side :

    PrintWriter out = response.getWriter();

    out.println("<html>");
    out.println("<body>");
    out.println("<script type="text/javascript">");
    out.println("if(parent.uploadCompleteMethod)");
    out.println("parent.uploadCompleteMethod('" + resultString + "');");
    out.println("</script>");
    out.println("</body>");
    out.println("</html>");

    Similarly , I would like to send response as custom object from servlet to gwt client. Please help me.
    Last edited by RIDEM; 5 Apr 2016, 01:57.
Working...
X