在Struts Action中跳转一般是用return mapping.findForward("file_delete_one");
但如果要在后面带参数了,则需要如下的处理才行:
ActionForward forward=mapping.findForward("file_delete_one");
ActionForward newForward=new ActionForward();
String newPath=forward.getPath() +"&attTFileTable="+attTFileTable+"&type="+type+"&infoId="+infoId;
newForward.setPath(newPath);
//newForward.setRedirect(true); //是否以sendRedirect方式跳转
return newForward;
此中方法是一种比较的方法,还有一种方法,则是使用
response.sendRedirect(url);
return null;
这种方式来进行跳转,使用哪种方式看具体程序来定,不过个人认为还是使用第一种方式比较好.
浙公网安备 33010602011771号