我是叶霖
问题已经解决 succcess 和xml的success不匹配 多打了一个c?
玖丶
//修改雇员资料动作
public String modify()
{
//获得传递过来的雇员编号
int id =Integer.parseInt(request.getParameter("id"));
EmployeesDAO edao = new EmployeesDAOImpl();
Employees employee=edao.queryEmployeesBySid(id);
//保存在会话中
session.setAttribute("modify_enployees", employee);
return "modify_success";
}
}
<strong>修改雇员资料</strong>
<br>
<br>
<form name="modifyForm" action="<%=path%>/employees/Employees_modify_success.jsp" method="post">
<table width="400" >
<tr>
<td width="30%">雇员编号:</td>
<td><input type="text" name="id" value='<s:property value="#session.modify_employees.id"/>' readonly="readonly"/></td>
</tr>
<tr>
<td width="30%">雇员姓名:</td>
<td><input type="text" name="name" value='<s:property value="#session.modify_employees.name"/>'/></td>
</tr>
<tr>
<td width="30%">服务领域:</td>
<td><input type="text" name="aspect" value='<s:property value="#session.modify_employees.aspect"/>'/></td>
</tr>
<tr>
<td width="30%">月薪:</td>
<td><input type="text" name="price" value='<s:property value="#session.modify_employees.price"/>'/></td>
</tr>
<tr>
<td width="30%">照片:</td>
<td><input type="text" name="picture" value='<s:property value="#session.modify_employees.picture"/>'/></td>
</tr>
<tr>
<td colspan="2" align="center"><input class="button" type="submit" value="修改"></td>
</tr>
</table>
</form>
是不是因为我的id是int类型的,有没有哪位小伙伴知道怎么改的,非常谢谢!
qq_慕前端0489655
你看看Students_add.jsp里面这段代码script type="text/javascript" src="../js/Calendar3.js"></script>
确保有这个js目录下有Calendar3.js,不然日历控件弹不出来
qq_今天真好_0
通过from 表单 把数据传到action(控制器)的addStudent方法中
<form name="addForm" action="<%=path%>/students/addStudent.action" method="post">
勤浇水hehe
也许自己可以尝试一下,老师是没有讲这个
公子鸢3339632
</a>要写在</td>前面的位置
百舸千川
找到了 这是连接数据库的
navicat
qq_傲娇的苦逼孩子_0
那就直接用对象传值
(如:@Autowired
private StudentEntity stu;)
这样用spring注入后,直接传对象(stu)感觉也是很爽!
xiao55555
标签里用moddify_students结果也是白框
墨鱼丸
野英狼
又报错了T_T
3-7,3-8,3-9三个小节是关于添加的内容