944,147 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 1960
  • JSP RSS
Feb 13th, 2007
0

driver for jsp

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007
Feb 13th, 2007
0

Re: driver for jsp

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.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Feb 13th, 2007
0

Re: driver for jsp

thnx so much for the quick response...but this will not effect if in linux plateform rt?????
thnx again
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007
Feb 13th, 2007
0

Re: driver for jsp

Click to Expand / Collapse  Quote originally posted by nehashri ...
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.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Feb 13th, 2007
0

Re: driver for jsp

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 6:34 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007
Feb 13th, 2007
0

Re: driver for jsp

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.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Feb 14th, 2007
0

Re: driver for jsp

yap that was good thnx. tc
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007
Feb 14th, 2007
0

Re: driver for jsp

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Feb 15th, 2007
0

Re: driver for jsp

yap thnx jwenting that will b fyn
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nehashri is offline Offline
21 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: execute jsp in tomcat
Next Thread in JSP Forum Timeline: where to use two forms in one page..





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC