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

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: 2008-03-27 14:47:51
Message-ID: 013001c89019$88e91d20$0602a8c0@DREAM (view raw or flat)
Thread:
Lists: pgsql-sql
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

Responses

pgsql-sql by date

Next:From: Erik JonesDate: 2008-03-27 15:24:39
Subject: Re: Finding all References to a Primary Key
Previous:From: Roberto SpierDate: 2008-03-27 12:16:36
Subject: Re: Export Access 97 to PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group