sEcho along with all jQueryDataTableParamModel parameters is null after 1st execution.

sEcho along with all jQueryDataTableParamModel parameters is null after 1st execution.

I have a jsp page with serverside processing having a form having some options(selection criteria for data to be displayed)and a button used to display a list data using datatable. For the first time, is display the list data on the page, but when i click for 2nd time changing date, then it gets stuck and the console says the all my params for datatable are null. the params are : 
       
  1.     import javax.servlet.http.HttpServletRequest;
  2.     
  3.     import com.healthslate.common.util.ObjectUtils;
  4.     
  5.     public class DataTablesParamUtility {
  6.      public static JQueryDataTableParamModel getParam(HttpServletRequest request)
  7.      {
  8.      if(!ObjectUtils.isEmpty(request.getParameter("sEcho")))
  9.      {
  10.      JQueryDataTableParamModel param = new JQueryDataTableParamModel();
  11.      param.sEcho = request.getParameter("sEcho");
  12.      param.sSearch = request.getParameter("sSearch");
  13.      param.sSearch ="00:13:ef:60:0f:60";
  14.      param.sColumns = request.getParameter("sColumns");
  15.      param.iDisplayStart = Integer.parseInt(request.getParameter("iDisplayStart"));
  16.      param.iDisplayLength= Integer.parseInt(request.getParameter("iDisplayLength") );
  17.      param.iColumns = Integer.parseInt( request.getParameter("iColumns") );
  18.      param.iSortingCols = Integer.parseInt( request.getParameter("iSortingCols") );
  19.      param.iSortColumnIndex = Integer.parseInt(request.getParameter("iSortCol_0"));
  20.      param.sSortDirection = request.getParameter("sSortDir_0");
  21.      return param;
  22.      }else
  23.      return null;
  24.      }
  25.     }

