I am building a 3-tier application which uses java classes for retrieving data from db and jsp pages for the user interface. When I try to call a method in a jsp page which returns resultset, I get this error message: 
Operation not allowed after ResultSet closed.
For example, I have this method:
public ResultSet getName(String country) throws SQLException {
    String name;
    try {
        open();
        stmt1 = con.prepareStatement(fetchPanepistimio);
        stmt1.setString(1,country);
        rs1 = stmt1.executeQuery();
        stmt1.close();
        close();
    }catch(Exception e2) {
    }
    return rs1;
}
and when I write in a jsp page the following:
<%
ResultSet rs = panepistimio.getName(country);
while(rs.next()) { %>
...........
<% } %>
I get the exception which I described. Have you got any idea about what is going wrong? Thank you in advance
 
     
     
     
     
     
    