Autoselect default value in dropdown

Autoselect default value in dropdown

Struts code in jsp is
<s:select name="code" id="code" headerKey="-1" headerValue="Select" list="senderList" listValue="code" listKey="id" />

which gets converted to html code as shown below
<select name="code" id="code" >
    <option value="-1">Select</option>
    <option value="1">ABC1</option>
    <option value="2">ABC2</option>
    <option value="3">ABC3</option>
</select>


ABC1,ABC2,ABC3 are 3 different codes which can be assigned to a user.In the user info which i am getting from database, i can have one of the codes or it can also be possible that the codes are null.If null is coming then "Select" option should be selected else if i am getting ABC2 for that user then ABC2 option should be selected for that user.
Please advice me how to achieve this