JSP JSTL < SQL: param > tag: specify SQL parameters
•
Java
parameter value
Example
<%@page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<sql:setDataSource driver="com.MysqL.jdbc.Driver"
url="jdbc:MysqL://localhost:3306/db_testjstl"user="root"
password="111"/>
<sql:update sql="UPDATE tb_user SET pwd=?WHERE username=?">
<sql:param value="123"></sql:param>
<sql:param value="小小"></sql:param>
</sql:update>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
