Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java- postgreSQLconnectivity

0 views
Skip to first unread message

pj devdhar

unread,
Jan 29, 2008, 8:09:30 AM1/29/08
to
hi,
i'd like to know how to develope database connectivity from postgreSQL
and java.
is there anyway by which pgsql can be linked to jsp(frontend of our
web application)?
are servelets required in this process?
any specific drivers needed to be installed?
if yes, which ones? how to? where to obtain them?

thanks!

pj devdhar

unread,
Jan 29, 2008, 8:15:54 AM1/29/08
to

ps: i'm using windows os, postgreSQL 8.2, jdk 1.5

rahuln...@gmail.com

unread,
Mar 15, 2008, 12:10:19 PM3/15/08
to
1] Go to http://jdbc.postgresql.org/download.html
2] Download JDBC3 Postgresql Driver, Version 8.3-603
3] Put it in your classpath of your web application & also in Tomcat/
common/lib
4] Now to establish connection through your Java code, ensure.. in
your snippet you have right combination of drivers invoked.
For e.g : Class.forName(".."), where ... is the name of JDBC driver
class in tht jar file. In order to see what is the name, just unjar
that downloaded file & check out the name of that class file.
5] Rest of the connection procedure, follow as it is in JDBC
connectivity.
Remember : In your questn, you have mentioned abt servlets/jsp's.. let
me clarify that servlets/jsp's are components in your webserver (like
Tomcat), which take http browser requests from client & process them
to send the response back to the client. The DB connectivity is a part
of your business logic. So, it has nothing to do with your front-end
servlet/jsp, except take data from them.
Samjhe kya.... ?
Nahi samjhe.. toh call karo!!!
:))
Your friend.
0 new messages