public RedirectViewControllerRegistration(String urlPath, String redirectUrl) { Assert.notNull(urlPath, "'urlPath' is required."); Assert.notNull(redirectUrl, "'redirectUrl' is required."); this.urlPath = urlPath; this.redirectView = new RedirectView(redirectUrl); this.redirectView.setContextRelative(true); this.controller.setView(this.redirectView); }
public RedirectViewControllerRegistration(String urlPath, String redirectUrl) { Assert.notNull(urlPath, "'urlPath' is required."); Assert.notNull(redirectUrl, "'redirectUrl' is required."); this.urlPath = urlPath; this.redirectView = new RedirectView(redirectUrl); this.redirectView.setContextRelative(true); this.controller.setView(this.redirectView); }
@Test public void redirectView() throws Exception { RedirectView view = new RedirectView("/foo"); this.controller.setView(view); ModelAndView modelAndView = this.controller.handleRequest(this.request, this.response); assertSame(view, modelAndView.getView()); }
public RedirectViewControllerRegistration(String urlPath, String redirectUrl) { Assert.notNull(urlPath, "'urlPath' is required."); Assert.notNull(redirectUrl, "'redirectUrl' is required."); this.urlPath = urlPath; this.redirectView = new RedirectView(redirectUrl); this.redirectView.setContextRelative(true); this.controller.setView(this.redirectView); }