显示注释 -- 可以通过查看源代码看到
	<!-- 第一种注释 --> 
	隐式注释 --  源代码中看不到
	<%--jsp注释---%>
	<%
		//单行注释
		/*
			多行注释
		*/
	%>
表示脚本小程序,所有嵌入HTML中的java代码都必须使用Scriplet标记出来
scriplet表示有三种方法
<%%> 可以定义局部变量
<%!%> 定义全局变量,方法,类
<%=%> 输出一个变量或者具体的一个内容
显示注释 -- 可以通过查看源代码看到
<!-- 第一种注释 --> 
隐式注释 --  源代码中看不到
<%--jsp注释---%>
<%
//单行注释
/*
多行注释
*/
%>
表示脚本小程序,所有嵌入HTML中的java代码都必须使用Scriplet标记出来
scriplet表示有三种方法
<%%> 可以定义局部变量
<%!%> 定义全局变量,方法,类
<%=%> 输出一个变量或者具体的一个内容\
<%
    //第一种Scriplet
    int i = 10;
    int y = 20;
    out.print(i + y);
%>
<%!
        //第二种scriplet
        public static final int I=123;
        public int add(int x,int y){
            return x+y;
        }
%>
<%!
        class Person{
            private String name;
            public Person(String name){
                this.name=name;
            }
            public String toString(){
                return "name="+name;
            }
        }
%>
<%
    out.println(I);
    out.println(add(1, 2));
    out.println("<h3>"+new Person("小明").toString()+"            
       <h3>");    //out.print()是语句。必须在<% % >中编写
%>
<!--第三种scriplet--> <h3>name=<%="xiaoming"%></h3>
原文:https://www.cnblogs.com/autokblogs/p/8894229.html