Hi Peter,

Yes, your code is using two attribute names for every record. And the last 
attribute values that get saved are the those of the last record of your 
resultset. I would would recommend that you use hidden fields in your form 
with the id for each record.

Lester


At 11:21 AM 9/26/01 +0200, you wrote:
>Hello all,
>
>this is a bit off Topic, but it also belong to Tomcat:
>I have 2 jsp-pages:
>In the first a result set is executed.
>Each record in the row has a button ( more information) which leeds to
>the second page. On this page I will give more information to the item
>of the first page but I allways see only the last record of the result
>set. Here's a piece of my code:
>
><%   while(rs.next())  {
>
>session.setAttribute("autor",rs.getString(1));
>session.setAttribute("titel1",rs.getString(2));
>..........
>%>
><B><%=rs.getString(1)%></B><BR>
><%=rs.getString(2)%>
><%=rs.getString(3)%>
><%=rs.getString(6)%>
><%=rs.getString(10)%>
>HREF="moreinfos.jsp">more information</A>
>}
>%>
>
>in moreinfos.jsp I now want to show more of this item like:
>
><%=(String)session.getAttribute("autor")%>
><%=(String)session.getAttribute("titel1")%>
>..........
>
>And it shows me allways the last record of my result set instead of the
>one I need.
>How can I tell on which record I push the moreinfos-button???
>
>I would be very happy about every hint
>and please excuse my bad english
>Peter

Reply via email to