You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
You need to set the value attribute of the select tag.
The following code will fix your problem:
<html:select property="loglevel" value="1" size="1">
<html:option value="0">0</html:option>
<html:option value="1">1</html:option>
<html:option value="2">2</html:option>
<html:option value="3">3</html:option>
</html:select>
Notice how I set the value attribute of the select tag to 1, this will cause the value 1 in the option is rendered as selected.