title: Get Servlet session attributes using jQuery
body: <p>I have a raffle button that's being enabled or disabled based on Session Attributes I've set using Servlets.</p>
  
  <p>It should be disabled if either of this is true</p>
  
  <ol>
  <li>the <code>enBancCount</code> is equals to zero</li>
  <li>It's not a valid day</li>
  </ol>
  
  <p>Here is my code: </p>
  
  <pre><code>&lt;button id="raffleBtn" type="submit"
       ${sessionScope.enBancCount == 0 || !sessionScope.validDay ? 'disabled' : ''}&gt;
       Raffle
  &lt;/button&gt;
  </code></pre>
  
  <p>I'm currently using JSP EL to add the <code>disabled</code> attribute on the button based on the two conditions above. But now, before enabling it, I also have to check if majority attended on this raffle.</p>
  
  <p>I added the following input fields for checking the attendance:</p>
  
  <pre><code>&lt;input type="checkbox" name="attendance" value=""&gt; ATTENDEE 1
  &lt;input type="checkbox" name="attendance" value=""&gt; ATTENDEE 2
  &lt;input type="checkbox" name="attendance" value=""&gt; ATTENDEE ...
  &lt;input type="checkbox" name="attendance" value=""&gt; ATTENDEE 6
  </code></pre>
  
  <p>And changed the html for the raffle button to:</p>
  
  <pre><code>&lt;button id="raffleBtn" type="submit" disabled&gt;
       Raffle
  &lt;/button&gt;
  </code></pre>
  
  <p>And added the following JQuery code:</p>
  
  <pre><code>$('[name=attendance]').change(function() {
      if ($('[name=attendance]:checked').length &gt;= 4
          &amp;&amp; // CONDITION IF ENBANC CASE IS NOT ZERO
          &amp;&amp; // CONDITION IF IT'S A VALID DAY) {
           $('#raffleBtn').removeAttr('disabled');
       } else {
           $('#raffleBtn').attr('disabled', 'disabled');
       }
  });
  </code></pre>
  
  <p>My only problem is that I don't know how to get the value of <code>enBancCount</code> and <code>validDay</code> using JQuery.</p>
  
  <p>Please help?</p>