InfoCenter Home > 4.2.2.3.2: JSP syntax: Class-wide variables and methodsUse the <SCRIPT> and </SCRIPT> tags to declare class-wide variables and class-wide methods for the servlet class. The general syntax is: <script runat=server> // code for class-wide variables and methods </script> The attribute runat=server is required and indicates that the tag is for server-side processing. An example of specifying class-wide variables and methods: <script runat=server> // class-wide variables init i = 0; String foo = "Hello"; // class-wide methods private void foo() {// code for the method} </script> |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|