JSP JSTL < SQL: setdatasource > tag: set data source

Example 1

<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
  连接Sql Server 2000数据库
  <sql:setDataSource driver="com.microsoft.jdbc.sqlserver.sqlServerDriver"
                     url="jdbc:microsoft:sqlserver://localhost:1433;databaseName=db_testJSTL"
                     user="sa"
                     password=""/>

Example 2

<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
  连接MysqL数据库
  <sql:setDataSource driver="com.MysqL.jdbc.Driver"
                     url="jdbc:MysqL://localhost:3306/db_testjstl"user="root"
                     password="111"/>
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
分享
二维码
< <上一篇
下一篇>>