JSP Hidden Comment is not visible to the viewer in source code. JSP Engine does not pass the code that is between <%-- and --%>. JSP Hidden comments are just for the developer to provide some comments about the code.
JSP Hidden Comment Example:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>JSP Tutorial </title> </head> <body> <%-- This is a Hidden Comment. --%>
Hi, Welcome to JSP Tutorials
When the above JSP run on the server, JSP Engine does not pass the code between <%-- and --%> as it is and it does not appears on source code of HTML Page on browser.
JSP Hidden comment starts with <%-- and ends with --%>