Hi All, I have the following data
<select class="small" name="test"><option value="1">a</option>
i want to print 'a' how can i do it?
request.getparameter(test)
gives me the selected value like 1
Hi All, I have the following data
<select class="small" name="test"><option value="1">a</option>
i want to print 'a' how can i do it?
request.getparameter(test)
gives me the selected value like 1
You can't, at least not this way.
The general flow is this
<select>
in a jsp and iterate over that modelAs pointed out in the comment below, the most widely used model is a Map
implementation. TreeMap
. HashMap
, LinkedHashMap
, depending on your data.