Hi,
This code iterates ResultSet inserted into session and adds it's
elements to JavaScript table:
<sql:resultSet id="rs" name="rset" scope="session">
comTresc[licznik++] = "<sql:getColumn colName="comment"/>";
</sql:resultSet>
And it works. As You can see ResultSet is inserted into session
with the key "rset".
But I want to use this result set again in this page. If I tried to do
that I got a NullPointerException on doStartTag. So I figured, that
maybe I have to rewind this RS to the beggining (it's a
ResultSet.TYPE_SCROLL_INSENSITIVE ResultSet type). So what I do is:
<% ((ResultSet)session.getAttribute("rset")).beforeFirst();%>
And again I get a null pointer exception but this time it's exactly in
this point of generated servlet where the above code fragment is
executed (beforeFirst). It looks like this:
Root cause:
java.lang.NullPointerException
at org.postgresql.jdbc2.ResultSet.beforeFirst(ResultSet.java:762)
at
_0002fkomentarze_0002ejspkomentarze_jsp_0._jspService(_0002fcomments_0002ejspcomments_jsp_0.java:181)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
...
My question is, is it possible to use same ResultSet twice on one
page? Does this RS tag remove RS object from session?
--
Best regards,
Maciej
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>