Code example for Set

Methods: contains

			HttpServletRequest request, HttpServletResponse response, int cacheSeconds, boolean lastModified) 
			throws ServletException { 
		// Check whether we should support the request method. 
		String method = request.getMethod(); 
		if (this.supportedMethods != null && !this.supportedMethods.contains(method)) { 
			throw new HttpRequestMethodNotSupportedException( 
					method, StringUtils.toStringArray(this.supportedMethods)); 
		// Check whether a session is required. 
		if (this.requireSession) { 
			if (request.getSession(false) == null) { 
				throw new HttpSessionRequiredException("Pre-existing session required but none found"); 
		// Do declarative cache control. 
		// Revalidate if the controller supports last-modified. 
		applyCacheSeconds(response, cacheSeconds, lastModified);