从petstore上看,org.springframework.web.servlet.mvc.Controller相当于org.apache.struts.action.Action
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
return new ModelAndView("Cart", "cart", cart);//其中"Cart"是viewName其实就是对应的Cart.jsp,"cart"是modelName
}
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
return mapping.findForward("success");
}
ModelAndView与ActionForward