| | |
driver for jsp
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2007
Posts: 21
Reputation:
Solved Threads: 0
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
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
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.
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
----------------------------------------------
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
•
•
•
•
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
----------------------------------------------
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
•
•
Join Date: Jan 2007
Posts: 21
Reputation:
Solved Threads: 0
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.
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
----------------------------------------------
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
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.
There are of course many more, but that one alone should be sufficient for anyone.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
- JSP connection to database (JSP)
- jsp and mysql (JSP)
- how to run an ireport jrxml file from a jsp page.It's urgent (JSP)
- package javax.ejb.* does not exist (Java)
- connecting jsp with mysql database (JSP)
- Problem connecting my Tomcat Server and MySQL using JSP (JSP)
Other Threads in the JSP Forum
- Previous Thread: execute jsp in tomcat
- Next Thread: where to use two forms in one page..
Views: 1841 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for JSP
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient project read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write






