tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Salgueiro ...@sibs.pt>
Subject Re: [Resending Again] Using a Java Bean inside a declaration
Date Tue, 23 May 2000 20:24:22 GMT
OK, I admit, that's stupid and from Craig's message a while ago I
learned
I could use the HttpSessionBindingListener in the bean, which is great.

I don't really know if this compilation problem occurs in every
declaration
or specifically this one. Probably the example is drawing everyone's
attention
to the destroy thing but I really wanted to know if Jasper is
complaining
correctly or if it is a problem in the page.

Thnak you.

Nacho wrote:
> 
> I dont know what you need but why you put the bean in session scope  and
> destroys it at end of page??? perhaps is better to put the bean in page
> scope and listen to unbound event.
> 
> Saludos ,
> Ignacio J. Ortega
> 
> > -----Mensaje original-----
> > De: Bruno Salgueiro [mailto:bs@sibs.pt]
> > Enviado el: lunes 22 de mayo de 2000 18:50
> > Para: tomcat-user@jakarta.apache.org
> > Asunto: [Resending Again] 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
> > =======================================================
> >
> > --------------------------------------------------------------
> > ------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

-- 
=======================================================
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
=======================================================

Mime
View raw message