Declaration Tag - Methods : Introduction « JSP « Java Tutorial






<%!
  private String getNephewName()
  {
    return "J";
  }

  private int getNephewAge()
  {
    return 3;
  }
%>

<HTML>
  <HEAD><TITLE>Declaration Tag - Methods</TITLE></HEAD>

  <%= getNephewName() %>, age <%= getNephewAge() %>, is one funny kid!

  
</HTML>








23.1.Introduction
23.1.1.A Web Page with JSP code
23.1.2.JSP code tag
23.1.3.Using a Literal
23.1.4.Prints a conversion table of miles per gallon to kilometers per liter
23.1.5.ASCII Table
23.1.6.Divide jsp page to several parts
23.1.7.Output HTML tags
23.1.8.Selected System Properties
23.1.9.Output Selected System Properties in a table
23.1.10.Page session false
23.1.11.Single-line Java comments are copied to the generated servlet
23.1.12.Declaration Tag Example
23.1.13.Declaration Tag - Methods
23.1.14.Multiple Declaration
23.1.15.Mix Jsp code with HTML tags
23.1.16.Embedding Code
23.1.17.Use out
23.1.18.Jsp page without Java code
23.1.19.Jsp page with XML namespace