Single-line Java comments are copied to the generated servlet : Introduction « JSP « Java Tutorial






<!-- Here is an HTML comment - copied to the output -->

<%! // Single-line Java comments are copied to the generated servlet.

  /** This is a Javadoc comment, used to document Java functions */
  public void someMethod() {
    /* Multi-line Java comment, useful to comment out
       blocks of code during the development cycle.
       This sort of comment is copied to the generated servlet.
    */
  }
%>

<HTML>
  <HEAD>
    <TITLE>Comments in a JSP</TITLE>
  </HEAD>
  <BODY>
    <% // A Java comment inside a scriptlet - copied into the generated servlet %>
    Java and JSP comments.
    <%-- A JSP comment - not copied to the servlet, or the output --%>
  </BODY>
</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