How to send html table as form input in javascript form post to servlet
<p>I want to send html table as form input using a javascript form POST. Post request is received in the servlet, however I am only getting part of the input table is "table id=". Please help me resolve this issue.</p>

<p><strong>Javascript code:</strong></p>

<pre><code>    var htmlFormat =  $.trim($('#report_table').html()).split("+").join("%2b");
    var form = $('&lt;form action="./csvReportDownload" method="post" enctype="application/x-www-form-urlencoded" accept-charset="UTF-8"&gt;' +
              '&lt;input type="hidden" name="userId" value="' + $('#user_id').val() + '"/&gt;' +
              '&lt;input type="hidden" name="new_tokens_dv" value="' + htmlFormat + '"/&gt;' +
          '&lt;/form&gt;');
          $('body').append(form);
          $(form).submit()'
</code></pre>

<p><strong>Servlet code:</strong> </p>

<pre><code>    String param_DETAILS = "report_table";
    String temp = null;
    if (request.getParameter(param_DETAILS) != null) {
        temp = new     String(request.getParameter(param_DETAILS).getBytes("ISO8859_1"), "UTF8");
        log.info("Parameter value: "+temp);
    }

    Console Output: Parameter value: &lt;table id="
</code></pre>