title: creating dynamic rows in JSP/Servlets instead of javascript
body: <p>Is there any alternative mechanism creating dynamic rows in JSP/Servlets instead of javascript.</p>
  
  <p>JS Code:-</p>
  
  <pre><code>var table = document.getElementById('table1');  
                    var tr    = document.createElement('TR');
      var td1   = document.createElement('TD');
      var td2   = document.createElement('TD');
      var td3   = document.createElement('TD');
      var td4   = document.createElement('TD');
      var inp1  = document.createElement('INPUT');
      var inp2  = document.createElement('INPUT');
                   var inp3  = document.createElement('INPUT');
      inp1.setAttribute("Name", "purpose");
      inp1.setAttribute("id", purpose"+reclength); 
      inp2.setAttribute("Name", "Amount");
      inp2.setAttribute("id", "Amount"+reclength);  
      inp3.setAttribute("Name", "dt");
      inp3.setAttribute("id", "dt"+reclength);  
      var deleteIcon     = document.createElement('IMG');
      deleteIcon.setAttribute('src', '&lt;%=basePath%&gt;images/cancelIcon.gif');
      deleteIcon.onclick = function(){
          removeWthDrwls(tr);
      }
      table.appendChild(tr);
      tr.appendChild(td1);
      tr.appendChild(td2);
      tr.appendChild(td3);
      td1.appendChild(inp1);
      td2.appendChild(inp2);
      td3.appendChild(inp3);
      td3.appendChild(space2);
      td3.appendChild(deleteIcon);
  </code></pre>
  
  <p>but if user has disabled javascript.So what are best ways to provide alternative solution to him/her in java web applications?</p>