有没有同样问题的同学
//修改雇员资料动作
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类型的,有没有哪位小伙伴知道怎么改的,非常谢谢!