Skip to content
velna edited this page Nov 7, 2012 · 1 revision

返回

如果你的model类继承了org.sothis.web.mvc.ModelAndViewSupport,那么你只要简单的一句

  return model.redirect("http://some.com/else/path");

就可以了

或者你也可以这样写:

  model.setViewType("redirect");
  model.setViewParam("statusCode", HttpServletResponse.SC_MOVED_PERMANENTLY);//默认是HttpServletResponse.SC_MOVED_TEMPORARILY
  model.setViewParam("location", location);

返回

Clone this wiki locally