title: How to pass java variables from scriptlets to c:when expression in jstl?
body: <p>what is a proper way to use variables from scriptlets in jstl?
  I don't know what is wrong in my code:</p>
  
  <pre><code>&lt;%
  boolean a = true;
  boolean b = false;
  %&gt;
  
  &lt;c:choose&gt;
      &lt;c:when test="${a}"&gt;
          &lt;c:set var="x" value="It's true"/&gt;
      &lt;/c:when&gt;
      &lt;c:when test="${b}"&gt;
          &lt;c:set var="x" value="It's false"/&gt;
      &lt;/c:when&gt;
  
  &lt;/c:choose&gt;
  </code></pre>
  
  <p>It looks like it doesn't go into the whole block.</p>