列表
==================================================================
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<div><a href="add.jsp">添加</a> </div>
<s:iterator value="deptList">
<s:property value="deptId"/>
<s:property value="deptName"/>
<a href="deptchaOne.action?dept.deptId=<s:property value="deptId"/>">修改</a> <a href="deptdelete.action?dept.deptId=<s:property value="deptId"/>">删除</a>
</br>
</s:iterator>
</body>
</html>
==============================================================
增加
===================================================================
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<s:form action="deptadd.action" method="post">
<s:textfield label="部门名称" name="dept.deptName"></s:textfield>
<s:submit value="提交"></s:submit>
</s:form>
</body>
</html>
===================================================================
修改
======================================================================
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<s:form action="deptupdate.action?dept.deptId = %{dept.deptId}" method="post">
<s:textfield label="部门名称" value="%{dept.deptName}" name="dept.deptName"></s:textfield>
<s:submit value="提交"></s:submit>
</s:form>
</body>
</html>