Prashant,
In case you're confused by the two different approaches proposed by Dom and Shilpa, here's my two cents:
Both Dom's solution and Shilpa's solution work great as long as you know you have options that specify a value:
<option value="1">my option</option>
If you have options that do not specify a value as in:
<option>my option</option>
Only Shipla's solution works.
Note to Shilpa:
Thanks for the input. I hope you keep participating and contributing.
However,
Java Ranch rules indicate you need two names (first and Last) for your display name. Please make sure
the "publicly displayed name" in your profile meets the
JavaRanch naming policy.