How to Register and Use DataSource In Tomcat with MS SQLServer JDBC Driver?
843835Aug 20 2002 — edited May 14 2004 How to register and use the MS-SQL Server2000 DataSource in Tomcat4.04?
Hi friends,
I only have the MS SQL Server 2000 Database,and prog with jsp and Tomcat.
Since the MS issue their JDBC Driver for SQL Server,I always use "DriverManager" to get the database connection,
eg:
{
Class.forName
("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn = DriverManager.getConnection
"jdbc:microsoft:sqlserver://server1:1433","username","passwor d");
}
Now I want to use "DataSource" to get connection in my prog,and I know it is necessary to Register the DataSouce with JNDI in Tomcat before I can use it. But how to Register and use the SQL Server DataSource in Tomcat4.04? I can't get any document about this,and I had tried some times and all failed.
Any Commnet Will Be Appreicate!