当前页面: 开发资料首页 → Java 专题 → 一个使用HashMap的Struts例子
一个使用HashMap的Struts例子
摘要: 一个使用HashMap的Struts例子
</td>
</tr>
<tr>
<td width="356" height="35" valign="top" class="ArticleTeitle"> <%@page import="java.util.*" %>
<%@ page contentType="text/html; charset=GB2312" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%
HashMap animals = new HashMap();
animals.put(new Integer(1), "猫");
animals.put(new Integer(2), "狗");
animals.put(new Integer(3), "马");
animals.put(new Integer(4), "兔子");
animals.put(new Integer(5), "金鱼");
request.setAttribute("animals", animals);
%>
<head>
一个使用HashMap的Struts例子
</head>
<body bgcolor="#ffffff">
一个使用HashMap的Struts例子
</body>
</td>
<td width="328" valign="top" class="ArticleTeitle">
</td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" class="ArticleTeitle">
↑返回目录
前一篇: struts中的日志
后一篇: Struts in Action 中文版(1-8章)