Displaying Spring Dropdown in JSP if user does NOT have value in it.. I am trying to find out how to write some Spring code that will not display the following dropdown if the user has a value in the borough field coming back from the server?
<form:select path="borough">
<form:option value="Staten Island">Staten Island</form:option>
<form:option value="Queens">Queens</form:option>
<form:option value="Brooklyn">Brooklyn</form:option>
<form:option value="Bronx">Bronx</form:option>
<form:option value="Manhattan">Manhattan</form:option>
</form:select>
You can use jstl conditional tag to get this done
As per comment:
You can achieve if else by using
c:chooseSome documentation