Returns whether or not the JSP servlet should be registered with the web server.
@return {@code true} if the servlet should be registered, otherwise {@code false}
353357
protected boolean shouldRegisterJspServlet() {
		return this.jsp != null && this.jsp.getRegistered() && ClassUtils
				.isPresent(this.jsp.getClassName(), getClass().getClassLoader());
	}
1209163
public static boolean isRssEnabled(ServletContext servletContext) {
		// Note: no locking performed since it's ok for two threads to do the work concurrently at first
		Boolean isRssEnabled = (Boolean)servletContext.getAttribute(ISS_RSS_ENABLED_CACHE_KEY);
		if(isRssEnabled == null) {
			try {
				Class.forName(RSS_SERVLET_CLASSNAME);
				isRssEnabled = true;
			} catch(ClassNotFoundException e) {
				isRssEnabled = false;
			}
			servletContext.setAttribute(ISS_RSS_ENABLED_CACHE_KEY, isRssEnabled);
		}
		return isRssEnabled;
	}
228847
static synchronized boolean isJettyAlpnConfigured() {
    try {
      Class.forName("org.eclipse.jetty.alpn.ALPN", true, null);
      return true;
    } catch (ClassNotFoundException e) {
      jettyAlpnUnavailabilityCause = e;
      return false;
    }
  }
848004
public static boolean isJsp21(ServletContext context)
    {
        //if running on GAE, treat like it is JSP 2.0
        if(isRunningOnGoogleAppEngine(context))
        {
            return false;
        }
        
        try 
        {
            // simply check if the class JspApplicationContext is available
            Class.forName("javax.servlet.jsp.JspApplicationContext");
            return true;
        } 
        catch (ClassNotFoundException ex) 
        {
            // expected exception in a JSP 2.0 (or less) environment
        }
        
        return false;
    }
1104625
public boolean isValid() {
    if (mValues.isEmpty()) {
      return false;
    }

    // Check required tags
    for (Tag tag : REQUIRED_TAGS) {
      if (!mValues.containsKey(tag)) {
        return false;
      }
    }

    return true;
  }
704455
public boolean isValidAndEnabled() {

        return (getMode() != null)
            && (getMode() != Mode.disabled)
            && (getPort() > -1)
            && !CmsStringUtil.isEmptyOrWhitespaceOnly(getCertConfigPath())
            && !CmsStringUtil.isEmptyOrWhitespaceOnly(getHost());
    }
354105
@Bean
  public ServletRegistrationBean h2servletRegistration() {
    ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new WebServlet());
    servletRegistrationBean.addUrlMappings("/h2/*");
    return servletRegistrationBean;
  }
638014
public static boolean callbacksRegistered() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "callbacksRegistered");

        if (_syncLevel < 0) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "callbacksRegistered", Boolean.FALSE);
            return false;
        }

        final int maxLevels = _syncLevels.size();
        for (int level = 0; level < maxLevels; level++) {
            final ArrayList syncs = _syncLevels.get(_syncLevel);

            if (syncs != null && !syncs.isEmpty()) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    Tr.exit(tc, "callbacksRegistered", Boolean.TRUE);
                return true;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "callbacksRegistered", Boolean.FALSE);
        return false;
    }
1074294
private boolean isHtmlAcceptable(HttpServletRequest request)
	{
		@SuppressWarnings("unchecked") final List<String> accepts = ListUtility.list(ListUtility.iterate(request.getHeaders(
				HttpHeaderNames.ACCEPT)));

		for (String accept : accepts)
		{
			if (StringUtils.startsWithIgnoreCase(accept, "text/html"))
				return true;
		}

		return false;
	}
710886
protected boolean isAccessPermitted(String resourceName) {

		return !resourceName.startsWith(JawrConstant.WEB_INF_DIR_PREFIX)
				&& !resourceName.startsWith(JawrConstant.META_INF_DIR_PREFIX);
	}
379584
public static boolean isJavaIdentifier( String s )
    {
        if (!Character.isJavaIdentifierStart( s.codePointAt( 0 ) )) return false;

        for (int i = 1; i < s.length(); i++)
        {
            if (!Character.isJavaIdentifierPart( s.codePointAt( i ) )) return false;
        }
        return true;
    }
1257058
public void visit(final WebAppServlet webAppServlet) {
		NullArgumentException.validateNotNull(webAppServlet, "Web app servlet");
		Class<? extends Servlet> servletClass = webAppServlet
				.getServletClass();
		if (servletClass == null && webAppServlet.getServletClassName() != null) {
			try {
				servletClass = RegisterWebAppVisitorHS.loadClass(Servlet.class, bundleClassLoader,
						webAppServlet.getServletClassName());
			} catch (ClassNotFoundException | IllegalAccessException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		if (servletClass != null) {
			//CHECKSTYLE:OFF
			try {
				webContainer.unregisterServlets(servletClass);
				webAppServlet.setServletClass(null);
			} catch (Exception ignore) {
				LOG.warn("Unregistration exception. Skipping.", ignore);
			}
			//CHECKSTYLE:ON
		}
	}
977236
public boolean isSet() {
        if (isUsageMode()) {
            return true;
        }
        if (getJobFile() != null) {
            return true;
        }
        if (getListType() != null) {
            return true;
        }
        return false;
    }
621491
public boolean isHttpSuccess() {
		if (isRevisitDigest() && (getDuplicatePayload() != null)) {
			return getDuplicatePayload().isHttpSuccess();
		}
		String httpCode = getHttpCode();
		return (httpCode.startsWith("2"));
	}
476616
public boolean isRequestedSessionIdValid()
    {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        // 321485
        boolean sessionInvalid = _requestContext.isRequestedSessionIdValid(((WebAppDispatcherContext) this.getDispatchContext()).getWebApp());
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"isRequestedSessionIdValid", " " + String.valueOf(sessionInvalid));
        }
        return sessionInvalid;
    }
915801
public static boolean isAjaxRequest(HttpServletRequest request) {
        String ajaxHeader = request.getHeader("X-Requested-With");
        return StringUtils.isNotBlank(ajaxHeader) && "XMLHttpRequest".equalsIgnoreCase(ajaxHeader);
    }
1342936
@Bean
	public ServletListenerRegistrationBean<EventListener> monitoringSessionListener(
			ServletContext servletContext) {
		final ServletListenerRegistrationBean<EventListener> servletListenerRegistrationBean = new ServletListenerRegistrationBean<>(
				new SessionListener());
		if (servletContext.getFilterRegistration("javamelody") != null) {
			// if webapp deployed as war in a container with MonitoringFilter and SessionListener already added by web-fragment.xml,
			// do not add again
			servletListenerRegistrationBean.setEnabled(false);
		}
		return servletListenerRegistrationBean;
	}