Forms 嵌套带有<;的spring表单标记;c:如果>;标签

Forms 嵌套带有<;的spring表单标记;c:如果>;标签,forms,tags,Forms,Tags,我当前的jsp包含一些单选按钮,如下所示: <input type="radio_1" value="1" id="radio_1" <c:if test="${account!=1}">disabled</c:if> <c:if test="${account==1 && radio_1=='1'}">checked</c:if>/> <form:radiobutton path="radio_1" valu

我当前的jsp包含一些单选按钮,如下所示:

<input type="radio_1" value="1" id="radio_1"
<c:if test="${account!=1}">disabled</c:if> 
<c:if test="${account==1 && radio_1=='1'}">checked</c:if>/>
<form:radiobutton path="radio_1" value="1" 
<c:if test="${account!=1}">disabled</c:if>
<c:if test="${account==1 && radio_1=='1'}">checked</c:if>/>

我需要将它转换成spring框架的标签,以便将它绑定到一个模型bean。所以我把它转换成了spring表单标签 大概是这样的:

<input type="radio_1" value="1" id="radio_1"
<c:if test="${account!=1}">disabled</c:if> 
<c:if test="${account==1 && radio_1=='1'}">checked</c:if>/>
<form:radiobutton path="radio_1" value="1" 
<c:if test="${account!=1}">disabled</c:if>
<c:if test="${account==1 && radio_1=='1'}">checked</c:if>/>

但似乎我们不能像HTML标记那样嵌套表单标记,所以我得到错误消息“unterminated tag”。 但我需要附加这些标签,不想改变原来的功能。
我们有一些替代方法吗?

不要使用c:如果只在disable属性中使用,那么在radiobutton标记中也使用它

<c:if test="${account!=1}">
  <form:radiobutton path="radio_1" value="1" disabled/>
</c:if>

<c:if test="${account==1 && radio_1=='1'}">
  <form:radiobutton path="radio_1" value="1" checked/>
</c:if>

<c:if test="${account==1 && radio_1!='1'}">
 <form:radiobutton path="radio_1" value="1" />
</c:if>