The purpose , in index.jsp call javabeans, my database has four reocords in all, but javabeans runs out of index.jsp to be only one record. and delete serial number address is 4 , it is wrong! Is it del.jsp?PersonID =1 is correct, because this is serial number is 1, who can tell me the fault that where my logic,and it is four records that right , but the page has one records , thanks. Bean Code is:
write once, run everywhere
posted 11 years ago
It seems from the method signature that you want to get the next record from the resultset - rs.
But in your while loop you iterate through all records and keep initialising the variable count, so in the end, the variable - count will have value of PersonID in the last record.
If you want the variable - count to return the value of PersonID in ech record then instead of while() loop just use if() to fetch just one record at each method call.