jsp怎么导入mysql jsp中怎么导入图片( 三 )


Statement stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_PUDATABLE);
ResultSet uprs=stmt.executeQuery("select * from test");
uprs.absolute(4);
uprs.deleteRow();
批处理
con.setAutoCommit(false); 关闭自动认可模式
Statement stmt=con.createStatement();
int[] rows;
stmt.addBatch("insert into test values(1001,xuzhaori)");
stmt.addBatch("insert into test values(1002,xuyalin)");
rows=stmt.executeBatch();
con.commit(); 没有任何错误,执行批处理stmt.executeBatch();
JNDI-数据源(Data Source)与连接池(Connection Pool)
Tomcat的JDBC数据源设置 技术手册P439
连接池工具-Proxool Var 0.8.3 技术手册P446
设置web.xml
?xml version="1.0" encoding="ISO-8859-1"?
!--?xml version="1.0" encoding="GB2312"?--
web-app xmlns=""
xmlns:xsi=""
xsi:schemaLocation=""
version="2.4"
….
servlet
servlet-nameServletConfigurator/servlet-name
servlet-classorg.logicalcobwebs.proxool.configuration.ServletConfigurator/servlet-class
init-param
param-namepropertyFile/param-name
param-valueWEB-INF/classes/Proxool.properties/param-value
/init-param
load-on-startup1/load-on-startup
/servlet
后端统计端口添加下列
servlet
servlet-nameAdmin/servlet-name
servlet-classorg.logicalcobwebs.proxool.admin.servlet.AdminServlet/servlet-class
/servlet
servlet-mapping
servlet-nameAdmin/servlet-name
url-pattern/Admin/url-pattern
/servlet-mapping
….
/web-app
配置Proxool.properties
jdbc-0.proxool.alias=JSPBook
jdbc-0.proxool.driver-class=com.mysql.jdbc.Driver
jdbc-0.proxool.driver-url=jdbc:mysql://localhost:3306/sample_db?user=rootpassword=browseruseUnicode=truecharacterEncoding=UTF-8
jdbc-0.proxool.maximum-connection-count=10
jdbc-0.proxool.prototype-count=4
jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE
jdbc-0.proxool.verbose=true
jdbc-0.proxool.statistics=10s,1m,1d后端统计接口添加此行
jdbc-0.proxool.statistics-log-level=DEBUG
使用Proxool连接池
Connection con = DriverManager.getConnection("proxool.JSPBook");
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
String query = "SELECT * FROM employee";
ResultSet rs = stmt.executeQuery(query);
【jsp怎么导入mysql jsp中怎么导入图片】jsp怎么导入mysql的介绍就聊到这里吧 , 感谢你花时间阅读本站内容,更多关于jsp中怎么导入图片、jsp怎么导入mysql的信息别忘了在本站进行查找喔 。

推荐阅读