我正在尝试从网页获取输入并查询数据库,如果输入与数据库匹配,则移至下一页并“登录”
<sql:query var="result">
SELECT * from Customer where customer_number=1;
</sql:query>
<form>
Enter your surname<input type="text" name="surname"/><br><br>
Enter your passphrase <input type="text" name="passphrase"/>
<input type="submit" name="B1" value="Submit" />
</form>
<c:if surname="${result.rows[0]['surname']}">
<p>My salary is: <c:out value="${salary}"/><p>
</c:if>
目前它获取数据库的一行,但我需要它在数据库中搜索一个参数,然后如果存在,则检查该元组中的另一个参数。目前我收到一个错误:
HTTP Status 500 - /withdraw_basic.jsp (line: 23, column: 0) According to the TLD or the tag file, attribute test is mandatory for tag if
我不知道为什么会失败。 我对此很陌生,所以要温柔。谢谢
最佳答案
我相信您的文档顶部有此内容:
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
您还忘记正确关闭 p
标签:
<p>My salary is: <c:out value="${salary}"/><p>
<!-- Missed a slash here ^ -->
我想对此发表评论,但没有得到 50 次回复!
关于html - 检查数据库输入的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22056471/