title: How to add checkboxes dynamically using a JSP
body: <p>I have a string variable which is assigned with certain no. of labels. For eg, <strong>String var ="ChkBox1,ChkBox2,ChkBox3"</strong> in a JSP.</p>
  
  <p>Now, my requirement is, I have to extract the checks out of the string and store them in an array and dynamically add checkboxes(3 checkboxes as per above example) to the page by running a for loop (based on no. of elements in the array) and display them.</p>
  
  <p>If the variable is later changed to <strong>String var = "ChkBox1,ChkBox2,ChkBox3,ChkBox4"</strong>, the webpage should now contain 4 checkboxes.
  I am relatively new to JSP. Please help me out on how to design this logic.</p>
  
  <p><strong>PS</strong>:I already implemented the extraction of checkBoxes from string and formed an array. I need assistance on how to use a for loop to add checkboxes dynamically </p>