pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shavonne Marietta Wijesinghe <shavonne.marietta@studioform.it>
To: pgsql-sql@postgresql.org
Subject: link to Jsp
Date: Thu, 27 Mar 2008 15:47:51 +0100
Message-ID: <013001c89019$88e91d20$0602a8c0@DREAM> (raw)

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.. 

Has anyone done something like this before??

 private synchronized Connection getConnection() throws ClassNotFoundException,
      SQLException {
    final String DRIVER = "org.postgresql.Driver";
    final String URL = "jdbc:postgresql:FormAjax";
    final String USERNAME = "postgres";
    final String PASSWORD = "form";
  
    Class.forName(DRIVER);
  
    return DriverManager.getConnection(URL, USERNAME, PASSWORD);
 }

Thanks

Shavonne Wijesinghe

view thread (2+ messages)  latest in thread

Message-ID: <013001c89019$88e91d20$0602a8c0@DREAM>
Permalink:  ../013001c89019$88e91d20$0602a8c0@DREAM/
Also on:    postgresql.org/message-id/013001c89019$88e91d20$0602a8c0@DREAM

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: shavonne.marietta@studioform.it
  Subject: Re: link to Jsp
  In-Reply-To: <013001c89019$88e91d20$0602a8c0@DREAM>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox