Problema no reconhecimento de variável

1 resposta
M
galera estou com um probleminha quanto a definição de uma variável. Estou utilizando a JSTL e não esta reconhecendo a variável da tag resultSet "rset". Esta deve conter a quantidade máxima de registros para se fazer uma distribuição de páginas. O Código é o seguinte:
<db:statement id='stmCont' conn='con'> 
<db:query> 
SELECT count(*) as total FROM Registro 
WHERE desCanal = '<%=request.getParameter("canal")%>' 
AND desSecao = '<%=request.getParameter("secao")%>' 
</db:query> 
<db:resultSet id='rset'>
      <%! int totSecao = rset.getInt("total"); %>
      </db:resultSet>
 </db:statement>
a mensagem do problema no browser é a seguinte:
Apache Tomcat/4.0.2 - HTTP Status 500 - Internal Server Error

--------------------------------------------------------------------------------

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.


An error occurred at line: 100 in the jsp file: /publico/listagem.jsp

Generated servlet error:
C:	omcat4worklocalhostNoisnamarcospublicolistagem$jsp.java:24: Undefined variable or class name: rset
         int totSecao = rset.getInt("total"); 
                        ^
1 error, 1 warning

Se alguém souber resolver este problema serei inteiramente grato.

1 Resposta

J

Envie também o trecho de código onde você está usando a variável.

Criado 14 de fevereiro de 2004
Ultima resposta 16 de fev. de 2004
Respostas 1
Participantes 2