From: | Sachin Srivastava <sachin(dot)srivastava1984(at)gmail(dot)com> |
---|---|
To: | Rekha Ravi Pai <rekha(at)softjin(dot)com> |
Cc: | pgsql-in-general(at)postgresql(dot)org |
Subject: | Re: Problem in connecting to database |
Date: | 2010-11-08 09:10:29 |
Message-ID: | C915C068-5D33-4889-B47B-0BB7EDB8325A@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-in-general |
Hello,
On Nov 8, 2010, at 2:00 PM, Rekha Ravi Pai wrote:
> Hi,
> I have installed postgresql 9.0 and tomcat 6.0.
> I created the jsp page given below.
> ---------------------------------------------------------------------------------------------------
> <html>
> <head>
> </head>
> <%@ page language="java" import="java.sql.*, beans.*" %>
> <%!
> Connection myConn=null;
> %>
> <body>
> <%
> //PasswordEncryptService p = new PasswordEncryptService();
> try{
> Class.forName("org.postgresql.Driver").newInstance();
> myConn=DriverManager.getConnection("jdbc:postgresql://localhost/postgres?user=postgres&password=postgres");
> out.println("myConn :"+myConn.toString());
> }catch(Exception e){
> out.println(e.toString());
> }
> out.println("myConn :");
> %>
> <B>Done</B>
> </body>
> </html>
> -------------------------------------------------------------------------------------------------------------------------------
> On running the web page I am getting the following error.
> org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Is your PG Server running on port 5432 (default)?
>
> Can anybody help me in this regard?
>
> Regards,
> Rekha
>
> Business Disclaimer
> ____________________________________________________________
> This e-mail message and any files transmitted with it are intended solely
> for the use of the individual or entity to which they are addressed. It
> may contain confidential, proprietary or legally privileged information.
> If you are not the intended recipient please be advised that you have
> received this message in error and any use is strictly prohibited. Please
> immediately delete it and all copies of it from your system, destroy any
> hard copies of it and notify the sender by return mail. You must not,
> directly or indirectly, use, disclose, distribute, print, or copy any part of
> this message if you are not the intended recipient.
> ___________________________________________________________
--
Regards,
Sachin Srivastava
From | Date | Subject | |
---|---|---|---|
Next Message | sαbαяiиαŧЋαи Iyєя | 2010-11-08 11:25:28 | Re: Problem in connecting to database |
Previous Message | Rekha Ravi Pai | 2010-11-08 08:30:06 | Problem in connecting to database |