title: Checking a checkbox based on a database entry on a JSP page
body: <p>This is my checkbox:</p>
  
  <pre><code>  &lt;input type="checkbox" name="headC" id="headC" value="Head"&gt;
  </code></pre>
  
  <p>I have a String variable <code>&lt;%=msmtHead%&gt;</code> which is used to determine if this checkbox is checked or not based on this logic: <code>If (&lt;%=msmtHead%&gt; !="")</code> check <code>else</code> don't check.</p>
  
  <p>How do I make this work? I have several such checkboxes which need to be checked similarly.</p>
  
  <p>My research tells me JSTL should be used, but I don't know how to use the <code>&lt;c:if&gt;</code> tag to test for string values.</p>