假设我有一个 sql 查询
Select abc from table1 where abc > 100
我希望从文本框中派生出 100 的值 谁能告诉我如何在jsp中做到这一点?
最佳答案
您需要将表单发布到 servlet
<form action="YourServlet">
<input type="text" name="data">
</form>
在 doPost 中的 servlet 上
request.getParameter("data");
另请参阅
关于java - 使用jsp在sql查询中传递变量值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9510998/