结论:jsp注释不会被传输到浏览器端。
创建
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>JSP注释 <%--这个是JSP注释 --%>
访问该jsp
http://localhost:8080/chapter06/example02.jsp
jsp被翻译成java的核心源代码如下:
try {
response.setContentType("text/html; charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("rn");
out.write("rn");
out.write("rn");
out.write("rn");
out.write("rn");
out.write("JSP注释 rn");
out.write("rn");
out.write("rn");
out.write("trn");
out.write("t");
out.write("rn");
out.write("rn");
out.write("");



