Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Controller
- @RequestMapping(value = "/login")
- public class Login{
- @RequestMapping
- public ModelAndView mainPage(HttpServletRequest request){
- request.getSession().setAttribute("testSession", "Session test");
- return new ModelAndView("/login");
- }
- @RequestMapping(value = "/check")
- public View check(HttpServletRequest request){
- System.out.println(request.getSession(false)); //null
- return new RedirectView("/login");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement