List of usage examples for javax.servlet.http HttpSession removeAttribute
public void removeAttribute(String name);
From source file:com.pkrete.locationservice.admin.controller.mvc.LanguageController.java
protected void updateUser(HttpServletRequest request) { HttpSession session = request.getSession(); session.removeAttribute("user"); session.setAttribute("user", usersService.getUser(request.getRemoteUser())); }
From source file:cn.ccrise.spimp.web.LoginController.java
@RequestMapping(value = "/logout", method = RequestMethod.GET) public String logout(HttpSession httpSession) { // session/* w w w. j av a2s . c o m*/ httpSession.removeAttribute(PropertiesUtils.getString(PropertiesUtils.SESSION_KEY_PROPERTY)); return "redirect:" + PropertiesUtils.getString(PropertiesUtils.LOGIN_PATH_PROPERTY); }
From source file:com.faujnet.signin.adapter.SimpleSignInAdapter.java
private void removeAutheticationAttributes(HttpSession session) { if (session == null) { return;/*from ww w. j a v a 2 s . c o m*/ } session.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); }
From source file:info.toegepaste.www.controller.LoginController.java
public String logOut() { FacesContext context = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession) context.getExternalContext().getSession(true); session.removeAttribute("docent"); return "login"; }
From source file:authentication.PreAuthenticatedUserFilter.java
/** {@inheritDoc} */ @Override/*from w w w. j a v a 2 s . c om*/ public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException { final HttpServletRequest req = (HttpServletRequest) request; try { super.doFilter(request, response, chain); } finally { SecurityContextHolder.clearContext(); final HttpSession session = req.getSession(false); if (session != null) { session.removeAttribute("SPRING_SECURITY_CONTEXT"); } } }
From source file:com.lewischooman.services.WebpageSrv.java
@Override public void logout(HttpSession httpSession) { httpSession.removeAttribute(Utility.LOGGED_IN_USER_ATTRIBUTE); }
From source file:org.glassmaker.spring.oauth.OAuth2AuthenticationFilter.java
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws ServletException, IOException { SavedRequest savedRequest = new HttpSessionRequestCache().getRequest(request, response); if (savedRequest == null) { return;//from w w w . ja v a2s. c o m } HttpSession session = request.getSession(); session.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); // Use the DefaultSavedRequest URL String targetUrl = savedRequest.getRedirectUrl(); logger.debug("Redirecting to DefaultSavedRequest Url: " + targetUrl); response.sendRedirect(targetUrl); }
From source file:org.openmrs.module.conceptsearch.web.controller.BasicSearchFormController.java
@RequestMapping(value = "/module/conceptsearch/basicSearch", method = RequestMethod.GET) public void showBasicSearch(ModelMap model, WebRequest request, HttpSession session) { //display basicSearch.jsp session.removeAttribute("searchResult"); session.removeAttribute("sortResults"); session.removeAttribute("conceptSearch"); }
From source file:com.codesolid.goalboost.social.SimpleSignInAdapter.java
private void removeAuthenticationAttributes(HttpSession session) { if (session == null) { return;//from w ww .j a v a 2 s. c o m } session.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); }
From source file:net.firejack.platform.utils.SessionManager.java
/** * @param token// w w w .j a v a2s .c o m */ public void cleanSession(String token) { HttpSession session = sessionsMap.remove(token); if (session != null) { session.removeAttribute(SESSION_USER_INFO_PARAM); } }