User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 391,908 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,580 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1401 | Replies: 8
Reply
Join Date: Jan 2007
Location: INDIA
Posts: 21
Reputation: nehashri is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
nehashri nehashri is offline Offline
Newbie Poster

Question driver for jsp

  #1  
Feb 13th, 2007
Hi,
I am using postgresql 8.1 an I am trying to connect to the postsql from
JSP and servlets but I cannot find the driver name for the postgresql so I
can use it in the jsp connection. i hv been sujjested to use jdbc but cannt find advantage of jdbc over odbc.

I would appreciate your help.

Thanks,
neha
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2006
Posts: 1,360
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 117
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: driver for jsp

  #2  
Feb 13th, 2007
Even when you use odbc, from Java, you are using jdbc (it is called the jdbc-odbc bridge for a reason). And the advantage of using a real driver over the odbc one, is that the odbc driver is severly limited (and, if I remember right, not even thread safe, which it would need to be to be reliably abd safely used in a servlet or JSP).

For a real Driver try here:

http://jdbc.postgresql.org/

And read it's documentation after downloading it.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Jan 2007
Location: INDIA
Posts: 21
Reputation: nehashri is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
nehashri nehashri is offline Offline
Newbie Poster

Re: driver for jsp

  #3  
Feb 13th, 2007
thnx so much for the quick response...but this will not effect if in linux plateform rt?????
thnx again
Reply With Quote  
Join Date: Feb 2006
Posts: 1,360
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 117
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: driver for jsp

  #4  
Feb 13th, 2007
Originally Posted by nehashri View Post
thnx so much for the quick response...but this will not effect if in linux plateform rt?????
thnx again



What do you mean by this (the bold part)? I have no idea what you are asking, especially when combined with your earlier wish to use odbc. You do realize that odbc would only work on Windows, right? Unless, maybe, you have some special Linux kernel module that I know nothing of.

The JDBC drivers are simple Java jarfiles. They depend on, unless otherwise explicitly stated, only the JRE or JDK. So, as long as you have a JRE or JDK (which will contain a JRE) installed, a downloaded JDBC driver will work, regardless of the OS platform.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Jan 2007
Location: INDIA
Posts: 21
Reputation: nehashri is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
nehashri nehashri is offline Offline
Newbie Poster

Re: driver for jsp

  #5  
Feb 13th, 2007
i had querry is my dission for optin jdbc correct. i hv been asked to justify my choice i wantted to knw adv of jdbc over odbc never wished to use odbc.......... n ya sorry i forgot to mention jdbc along with os Q. i ment abt the jdbc in linux. again thnx 4 ur help
Last edited by nehashri : Feb 13th, 2007 at 5:34 am.
Reply With Quote  
Join Date: Feb 2006
Posts: 1,360
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 117
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: driver for jsp

  #6  
Feb 13th, 2007
Well, then, if you need to justify your decision to use a real JDBC Driver instead of the JDBC-ODBC Bridge, and you are using JSP/Servlet on Linux, you essentially don't need one. As mentioned, ODBC is, probably, not even available on your Linux system, and the JDBC-ODBC Bridge is not thread safe, and so not suited for Servlet/JSP in the first place.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Jan 2007
Location: INDIA
Posts: 21
Reputation: nehashri is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
nehashri nehashri is offline Offline
Newbie Poster

Re: driver for jsp

  #7  
Feb 14th, 2007
yap that was good thnx. tc
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,646
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 191
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: driver for jsp

  #8  
Feb 14th, 2007
if you need to justify your decision not to use the bridge driver, read the documentation that comes with the JDK. It contains an excellent reason.
There are of course many more, but that one alone should be sufficient for anyone.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Join Date: Jan 2007
Location: INDIA
Posts: 21
Reputation: nehashri is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
nehashri nehashri is offline Offline
Newbie Poster

Re: driver for jsp

  #9  
Feb 15th, 2007
yap thnx jwenting that will b fyn
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 7:42 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC