You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bruno Salgueiro <bs...@sibs.pt> on 2000/05/08 19:06:31 UTC
[Resend] Using a Java Bean inside a declaration
Hi everyone,
In the JSP 1.1 spec it says that if you implement the jspDestory()
method it should be called when the page is destroyed, if I'm not
mistaken (it is one of the API contracts). Can I use a declaration
to override it and close connections cleanly?
I tried the following (which BTW may be very stupid but here it
goes):
<jsp:useBean id="bdcon" class="bd.BDBean" scope="session">
...
<%! public void jspDestroy() {
bdcon.Disconnect();
}
%>
Jasper complains loudly when it tries to compile the page
because he does not know what the object bdcon is.
Can someone help me with this scope error?
Regards,
--
=======================================================
Bruno Salgueiro (mailto:bs@sibs.pt)
SIBS - Sociedade Interbancária de Serviços
Rua Soeiro Pereira Gomes, Lote 1, 1600 Lisboa, Portugal
Tel: + 351 21 791 88 33
Fax: + 351 21 794 24 40
http://www.sibs.pt
Esta mensagem foi assinada com certificado MULTIcert.
Para obter o certificado da Autoridade de Certificação
PILOTO MULTIcert dirija-se ao site
http://www.sibs.multicert.com
"Computers are useless. They can only give you answers."
--Pablo Picasso
=======================================================