From: | "Dave Cramer" <Dave(at)micro-automation(dot)net> |
---|---|
To: | "'Scott Street'" <sstreet98(at)home(dot)com>, "'PostgreSQL JDBC List'" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: JDBC/JSP: Strange Problem |
Date: | 2001-12-02 15:41:13 |
Message-ID: | 022c01c17b47$c78dd4a0$8201a8c0@inspiron |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Scott,
Nicks suggestion is essentially what we need to do to debug this. One
other way to debug this is to look at the servlet that was created by
the JSP compiler. You should have a work directory, and a number of
servlets in there. If you can find the servlet, and the relevant code
please post.
Dave
-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Scott Street
Sent: Sunday, December 02, 2001 12:04 AM
To: PostgreSQL JDBC List
Subject: [JDBC] JDBC/JSP: Strange Problem
Hi folks, new to the list and PostgreSQL -- In the process of
converting all of my MySql programs to Postgres.
I have run into a strange problem I can't resolve, I narrowed the
problem down to a small snippet of code below.
The code compiles and runs, I see the select all * from messages
execute and the data is returned via the network, however, the jsp only
outputs the
LAST record returned. Can't figure it out -- anyone else hit this?
BTW: Tomcat 3.3, Java 1.3.1, PostgreSQL 7.1.3 with JDBC 7.1-1.2.jar
(jsp code --- cut here ---)
<%(at)page contentType="text/html"%>
<html>
<head><title>JSP Page</title></head>
<%(at)taglib uri="/WEB-INF/lib/dbtags.jar" prefix="jdbc" %> <%(at)taglib
uri="/WEB-INF/lib/ietags.jar" prefix="pr" %> <body> <H1>Message Listing
from Dataserver</h1> <jdbc:connection id="jdbcConn"
driver="org.postgresql.Driver"
url="jdbc:postgresql://ocean/bbs"
user="bbs" password="******" />
<jdbc:query id="msgQuery" connection="jdbcConn" resultsId="msgDS"
resultsScope="session" >
select all * from messages
</jdbc:query>
<TABLE border=1>
<TR>
<TH>MsgId
<TH>fromUser
<TH>toUser
<TH>Subject
<TH>Flags
<TH>Text
</TR>
<pr:iterator results="msgDS" >
<TR>
<TD><pr:field name="msgid"/>
<TD><pr:field name="fromuser"/>
<TD><pr:field name="touser"/>
<TD><pr:field name="subject"/>
<TD><pr:field name="flags"/>
<TD><pr:field name="msgtext"/>
</TR>
</pr:iterator>
</TABLE>
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
From | Date | Subject | |
---|---|---|---|
Next Message | Nick Fankhauser | 2001-12-02 21:29:57 | Re: JDBC/JSP: Strange Problem |
Previous Message | Nick Fankhauser | 2001-12-02 14:09:13 | Re: JDBC/JSP: Strange Problem |