It's because all the implicit objects (request,session,response,out,etc.),
your beans using the jsp tags and any other object declared inside the "<%
... %>" tags are all local variables inside the service method of the
compiled code. This is automatically done by the JSP engine - you can't, to
my knowledge, override this behavior. If you want these objects to be
visible to your custom methods, you will have to pass them as arguments to
your custom methods.
-----Original Message-----
From: Alessio C. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 24, 2001 1:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Closing a DB connection used in a bean
> shouldn't you have an id attribute in the useBean tag also?
>
> <jsp:useBean id="db" scope="session" class="dbClass"/>
yes ok, it was just an example... mine wasn't a syntax problem (i wrote
the tag in the wrong way only in the email, my jsp page syntax is
correct). The problem is: why i can't see the the beans instances, (but
also the objects request, session, out, response, ...) inside a method
declaration?
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets