<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        /*
            PAGE_SCOPE = 1;
            REQUEST_SCOPE = 2;
            SESSION_SCOPE = 3;
            APPLICATION_SCOPE = 4;
         */
    %>
    <%
        //pageContext.setAttribute();   方法有三个参数 K,V,作用域
        //作用域有上面四个类型
        pageContext.setAttribute("name","mahe666",PageContext.SESSION_SCOPE);
        //上面这个语句等价于
        session.setAttribute("name","mahe666");
        //但是不建议这么做
    %>
</body>
</html>
