java.sql.SQLException: ResultSet closed
you should not reuse a Statement. When you create a new Query, you need so use a new Statement Object. Replace rs1 = stmt.executeQuery("SELECT ASK FROM '" + title + "' ;");
with rs1=c.createStatement().executeQuery("SELECT ASK FROM '" + title + "' ;");