求助啊,关于struts1 的request问题
public ActionForward save(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
Lease L = (Lease)form;
leaseLogic.save(L);
System.out.println(L.getAlId());
Integer leaseId = L.getAlId();
//request.setAttribute("leaseId", leaseId);
request.setAttribute("Leaseinfo", "lease.do?method=showLeaseList&leaseId="+L.getAlId());
//request.getAttribute("Leaseinfo");
return mapping.findForward("LeaseInfo");
}
public ActionForward showLeaseList(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception{
String leaseIdStr = ParamUtil.getParameter(request, "leaseId");
System.out.println("leaseIdStr="+leaseIdStr);
Lease lease = null;
if(leaseIdStr!=null && !"".equals(leaseIdStr)){
lease = leaseLogic.getById(Integer.parseInt(leaseIdStr));
request.setAttribute("lease", lease);
}
return mapping.findForward("showlist");
求大家帮忙看下啊,我现在插入功能好使,但是第二个action里获取不到leaseId,我快被折磨疯了,恳求大家帮忙结合代码看下,谢谢了!!!!