title: get form element value into jstl
body: <p>I have trouble getting a form element value into a jstl tag. I am doing some fancy stuff in my jsp page, like I have a dropdown menu, once some value is chose, I load the rest of form and once that is chose I load rest, so for first dropdown I have no issues, because they are constants and I know what to load next, but the second drop down menu I have, has dynamic data from server, so I need to know what user selected, so I can load rest of form based on that. </p>
  
  <p>I cant access that form element value in my jstl. how can I do that ? </p>
  
  <p>my jsp:</p>
  
  <pre><code>&lt;head&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
      $("#implementation").change(function(){
          if ($(this).val() == "aaa" ) {
              $("#aaa").slideDown("fast");
          } else {
              $("#aaa").slideUp("fast");
          }
      });
  
      $("#type").change(function(){
          if ($(this).val() == "new" || $(this).val() == "old") {
              $("#remote").slideDown("fast");
          } else {
              $("#remote").slideUp("fast");
          }
      });
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form:form id="form" name="form" method="post" modelAttribute="store" action="/shard"&gt;
      &lt;fieldset&gt;
      &lt;div class="input select"&gt;
          &lt;label for="implementation"&gt;Implementation&lt;span class="small"&gt;Choose implementation&lt;/span&gt;&lt;/label&gt;
          &lt;form:select name="implementation" path="implementation"&gt;
              &lt;form:option value=""&gt;Choose Implementation&lt;/form:option&gt;
              &lt;c:forEach items="${implementations.keySet()}" var="impl"&gt;
                  &lt;form:option value="${impl}"&gt;&lt;c:out value="${impl}" /&gt;&lt;/form:option&gt;
              &lt;/c:forEach&gt;
          &lt;/form:select&gt;
      &lt;/div&gt;
      &lt;div style="display: none;" id="aaa"&gt;
          &lt;div class="input select"&gt;
          &lt;label for="aaa" &gt;aaa&lt;span class="small"&gt;Choose cluster&lt;/span&gt;&lt;/label&gt;
          &lt;form:select id="cluster" name="cluster" path="cluster"&gt;
              &lt;form:option value=""&gt;Choose Cluster&lt;/form:option&gt;
              &lt;c:forEach items="${implementations.get('aaa').getClusters().keySet()}" var="cl"&gt;
                  &lt;form:option value="${cl}"&gt;&lt;c:out value="${cl}" /&gt;&lt;/form:option&gt;
              &lt;/c:forEach&gt;
          &lt;/form:select&gt;
          &lt;label &gt;new&lt;/label&gt;
          &lt;form:checkbox id="type" path="type" value="new" /&gt; 
          &lt;label &gt;old&lt;/label&gt;
          &lt;form:checkbox id="type" path="type" value="old" /&gt;
          &lt;div style="display: none;" id="remote"&gt;
              &lt;label&gt;Remote Sites &lt;span class="small"&gt;Available Sites&lt;/span&gt;&lt;/label&gt;
              &lt;c:if test="${implementations.get('aaa').getClusters().get(**&lt;I need the above selected type checkbox value&gt;**) == 'new'}"&gt;
                  &lt;form:checkboxes items="${implementations.get('aaa').getRemoteSites().get('&lt;I need the above selected type checkbox value&gt;').get**&lt;old | new from the type checkbox above&gt;**Sites()}" path="remoteSites" id="remoteSites" style="display: block; float: right;" /&gt;
              &lt;/c:if&gt;                                 &lt;/div&gt;
              &lt;input style="margin-left: 150px; width: 125px; height: 30px;" class="button" type="submit" value="Add" /&gt;
           &lt;div class="spacer"&gt;&lt;/div&gt;
          &lt;/div&gt;
       &lt;/div&gt;
     &lt;/fieldset&gt;
  &lt;/form:form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>any help ?</p>
  
  <p>Thank you</p>