<%@page contentType="text/html;charset=gb2312"%>
<%@ page import="java.util.*" %>
<HTML>
<BODY>
<%
	pageContext.setAttribute("pageAttr","pageValue",PageContext.PAGE_SCOPE);
	Enumeration names;
	int scopes[]={PageContext.PAGE_SCOPE,PageContext.REQUEST_SCOPE,PageContext.SESSION_SCOPE,PageContext.APPLICATION_SCOPE};
	String attriName;
	for(int i=0;i<4;i++)
	{
		switch(scopes[i])
		{
			case PageContext.PAGE_SCOPE: out.println("<B>Page:</B><BR>"); break;
			case PageContext.REQUEST_SCOPE: out.println("<B>Request:</B><BR>"); break;
			case PageContext.SESSION_SCOPE: out.println("<B>Session:</B><BR>"); break;
			case PageContext.APPLICATION_SCOPE: out.println("<B>Application:</B><BR>"); break;
		}
		names=pageContext.getAttributeNamesInScope(scopes[i]);
		while(names.hasMoreElements())
		{
			attriName=(String)names.nextElement();out.println("<B>"+attriName+":</B>");
			out.println(pageContext.getAttribute(attriName,scopes[i])); out.println("<BR>");
		}
		out.println("<BR>");
	}
%>
</BODY> 
</HTML>
