Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2004
Added on Aug 20 2002
11 comments
987 views