-
Notifications
You must be signed in to change notification settings - Fork 5
Redirect view
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);