Java Tutorial/JSP/JSP init destroy

Материал из 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>