Announcement Announcement Module
Collapse
No announcement yet.
AJAX-JSON Response to contain rendered JSP view Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AJAX-JSON Response to contain rendered JSP view

    I need to return an AJAX JSON response that contain the updated HTML code.

    The updated HTML code is created by rendering a JSP view.

    For example:
    JSP:
    <tr>
    <td>${data1}</td>
    <td>${data2}</td>
    </tr>

    JSON response:
    {"columns" : "2", "rows":"1", "data":rendered view}

    Currently I'm trying to create a dummy response with "my own" outputstream and put the rendered view content in the json response, but with no luck.

    Other than the fact I can't get this solution to work, it doesn't feel right.
    Any tips on the proper way to do it?

    Thanks,
    Ori

  • #2
    You have several options. One option is to return actual html instead of a json response and issue a dom update on the table with the returned table rows.

    Comment

    Working...
    X