Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E15AA2E005F for ; Thu, 27 Mar 2008 11:48:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 38960-02 for ; Thu, 27 Mar 2008 11:47:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smtpout26.attiva.biz (smtpout26.attiva.biz [85.37.16.27]) by postgresql.org (Postfix) with ESMTP id 640A82E005E for ; Thu, 27 Mar 2008 11:47:54 -0300 (ADT) Received: from FBCMFE02B15.fbc.local ([192.168.30.161]) by smtpout26.attiva.biz with Microsoft SMTPSVC(6.0.3790.1830); Thu, 27 Mar 2008 15:47:50 +0100 Received: from DREAM ([88.34.161.130]) by FBCMFE02B15.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 27 Mar 2008 15:47:49 +0100 Message-ID: <013001c89019$88e91d20$0602a8c0@DREAM> Reply-To: "Shavonne Marietta Wijesinghe" From: "Shavonne Marietta Wijesinghe" To: Subject: link to Jsp Date: Thu, 27 Mar 2008 15:47:51 +0100 Organization: Studio FORM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_012D_01C89021.EA38A340" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-OriginalArrivalTime: 27 Mar 2008 14:47:49.0945 (UTC) FILETIME=[8759CA90:01C89019] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/199 X-Sequence-Number: 30527 This is a multi-part message in MIME format. ------=_NextPart_000_012D_01C89021.EA38A340 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello I'm trying to connect to my postgresql db from a JSP page but my db is = on one computer and the jsp in another..=20 Has anyone done something like this before?? private synchronized Connection getConnection() throws = ClassNotFoundException, SQLException { final String DRIVER =3D "org.postgresql.Driver"; final String URL =3D "jdbc:postgresql:FormAjax"; final String USERNAME =3D "postgres"; final String PASSWORD =3D "form"; =20 Class.forName(DRIVER); =20 return DriverManager.getConnection(URL, USERNAME, PASSWORD); } Thanks Shavonne Wijesinghe ------=_NextPart_000_012D_01C89021.EA38A340 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello
 
I'm trying to connect to my postgresql = db from a=20 JSP page but my db is on one computer and the jsp in another.. =
 
Has anyone done something like this=20 before??
 
 private synchronized Connection=20 getConnection() throws = ClassNotFoundException,
     =20 SQLException {
    final String DRIVER =3D=20 "org.postgresql.Driver";
    final String URL =3D=20 "jdbc:postgresql:FormAjax";
    final String USERNAME = =3D=20 "postgres";
    final String PASSWORD =3D = "form";
 =20
    Class.forName(DRIVER);
  =
   =20 return DriverManager.getConnection(URL, USERNAME,=20 PASSWORD);
 }
 
Thanks
 
Shavonne = Wijesinghe
------=_NextPart_000_012D_01C89021.EA38A340--