I have searched online online, I have been discovered that JSP SQLSERVER2000 project development is relatively small, and Server.xml is configured in Tomcat5, because Tomcat Related Website has a large number of mysql and oracle configuration examples, there are few Sql Server example.
Today I will share the experience of my research. This is deployed on Linux. This article tells everyone how to configure server.xml, enable you to read the SQL Server database smoothly, other related struts, Hibernate how to use, please see the information about the relevant website.
First go to the Microsoft website to download the Java patch package of SQLServer, and copy the three files of the msqlser.jar msbase.jar msutil.jar to the web-lib / lib directory and then configure server.xml, as follows :( Please note that the Chinese inside will be changed to you need)
XML Version = '1.0' Encoding = 'UTF-8'?>
Write the absolute path of the web directory / OPT / Tomcat / WebApps / Abc "unpackwars =" true "autodeploy =" true ">
Host> The following can be written to a secondary website and read another database.
Then configure hibernate.cfg.xml (see below): Note Java: Comp / Env / JDBC / News is consistent with the resourceParams parameters of JNDI in Server.xml.
xml version = '1.0' encoding = 'UTF-8'?>
session-factory>
Hibernate-Configuration>
Ok, basically configured successfully. If there is any problem, please discuss it.