JTDS LibraryIt is necessary sometimes to connect Tomcat to MS SQL server using SSO from the user currently logged into the windows machine they are on. This is possible with the jtds (http://jtds.sourceforge.net/) library. This brilliant library requires a small dll file (ntlmauth.dll) to be put on the system path (eg jre/bin) and the jtds jar file to be put into the tomcat lib directory. The dll interacts with Windows to get the user credentials and the jtds jar does the normal jdbc connection bits.
Tomcat context.xmlThe context file now needs to have the resource added. The username and password elements are not required if you want the SSO.
It is necessary to specify the instance because the SQL Server may specify a
Server name: servername\instance
but this isn't a valid network servername. Therefore this has to be split into two parts. The actual server name and the instance. The port is usually 1433 for SQL Server.