Contents | Prev | Next


Hidden Comment

Documents the JSP page but is not sent to the client.

Syntax

<%-- comment --%>

Examples

<%@ page language="java" %>
<html>
<head><title>A Comment Test</title></head>
<body>
<h2>A Test of Comments</h2>
<%-- This comment will not be visible in the page source --%>
</body>
</html>

Description

A hidden comment marks text or lines that the JSP container should ignore. A hidden comment is useful when you want to hide or "comment out" part of your JSP page. The JSP container does not process anything within the <%-- and --%> characters. A hidden comment is not sent to the client, either in the displayed JSP page or the page source.

You can use any characters in the body of the comment except the closing --%> combination. If you need to use --%> in your comment, you can escape it by typing --%\>.

See Also



Contents | Prev | Next

Copyright © 2000, Sun Microsystems, Inc. All rights reserved.