Session » mudar um valor de uma variável

1 resposta
proteus_adi
bom,

eu tenho o código:

<%

session.setAttribute(var,0);

session.setAttribute(var,10);

String resposta = session.getAttribute(var);

out.print(resposta);

%>

isso ai tá escrevendo 0 na tela…
pq?

1 Resposta

Rafael_Nunes

Aqui tá escrevendo “10”.

Aliás, o teu nem deveria estar funcionando, tenta:

String resposta = (String)session.getAttribute("var");
Criado 6 de abril de 2005
Ultima resposta 6 de abr. de 2005
Respostas 1
Participantes 2