> 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.
Ok, but i've to override the jspInit() & jspDestroy() methods, and they
don't have arguments....
A way to pass a bean would be:
<jsp:useBean id="b" class="myclass" scope="page"/>
....
<!% public void jspDestroy() {
myclass c;
c.mymethod();
}
%>
....
<% c = b; %>
but it's not a nice way (and i don't know if it would work...)
===========================================================================
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