我使用JSP中的以下代码将生日月份存储在数据库中作为值.
<select name="birthday_month" id="birthday_month">
<option value="-1">Month</option>
<option value="1">Jan</option>
<option value="2">Feb</option>
...
</select>
Run Code Online (Sandbox Code Playgroud)
在JSP中输出代码以使用我正在使用的JSTL显示以前选择的项目(这是不正确的)
<select name="birthday_month" id="birthday_month">
<c:forEach var="value" items="${birthdaymonth}">
<option value="${birthdaymonth}">${birthdaymonth}</option>
<option value="1">Jan</option>
<option value="2">Feb</option>
...
</c:forEach>
</select>
Run Code Online (Sandbox Code Playgroud)
What I am getting from this code is value like 1 or 2 in select tag
其他信息:
request.setAttribute("birthdaymonth", user.getBirthdayMonth());我在期待什么