Created
May 27, 2013 10:37
-
-
Save relax-more/5656410 to your computer and use it in GitHub Desktop.
[java][spring] springMVC で、redirectする方法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestMapping("test/loggin") | |
public ModelAndView getLogginUrl(@PathVariable("language") String language, HttpServletRequest request, HttpServletResponse response) { | |
setLocale(language, request, response); | |
ModelAndView mav = new ModelAndView(); | |
String logginPageUrl = getLogginPageURL(); | |
// ポイントはここ。 redirect: を prefix に設定すればよい | |
mav.setViewName("redirect:" + logginPageUrl); | |
return mav; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment