0
我只想顯示JSP錯誤消息。這意味着如果誤差變量存在,則將會顯示其消息和形式將被隱藏。如何測試JSP中,如果條件?
<c:choose>
<c:when test="${errorMessage ne null}">
error; ${errorMessage} //I have the error
</c:when>
<c:otherwise>
<form action="send-mail" method="post">
<table>
<tr>
<td colspan="2"><input type="text" name="email"> </td>
</tr>
<tr>
<td><input type="Submit" value="Reset Password"> </td>
<td><input type="reset" value="Cancel"> </td>
</tr>
</table>
</form>
</c:otherwise>
</c:choose>
謝謝你幫助我;
什麼是你的問題?什麼不是工作/工作不同於你的期望? –
如果'的errorMessage! =空',我想在我的HTML頁面上只有錯誤消息。因此,**表單不再出現在頁面** – Michael1
請嘗試像這樣, –