Ciao, ho un problemino...con il seguente codice:
<%
class rico{
public rico(){
}
int x=0;
Node temp = new Node();
public void ricorsivo(TreeView tv, String idnode, Node nodo) throws ClassNotFoundException, SQLException{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection=DriverManager.getConnection("jdbcdbc:treeview");
Statement statement = connection.createStatement();
String sql="SELECT * FROM Tree WHERE ParentID LIKE '"+idnode+"'";
ResultSet rs = statement.executeQuery(sql);
while(rs.next()){
idnode=rs.getString(1);
temp = nodo.add(tv.createNode(rs.getString(2), rs.getString(4)+"?id="+idnode, rs.getString(2)));
out.print(""+idnode+""); // IL MIO PROBLEMA E' QUA'
ricorsivo(tv, idnode, temp);
}
}
}
%>
L'errore č il seguente: "Cannot refer to a non-final variable out inside an inner class defined in a different method"
cm posso risolverlo?
GRAZIE!