1] Go to
http://jdbc.postgresql.org/download.html2] 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.