What is the scope of a java class that is loaded inside a JSP page? My
java class follows the Singleton pattern. If my JSP page is unloaded, is
the Singleton destroyed by the JVM? what if I click "back" in my browser
and return to the JSP page?
Thanks in advance.
Jorge Quintero.
07-12-2000, 10:51 AM
Paul Clapham
Re: JSP question...
I don't know the anwer to the first question, but if you click "back" in the
browser it will simply redisplay the HTML that it saved from the previous
time it displayed the page. It will not go back to the server unless you
click on "reload"... which brings you back to your first question.
Jorge Quintero <dsw86@hotmail.com> wrote in message
news:396b5c98$1@news.devx.com...
>
> Hi guys,
>
> I have a question:
>
>
> What is the scope of a java class that is loaded inside a JSP page? My
> java class follows the Singleton pattern. If my JSP page is unloaded, is
> the Singleton destroyed by the JVM? what if I click "back" in my browser
> and return to the JSP page?
>
>
> Thanks in advance.
>
> Jorge Quintero.
07-14-2000, 05:02 PM
John Timney (MVP)
Re: JSP question...
the scope is the same as if you loaded it in a java program rather than a
jsp, if you dump the class into a session variable then it could have wider
scope.
if your page is unloaded and you click back you will get whats in your
browser buffer until you reload the page, after all its just html or text in
the page.
Regards
John Timney (MVP)
Jorge Quintero <dsw86@hotmail.com> wrote in message
news:396b5c98$1@news.devx.com...
>
> Hi guys,
>
> I have a question:
>
>
> What is the scope of a java class that is loaded inside a JSP page? My
> java class follows the Singleton pattern. If my JSP page is unloaded, is
> the Singleton destroyed by the JVM? what if I click "back" in my browser
> and return to the JSP page?
>
>
> Thanks in advance.
>
> Jorge Quintero.