Hi,

The problem you're describing is totally different.
The command: <jsp:useBean id="Bean1" class="html.Bean1" scope="page"/>
defines Bean1 as a page scope bean, which means that a new bean instance
would be created for each execution of this bean.
If you want to use a "static" counter which is implemented within the bean
you should set the scope of the bean to "application".


Best Regards,
Oren Klichevsky
www.mannainc.com <http://www.mannainc.com>



-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Herbert Pfleger
Sent: Tuesday, July 25, 2000 3:03 PM
To: [EMAIL PROTECTED]
Subject: Re: refresh


Hi All,
thanks for your help, but it still doesnt work. So I try to tell you my
problem
again.
I have a jsp-page with:

<%@ page session="true"  import = "html.*" %>
<jsp:useBean id="Bean1" class="html.Bean1" scope="page"/>
....
<%= Bean1.getA() %>.

Her A in Bean1 has the value 1.
After that A in Bean1 changes to 2.
So I am implementing a Refresh-Button with:

<INPUT name=Refresh  type=button value=Refresh
onClick="javascript:refresh()">
<script language="javascript">
function refresh(){  window.location.reload();  }
</script>

When I press this button <%= Bean1.getA() %> should show a 2, but it always
stays 1.
So i hope anybody can tell me how to do this.
Thanks
Herb

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
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".
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

Reply via email to