application和page对象

application和page对象application和page对象

<h1>application内置对象</h1>
<%
application.setAttribute("city", "北京");
application.setAttribute("postcode", "10000");
application.setAttribute("email", "@123.com");


%>
所在城市是: <%=application.getAttribute("city") %><br>
application中的属性有:<%
Enumeration attributes=application.getAttributeNames();
while(attributes.hasMoreElements()){
out.println(attributes.nextElement()+"&nbsp;");
}
%><br>
jsp引擎名及版本号:<%=application.getServerInfo() %>

application和page对象