update更新失败
// 进行修改
public String updateCompany() {
// 修改
try {
TEmployee employee = (TEmployee) request.getSession().getAttribute(
"employee");
if (employee != null) {
companyInfo.setStatus(1);
Integer countsPrice = (Integer) request.getSession()
.getAttribute("countsPrice");
companyInfo.setEmpId(employee.getEmpId());
companyInfo.setSolutionPrice(String.valueOf(countsPrice));
companyInfoBiz.updateCompany(companyInfo);
// 清空companyInfo内容 进行首页查询
this.request.setAttribute("message", "修改成功");
// 在页面显示修改后信息
request.setAttribute("company", companyInfo);
// url = "/WEB-INF/company/switch.jsp";
// return Action.SUCCESS;
} else {
this.request.setAttribute("message", "登录超时");
}
} catch (Exception e) {
this.request.setAttribute("message", "修改失败,请重试!");
e.printStackTrace();
}
if (companyInfo != null) {
companyInfo = null;
}
url = "/WEB-INF/company/companyList.jsp";
return getCompanyListFromRole();
}
为什么注掉 // url = "/WEB-INF/company/switch.jsp";
// return Action.SUCCESS;更新就成功了 否则失败