I worked on a JSP on my iBook running OS X 10.2, Tomcat 4.1.12, and
PostgreSQL 7.2.3, and Java 1.3.1. The JSP has no problem connecting to
PostgreSQL and displaying the data. So I copied the app over to my
server running Debian 3.0 stable, Tomcat 4.1.12, Blackdown Java 1.3.1
and PostgreSQL 7.2.2. I put the pgjdbc2.jar file in
/usr/share/tomcat4/common/lib. But when I try to bring up the jsp, I get
the following errors:
org.apache.jasper.JasperException: SQLException: Could not connect to
database.
make sure you have 'tcpip_socket=1' somewhere in
/etc/postgresql/postgresql.conf.
I can connect to the database running a java program from the command
line using the pgjdbc2.jar file, so I know thats not it. Is there a
problem with the Blackdown version of Java with regard to JSP's and/or
servlets? Is there anything else that needs installing?
cmd line interfaces often connect with a unix socket which is enabled by
default.