JSP, Tomcat web.xml file for connection to a SQL Server 2000 Database.

Posted on 2004-09-24
Last Modified: 2010-05-18
Hi I have an issue with a web application that is currently running on Tomcat Server 5.0.27. I have this web.xml file that connects to the database and I need the proper syntax to add to the web.xml page.  This could be a question for SQL Server 2000, as well.
I have the 3 .jar files for the JDBC driver from Microsoft (msbase.jar, mssqlserver.jar, msutil.jar) and I had this connection working previously, but I lost the syntax somehow working back and fourth with Access and SQL.  
I have my JSP, and Servlets correctly put together, but I need the web.xml file to list the driver, name of the database, username, password, etc.  If someone knows the answer, please make sure it fits into this code from my web.xml file.  The name of the database is "Data9000SQL" that sits on MS SQL Server 2000. Again, I have all 3 .jar files, they are in the correct path, and I just need to change it from the access, which i have now, to the MS SQL Server 2000.

Here is my web.xml file code...................... I need to incorporate MS SQL Server 2k, instead of access which i already have.....

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
  <!-- JSPC servlet mappings start -->



     Welcome to Evaluations
  <display-name>Welcome to Evaluations</display-name>
  <!-- JSPC servlet mappings start -->
    <param-value>jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\\projects\\evaluations\\db\\Data9000_Access</param-value>
  <!-- JSPC servlet mappings end -->

Question by:apapanic
1 Comment

Accepted Solution

matthew_york earned 500 total points
ID: 12158628
Hi there, I've got a similar setup that i have configured along these lines, hope this helps:

// Tomcat  - server.xml

<Context docBase="App" path="/App" reloadable="true">
      <Resource auth="Container" name="jdbc/test" type="javax.sql.DataSource"/>
      <ResourceParams name="jdbc/test">

// App - Application web.xml


Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Running Java Servlet inside Eclipse Luna 6 156
unit test DAO layer 1 137
issue with pdf generation 2 88
how to exclude a file using regex 5 118
How do we balance the user experience (UX) with reasonable security measures? It can be done, if you keep these fundamentals in mind.
Read about the ways of improving workplace communication.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now