Code example for WebRequest

Methods: getAttribute, removeAttribute, setAttribute

0
		} 
	} 
 
	private boolean decrementParticipateCount(WebRequest request) { 
		String participateAttributeName = getParticipateAttributeName(); 
		Integer count = (Integer) request.getAttribute(participateAttributeName, WebRequest.SCOPE_REQUEST); 
		if (count == null) { 
			return false; 
		} 
		// Do not modify the Session: just clear the marker. 
		if (count > 1) { 
			request.setAttribute(participateAttributeName, count - 1, WebRequest.SCOPE_REQUEST); 
		} 
		else { 
			request.removeAttribute(participateAttributeName, WebRequest.SCOPE_REQUEST); 
		} 
		return true; 
	} 
 
	@Override 
Experience pair programming with AI  Get Codota for Java