One big problem is
you are using two Resultset.
remove one Resultset
and run it.
It will work
Your code is perfectly right.
You should display or complete the work before execute the second ResultSet.
After completing the while (rs.eof) you can create second ResultSet