从 Struts 迁移到 Spring

Migration from Struts to Spring

我正在开发一个项目,我们正在从 Struts 1.3 迁移到 Spring MVC 3.0。

JSP 存在问题,如下所述:

Struts 的

标签用于从 Java class 中检索集合。

我的问题是…… 是否有任何标签可以将 struts 的 标签替换为 Spring MVC?


<form:select onchange="javascript:changeSelectedType();" property="countryType" styleClass="form-control">                                  
        <html:optionsCollection property="stateType"/>
</form:select></code>

你可以简单地使用这个:

<form:select path="country"> 
   <form:option value="NONE" label="--- Select ---"/>
   <form:options items="${countryList}" />
</form:select>

祝你好运