Java 使用Spring MVC时,选择框似乎为空
我想在我的Spring MVC应用程序上使用一个select字段Java 使用Spring MVC时,选择框似乎为空,java,google-chrome,select,spring-mvc,form-submit,Java,Google Chrome,Select,Spring Mvc,Form Submit,我想在我的Spring MVC应用程序上使用一个select字段 <c:if test="${!empty REPORTED_WORD_LIST}"> <form method="post" action="seeReportedWordsOneByOne.html"> <select name="fityma" onchange="submit()"> <c:forEach it
<c:if test="${!empty REPORTED_WORD_LIST}">
<form method="post" action="seeReportedWordsOneByOne.html">
<select name="fityma" onchange="submit()">
<c:forEach items="${REPORTED_WORD_LIST}" var="rep">
<option value="${rep.german}"></option>
</c:forEach>
</select>
</form>
</c:if>
当页面打开时,所有选项看起来都是空的。尽管如此,报告的单词列表的内容仍会显示尽可能多的空选项。(因此,如果列表包含例如3个对象,比如“A”、“B”和“C”,那么当我单击select时,我可以看到三个空选项)
但这些领域似乎是空的。当我提交表格时,我可以在控制器中获得“A”、“B”或“C”。总而言之,提交可以工作,但显示不能
我错过了什么明显的东西吗?
请务必注意,我的浏览器是Chrome。(我无法在IE上进行此尝试,我尝试过,但我完成了,因为我无法通过它访问localhost…)不应该吗
<c:if test="${!empty REPORTED_WORD_LIST}">
<form method="post" action="seeReportedWordsOneByOne.html">
<select name="fityma" onchange="submit()">
<c:forEach items="${REPORTED_WORD_LIST}" var="rep">
<option value="${rep.german}">${rep.german}</option>
</c:forEach>
</select>
</form>
</c:if>
${rep.derman}
不应该吗
<c:if test="${!empty REPORTED_WORD_LIST}">
<form method="post" action="seeReportedWordsOneByOne.html">
<select name="fityma" onchange="submit()">
<c:forEach items="${REPORTED_WORD_LIST}" var="rep">
<option value="${rep.german}">${rep.german}</option>
</c:forEach>
</select>
</form>
</c:if>
${rep.derman}