FAQ
I am trying to transition my JSP site to a commercial server (postgresql version 8.1.23),
but every time I try to access the DB using JSP/JSTL I get the following error.

javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid:
"org.postgresql.util.PSQLException: The user property is missing. It is mandatory."

The server set up: as per the commercial site
Resource name="jdbc/DBNAME" auth="Container" type="javax.sql.DataSource"
username="UNAME" password="PASS"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost/DBNAME"
maxActive="10" maxIdle="1"

The jsp page giving the error is:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<sql:setDataSource var="ds" driver="org.postgresql.Driver"
url="jdbc:postgresql://localhost/DBNAME?user=UNAME&password=PASS" user="UNAME"
password="PASS"/>
<sql:query var="cdate" dataSource="${ds}" sql="SELECT CURRENT_DATE AS date" />


Thank you for any help you might be able to provide!

V/R

Victor Ross
mako-shark@pacific-ocean.com

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedJul 22, '11 at 11:28a
activeJul 22, '11 at 11:28a
posts1
users1
websitepostgresql.org
irc#postgresql

1 user in discussion

Vic Ross: 1 post

People

Translate

site design / logo © 2022 Grokbase