Sunday, August 16, 2015

User Logout Controller

1:12 AM

package com.education.vidyarthi.online;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value = "/user/logout")
public class UserLogOutController {
    @RequestMapping(method = RequestMethod.GET)
    public ModelAndView logOut(HttpSession session) {
        session.invalidate();
        return new ModelAndView("redirect:userlogin.html");
    }

}

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 comments:

Post a Comment

 

© 2013 Java Tutorials. All rights resevered. Designed by Templateism

Back To Top