and my jsp page is : 

  1.     <%@ page contentType="text/html; charset=ISO-8859-1"%>
  2.     <%@ taglib prefix="s" uri="/struts-tags"%>
  3.     <%@ taglib prefix="sj" uri="/struts-jquery-tags"%> 
  4.     <%@ taglib prefix="display" uri="http://displaytag.sf.net" %>
  5.     <html>
  6.     <head>
  7.     
  8.      <script type="text/javascript">
  9.      $(document).ready(function() {
  10.      if('${pageVisitLogList}' == 'undefined' || '${pageVisitLogList}' == '[]' || '${pageVisitLogList}' == ''){
  11.      $('.container').css('text-align', 'center');
  12.     
  13.     
  14.      var oTable= $('#row').dataTable(
  15.      {
  16.      "sDom" : "<'row'<'spanPag'l><'span6'p><'spanSer'f>r>t<'row'<'spanPage'i><'span6'p>>",
  17.      "oLanguage" : {"sLengthMenu" : "_MENU_ records per page"},
  18.      "bServerSide": true,
  19.                     "sAjaxSource": "serverSideSearch.action?dateFrom="+$('#fromDate').val()+"&dateTo="+$('#toDate').val(),
  20.     
  21.                     "bProcessing": true,
  22.             "sPaginationType": "full_numbers",        
  23.       "aoColumns": [
  24.                           { "mDataProp": "deviceMacAddress" },
  25.                           { "mDataProp": "deviceName"},
  26.                           { "mDataProp": "facility"},
  27.                           { "mDataProp": "visitTime"},
  28.                           { "mDataProp": "module"},
  29.                           { "mDataProp": "pageVisited"}, 
  30.                            
  31.                       ]   
  32.      
  33.      }); 
  34.       
  35.      $('#submitPageLog').click(function() {
  36.      alert('here we go');
  37.          oTable.fnReloadAjax("serverSideSearch.action?dateFrom="+$('#fromDate').val()+"&dateTo="+$('#toDate').val());
  38.      });
  39.     
  40.      $("#fromDate").datepicker({
  41.      showOn: 'both',
  42.      buttonImage: "Reports/resources/images/calendar.gif",
  43.      buttonImageOnly: false,
  44.      changeMonth: false,
  45.      changeYear: false,
  46.      showAnim: 'slideDown',
  47.      duration: 'fast'
  48.      });
  49.     
  50.      $("#toDate").datepicker({
  51.      showOn: 'both',
  52.      buttonImage: "Reports/resources/images/calendar.gif",
  53.      buttonImageOnly: false,
  54.      changeMonth: false,
  55.      changeYear: false,
  56.      showAnim: 'slideDown',
  57.      duration: 'fast'
  58.      });
  59.      $('.ui-datepicker-trigger').css('margin-bottom', '11px');
  60.      });
  61.      </script>
  62.      <style type="text/css">
  63.      a {
  64.      color: #047CB9;
  65.      text-decoration: none;
  66.      }
  67.      </style>
  68.     </head>
  69.     
  70.     <body>
  71.     <br><br>
  72.       <s:form id="pageVisitLogForm" theme="simple" method="post"   action="serverSideSearch.action" >
  73.         <div class="innerTableClass">
  74.         <table align="center" class="table" style="line-height: 2;">
  75.           <tr>
  76.             <td colspan="4" class="searchHeader">Page Visit Report</td>
  77.           </tr>
  78.           <tr>
  79.             <td align="left" colspan="4" class="required"><s:actionerror cssClass="required"/></td>
  80.           </tr>
  81.           <tr>
  82.             <td align="left" style="padding-top: 13px;">Date From</td>
  83.             <td><s:textfield id="fromDate" name="dateFrom" cssStyle="width: 170px; margin-right: 2px;" readonly="true"></s:textfield></td>
  84.             <td align="left" style="padding-left:70px; padding-top: 13px;">Date To</td>
  85.             <td><s:textfield id="toDate" name="dateTo" style="width: 170px; margin-right: 2px;" readonly="true"></s:textfield></td>
  86.           </tr>
  87.           <tr>
  88.             <td align="left" style="padding-top: 13px;">Module</td>
  89.             <td><s:select id="modulePageLog" list="moduleMap" name="module"/></td>
  90.             <td align="left" style="padding-left:70px; padding-top: 13px;"> MAC Address</td>
  91.            <td> <s:textfield name="deviceMacAddress"></s:textfield> </td>
  92.           </tr>
  93.           <tr>
  94.      <td align="left" style="padding-top: 13px;">Facility</td>
  95.      <td ><s:select list="facilityMap" name="facility" /></td>
  96.      <td align="left" style="padding-left:70px; padding-top: 13px;"> App Mode</td>
  97.            <td ><s:select list="appModeMap" name="appMode" /></td>
  98.       </tr>
  99.           <tr>
  100.      <td align="left" style="padding-top: 13px;">Locale</td>
  101.      <td ><s:select list="localeMap" name="currentLocale" /></td>
  102.      <td></td>
  103.      <td></td>
  104.       </tr>
  105.           <tr>
  106.             <td colspan="4" align="center">
  107.               <s:submit key="label.fetchReport"  />
  108.               <input type="button" id="submitPageLog" value="Generate Report"  >
  109.             </td>
  110.           </tr>
  111.         </table>    
  112.         </div>
  113.       </s:form>
  114.       <br/><br/>
  115.        <div class="container" id="click_me">
  116.     
  117.      <table id="row" >
  118.      <thead>
  119.      <tr>
  120.      <th>MAC Address</th>
  121.      <th>Device Name</th>
  122.      <th>Facility</th>
  123.      <th>Visit Time</th>
  124.      <th>Module</th>
  125.      <th>Page Visited</th>
  126.     
  127.      </tr>
  128.      </thead>
  129.      <tbody>
  130.      </tbody> 
  131.      </table>
  132.     
  133.               </div>
  134.     </body>
  135.     </html>