Code example for ServletWebRequest

Methods: getRequest, getResponse, setAttribute

0
			 
			if (rememberMeServices != null 
					&& webRequest instanceof ServletWebRequest) { 
				 
				ServletWebRequest servletWebRequest = ((ServletWebRequest) webRequest); 
				rememberMeServices.loginSuccess(servletWebRequest.getRequest(), 
						servletWebRequest.getResponse(), newAuthentication); 
			} 
		} 
		 
		/** 
		 * This connection may have been instigated by an  
		 * access denied handler which may have saved the 
		 * original request made by the user before their access 
		 * was denied.   
		 *  
		 * Spring Social sends the user to a particular view 
		 * on completion of connection.  We may wish to offer the 
		 * user a "continue" link on this view, allowing their 
		 * original request (if saved by the access denied handler) 
		 * to be re-attempted 
		 * 
		 */ 
		if (webRequest instanceof ServletWebRequest) 
		{ 
			ServletWebRequest servletWebRequest 
			= (ServletWebRequest)webRequest; 
			SavedRequest savedRequest = requestCache.getRequest(servletWebRequest.getRequest(), servletWebRequest.getResponse()); 
			if (savedRequest != null) 
			{ 
				String redirectUrl = savedRequest.getRedirectUrl(); 
				if (redirectUrl != null && savedRequest.getMethod().equalsIgnoreCase("get")) 
				{ 
					servletWebRequest.setAttribute(SAVED_REQUEST_URL_ATTRIBUTE_NAME, savedRequest.getRedirectUrl(), RequestAttributes.SCOPE_SESSION); 
				} 
			} 
		} 
	} 
 
Connect your IDE to all the code out there  Get Codota for Java