Announcement Announcement Module
Collapse
No announcement yet.
Spring inheritance Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring inheritance

    Hi All,

    I'm new here.

    I've a controller class that responsible to invalidate current user's session. The logout button is placed in the topmenu.jsp which is only imported in other pages. These pages also contain other forms, their controllers are extending the first one. The problem is when the logout button is clicked the post method which responsible for that and placed in parent controller doesn't invoked.

    What am I doing wrong?

    Code:
     @RequestMapping(value = "logout", method = RequestMethod.POST)
        public String logout(HttpSession session) {
            User user = (User) session.getAttribute("user");
            if (user != null) {
                session.invalidate();
            }
            return "redirect:login.htm";
        }
    Thanks!
Working...
X