Q:

get form element value into jstl

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. 
I cant access that form element value in my jstl. how can I do that ? 
my jsp:
<head>
<script type="text/javascript">
$(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");
        }
    });
});
</script>
</head>
<body>
    <form:form id="form" name="form" method="post" modelAttribute="store" action="/shard">
    <fieldset>
    <div class="input select">
        <label for="implementation">Implementation<span class="small">Choose implementation</span></label>
        <form:select name="implementation" path="implementation">
            <form:option value="">Choose Implementation</form:option>
            <c:forEach items="${implementations.keySet()}" var="impl">
                <form:option value="${impl}"><c:out value="${impl}" /></form:option>
            </c:forEach>
        </form:select>
    </div>
    <div style="display: none;" id="aaa">
        <div class="input select">
        <label for="aaa" >aaa<span class="small">Choose cluster</span></label>
        <form:select id="cluster" name="cluster" path="cluster">
            <form:option value="">Choose Cluster</form:option>
            <c:forEach items="${implementations.get('aaa').getClusters().keySet()}" var="cl">
                <form:option value="${cl}"><c:out value="${cl}" /></form:option>
            </c:forEach>
        </form:select>
        <label >new</label>
        <form:checkbox id="type" path="type" value="new" /> 
        <label >old</label>
        <form:checkbox id="type" path="type" value="old" />
        <div style="display: none;" id="remote">
            <label>Remote Sites <span class="small">Available Sites</span></label>
            <c:if test="${implementations.get('aaa').getClusters().get(**<I need the above selected type checkbox value>**) == 'new'}">
                <form:checkboxes items="${implementations.get('aaa').getRemoteSites().get('<I need the above selected type checkbox value>').get**<old | new from the type checkbox above>**Sites()}" path="remoteSites" id="remoteSites" style="display: block; float: right;" />
            </c:if>                                 </div>
            <input style="margin-left: 150px; width: 125px; height: 30px;" class="button" type="submit" value="Add" />
         <div class="spacer"></div>
        </div>
     </div>
   </fieldset>
</form:form>
</body>

any help ?
Thank you

A:

Well, the "dynamic" values are likely somehow connected to a dataset or set of pages, so you should have an idea of the return value(s) you need to get. Even if you didn't you should be able to create some logic to fetch the selected data(s) based on user options.
Say for instance I have a dropdown list with selection values based on a primary key(s) from a database table. Once the option is selected, I simply fetch the associated data set from the database based on the primary key value in the dropdown. The values from the dropdown may be dynamic, based on previously selected options, but they are still tied to a specific dataset. 
This can all be accomplished through wildcards or some custom logic to parse your select options server-side. 

