【问题标题】:org.apache.jasper.JasperException: jsp Unterminated &lt;c:if tagorg.apache.jasper.JasperException: jsp 未终止 <c:if 标记
【发布时间】:2017-12-29 12:47:20
【问题描述】:

当有人试图改变他/她的状态时,我想从 jsp 文件中删除当前状态。我的代码运行良好。 我添加了 c:if 然后我开始收到此错误。 请纠正我哪里出错了。

  </c:when><c:otherwise>
                    <tr>
                        <td class="label"><bean:message key="changeStatus.new"/></td>
                        <td>
                            <html:select property="memberStatus">
                                <html:option value=""><bean:message key="global.select.empty" /></html:option>
                                <c:forEach var="status" items="${memberStatuses}">
                                    <html:option value="${status}"><bean:message key="changeStatus.${status}"/></html:option>
                                    <c:if test="${status == member.status}" <html:option value="${status}"><bean:message key="changeStatus.${status}"/></html:option>
                                    </c:if>
                                </c:forEach>    
                            </html:select>
                        </td>
                    </tr>

   </c:otherwise></c:choose>

【问题讨论】:

  • 尝试在此处添加&gt;关闭标签&lt;c:if test="${status == member.status}"
  • 知道了。谢谢@Gurkan

标签: jsp


【解决方案1】:

jsp未终止&amp;lt;c:if标签

当您忽略添加关闭标记时会出现问题。因此,c:if 也需要关闭标记 &amp;gt;(即 > 符号)。

<c:if test="${status == member.status}" > <html:option ...>
                                        ^
                                       Here

【讨论】:

    猜你喜欢
    • 2016-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-25
    • 2010-12-21
    • 2021-06-04
    • 2020-10-19
    相关资源
    最近更新 更多