Using Beans and Session Scope : Bean Scope « JSP « Java

Using Beans and Session Scope

        <TITLE>Using Beans and Session Scope</TITLE>

        <H1>Using Beans and Session Scope</H1>

        <jsp:useBean id="bean1" class="beans.Counter" scope="session" />

        bean1.setCounter(bean1.getCounter() + 1);
        The counter value is: <jsp:getProperty name="bean1" property="counter" /> 

       89 k)

Related examples in the same category

1.Using Bean Scope Page
2.Using Bean Scope Request
3.Using Bean Scope Application
4.Using Beans and Page Scope