application和page对象

来源:互联网 发布:苹果cms多功能手机模板 编辑:程序博客网 时间:2024/06/04 19:09

<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() %>




阅读全文
0 0
原创粉丝点击