<html:option> tag in STRUTS
843836Aug 27 2003 — edited Oct 31 2007How can I put a "selected" attribute in the <html:option> tag in STRUTS? In regular HTML, I can say:
<select name="test">
<option name="opt1" selected>Option 1</option>
</selected>
But I can't use the "selected" key word in the STRUTS tag:
<html:select property="myList">
<logic:equal name="myListElement" value="Hello World">
<html:option value="opt1" selected>Option 1</html:option>
</logic:equal>
<logic:notEqual name="myListElement" value="Hello World">
<html:option value="other opts">Other opts</html:option>
</logic:notEqual>
</html:select>
How can I get the following to work?
Thanks,
Dylan