1 24 package org.riotfamily.riot.security.ui; 25 26 import javax.servlet.http.HttpServletRequest ; 27 import javax.servlet.http.HttpServletResponse ; 28 29 import org.riotfamily.common.util.ResourceUtils; 30 import org.riotfamily.riot.security.session.LoginManager; 31 import org.springframework.web.servlet.ModelAndView; 32 import org.springframework.web.servlet.mvc.Controller; 33 34 public class LogoutController implements Controller { 35 36 private String viewName = ResourceUtils.getPath( 37 LogoutController.class, "LogoutView.ftl"); 38 39 public void setViewName(String viewName) { 40 this.viewName = viewName; 41 } 42 43 public ModelAndView handleRequest(HttpServletRequest request, 44 HttpServletResponse response) throws Exception { 45 46 LoginManager.logout(request, response); 47 return new ModelAndView(viewName); 48 } 49 50 } 51 | Popular Tags |