| 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 | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Erik Jones | 2008-03-27 15:24:39 | Re: Finding all References to a Primary Key | 
| Previous Message | Roberto Spier | 2008-03-27 12:16:36 | Re: Export Access 97 to PostgreSQL |