比如这样
public ActionForward doAdd(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
ByForm ByForm = (ByForm) form;
TbBy tbBy=ByForm.getBy();
HttpSession session=request.getSession();
TbAdmin tbAdmin=(TbAdmin)session.getAttribute("admin1");
biz.add(tbBy, tbAdmin);
try {
request.getRequestDispatcher("by.do?o=doList").forward(request, response);
} catch (ServletException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
每次一执行到跳转的时候就报错