Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

link to Jsp


  • From: "Shavonne Marietta Wijesinghe" <shavonne(dot)marietta(at)studioform(dot)it>
  • To: <pgsql-sql(at)postgresql(dot)org>
  • Subject: link to Jsp
  • Date: Thu, 27 Mar 2008 15:47:51 +0100
  • Message-id: <013001c89019$88e91d20$0602a8c0@DREAM> <text/plain>

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


Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group