D
Dave
I am still having problems with objects surviving beyond the execution of
the current page (i.e. they are showing up on subsequent requests for the
same page). I have some questions relating to this:
1) When an object is declared within <%! %>, what scope does that object
have? e.g.
<%!
String string1 = "This is a String";
Vector vec1 = new Vector();
%>
How are objects instantiated using the above method treated differently from
<jsp:useBean ...> objects?
2) When an object is declared using <jsp:useBean... > and it's assigned
"page" scope, when is that object cleaned up? Does it have to be explicitly
removed (by using obj=null) or is it garbage collected when the page is
finished being processed?
3) Is there any way to ensure that when an object is instantiated within a
JSP page, it will no longer exist once that page has finished being
processed by the container (i.e. Tomcat in my case)?
TIA.
the current page (i.e. they are showing up on subsequent requests for the
same page). I have some questions relating to this:
1) When an object is declared within <%! %>, what scope does that object
have? e.g.
<%!
String string1 = "This is a String";
Vector vec1 = new Vector();
%>
How are objects instantiated using the above method treated differently from
<jsp:useBean ...> objects?
2) When an object is declared using <jsp:useBean... > and it's assigned
"page" scope, when is that object cleaned up? Does it have to be explicitly
removed (by using obj=null) or is it garbage collected when the page is
finished being processed?
3) Is there any way to ensure that when an object is instantiated within a
JSP page, it will no longer exist once that page has finished being
processed by the container (i.e. Tomcat in my case)?
TIA.