语句：connect = DriverManager.getConnection(url,db_user,db_pwd);
EmbededTomcat: Startup time 2013
2003-10-09 15:08:45 - Ctx() : Compiling: /Jsp1.jsp to Jsp1_2
2003-10-09 15:08:49 - SessionIdGenerator: Created random class java.security.SecureRandom
sm.db.sqlserver.connect FAILURE [Microsoft][SQLServer JDBC Driver]Error establishing socket.
connect = DriverManager.getConnection(url;DatabaseName=pubs;db_user;db_pwd);
2. Registering the Driver
Registering the driver tells the JDBC driver manager which driver to load. When loading a driver using class.forName(), you must specify the name of the driver:
3. Passing the Connection URL
After registering the driver, you must pass your database connection information in the form of a connection URL. The following is a template URL for the SQL Server 2000 Driver for JDBC. Substitute the values specific to your database. (For instructions on connecting to named instances, see "Connecting to Named Instances" in the SQL Server 2000 Driver for JDBC topic.)
For example, to specify a connection URL that includes the user ID "username" and the password "secret":
Connection conn = DriverManager.getConnection
The server_name is an IP address or a host name, assuming that your network resolves host names to IP addresses. You can test this by using the ping command to access the host name and verifying that you receive a reply with the correct IP address.
The numeric value after the server name is the port number on which the database is listening. The values listed here are sample defaults. You should determine the port number that your database is using and substitute that value.
You can find the complete list of Connection URL parameters in "Connection String Properties" for the SQL Server 2000 Driver for JDBC.