DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 8th, 2004, 05:59 PM
deity_me deity_me is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 1 deity_me User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Java Servlet, JDBC, and IBM DB2


Hi can anyone help me get my servlet to connect to a DB2 v8.1 database.

I have a java application that connects just fine to DB2

for my string url i'm using
jdbc:db2:mydatabase
and the driver i'm using is
COM.ibm.db2.jdbc.app.DB2Driver

I'm running the application on the same computer as where my DB2 is installed.

Now my problem is that my servlet cant seem to make a connection of the DB
i'm using the same url string and same driver
(tomcat is installed on the same computer as DB2)

Can someone show me how to make a proper connection
or the proper driver if i'm using the wrong driver.

Thanks

Reply With Quote
  #2  
Old March 9th, 2004, 04:35 PM
Nemi Nemi is offline
Clueless llama
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2001
Location: Lincoln, NE. USA
Posts: 2,353 Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Days 12 h 35 m 19 sec
Reputation Power: 111
Post the code that works and the code that you are usin in the web app that does not work. Also post any error messages you are getting in the log file.

As long as the driver jar file is in WEB-INF/lib dir it should work no different than a regular java app.
__________________
~Nemi

Before posting did you try:
[ Javadocs | Google ]

Reply With Quote
  #3  
Old June 10th, 2004, 09:32 PM
bingotailspin's Avatar
bingotailspin bingotailspin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 115 bingotailspin User rank is Corporal (100 - 500 Reputation Level)bingotailspin User rank is Corporal (100 - 500 Reputation Level)bingotailspin User rank is Corporal (100 - 500 Reputation Level)bingotailspin User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 52 m 45 sec
Reputation Power: 7
Your using the system catalog to address the database. You can change your JDBC URL to use the hostname syntax (localhost port number) or you will have to source your sqllib/db2profile during Tomcat startup so it will know where mydatabase is.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > Java Servlet, JDBC, and IBM DB2


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway