?? dbconnect.jsp
字號:
<%@ page import="sjservlets.*, java.sql.*" %>
<%
ConnectionPool connectionPool;
int vendor = DriverUtilities.MYSQL;
String driver = DriverUtilities.getDriver(vendor);
String host = "localhost";
String dbName = "jsp_library";
String url = DriverUtilities.makeURL(host, dbName, vendor);
String username = "root";
String password = "masteryoda";
try {
connectionPool =
new ConnectionPool(driver, url, username, password, 10, 50, true);
} catch(SQLException sqle) {
System.err.println("Error making pool: " + sqle);
getServletContext().log("Error making pool: " + sqle);
connectionPool = null;
}
// connectionPool.closeAllConnections();
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -