Oi Galera, alguem sabe o que poderá tar se passando neste código?
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Leitura JDBC</title>
</head>
<body>
<jsp:useBean id="LigaBDBean" scope="session" class="Cap6.Ex3.LigaBD" />
<jsp:setProperty name="LigaBDBean" property="*" />
Tabela bd1:<br/>
<%
String res_id[] = new String[20];
String res_val[] = new String[20];
out.print("Ligação à BD:");
boolean res=LigaBDBean.fetch();
if (res)
out.print("ok<br/>");
else
out.print("falhou<br/>");
res_id=LigaBDBean.getId();
res_val=LigaBDBean.getVal();
for (int k=0;k<LigaBDBean.getRegistos();k++);
{
out.print("ID: ");
out.print(res_id[k]);<----------Tá dizendo aqui : Cannot find symbol
out.print("Valor: ");
out.print(res_val[k]);<--------Tá dizendo aqui : Cannot find symbol
out.print("<br/>");
}
%>
</body>
</html>
Alguém sabe o que poderá ser?
A variável tá declarada no ciclo for. Daí não sei o que tá passando.
Cumprimentos.
Mancini.
