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

JSP to PostgreSql

From: "Shavonne Marietta Wijesinghe" <shavonne(dot)marietta(at)studioform(dot)it>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: JSP to PostgreSql
Date: 2008-04-01 09:19:36
Message-ID: 007001c893d9$83632bc0$0602a8c0@DREAM (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hello. I'm trying to connect my jsp page to read a database on a windows 2003 server. 

<%@ page language="java" import="java.sql.*" %>
<body>
<%
Class.forName("org.postgresql.Driver");
Connection myConn=DriverManager.getConnection("jdbc:postgresql://XXX.XXX.X.X/database/FormAjax?user=postgres&password=form");
%>
</body>

But when i run this i get an "Exception report" error

org.apache.jasper.JasperException: Exception in JSP: /jsp/pgtest.jsp:10
7: 
8: Class.forName("org.postgresql.Driver");
9: 
10: Connection myConn=DriverManager.getConnection("jdbc:postgresql://192.168.2.3:8080/database/FormAjax?user=postgres&password=form");
11: 
12: %>
13: </body>

Any idea anyone?
Thank you.
Shavonne

Responses

pgsql-jdbc by date

Next:From: Albe LaurenzDate: 2008-04-01 10:08:43
Subject: Re: JSP to PostgreSql
Previous:From: Albe LaurenzDate: 2008-04-01 08:03:34
Subject: Re: CallableStatement and getUpdateCount

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