Using jspInit and jspDestroy : JSP Page Lifecycle « JSP « Java






Using jspInit and jspDestroy

<HTML>
  <HEAD>
    <TITLE>Using jspInit and jspDestroy</TITLE>
  </HEAD>

  <BODY>
    <H1>Using jspInit and jspDestroy</H1>
    <%!
    int number;

    public void jspInit()
    {
      number = 5;
    }

    public void jspDestroy()
    {
      number = 0;
    }
    %>

    <%
    out.println("The number is " + number + "<BR>");
    %>
  </BODY>
</HTML>


           
       








Related examples in the same category