docs: private FilterChainContents getFilterChainContents(String reqURI, String reqServletName, DispatcherType dispatcherType, boolean servletIsInternal) {
          final boolean isTraceOn = com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && logger.isLoggable(Level.FINE)) {
              logger.entering(CLASS_NAME, "getFilterChainContents", "reqUri->" + reqURI + ", reqServletName->" + reqServletName + ", mode->" + dispatcherType
                              + ", servletIsInternal->" + servletIsInternal);
          }
          FilterChainContents fcc = null;
          String strippedUri = null;
  
          // search for existing filter chains by URI (if not null) else by name
          if (reqURI != null) {
              int queryIndex = reqURI.indexOf("?");
              if (queryIndex > 0) {
                  strippedUri = reqURI.substring(0, queryIndex);
              } else {
                  strippedUri = reqURI;
              }
  
              // begin 262685: strip off any path elements after ;
              int semicolon = strippedUri.indexOf(';');
              if (semicolon != -1) {
                  strippedUri = strippedUri.substring(0, semicolon);
              }
              // end 262685: strip off any path elements after ;
  
              if (isTraceOn && logger.isLoggable(Level.FINE)) {
                  logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "strippedUri->" + strippedUri);
              }
  
              // 144464 end part 1
              // see if the chain has been previously constructed (look for a
              // filter contents object)
              if (dispatcherType == DispatcherType.REQUEST) {
                  fcc = (FilterChainContents) chainCache.get(strippedUri);
                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter request mode, get cache entry fcc->" + fcc);
                  }
              } else if (dispatcherType == DispatcherType.FORWARD) {
                  fcc = (FilterChainContents) forwardChainCache.get(strippedUri);
                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter forward mode, get cache entry fcc->" + fcc);
                  }
              } else if (dispatcherType == DispatcherType.INCLUDE) {
                  fcc = (FilterChainContents) includeChainCache.get(strippedUri);
                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter include mode, get cache entry fcc->" + fcc);
                  }
              } else if (dispatcherType == DispatcherType.ERROR) {
                  fcc = (FilterChainContents) errorChainCache.get(strippedUri);
                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter error mode, get cache entry fcc->" + fcc);
                  }
              }
  
          } else {
              if (dispatcherType == DispatcherType.REQUEST) {
                  fcc = (FilterChainContents) chainCache.get(reqServletName);
                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter request mode, get cache entry fcc->" + fcc);
                  }
              } else if (dispatcherType == DispatcherType.FORWARD) {
                  fcc = (FilterChainContents) forwardChainCache.get(reqServletName);
                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter forward mode, get cache entry fcc->" + fcc);
                  }
              } else if (dispatcherType == DispatcherType.INCLUDE) {
                  fcc = (FilterChainContents) includeChainCache.get(reqServletName);
                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter include mode, get cache entry fcc->" + fcc);
                  }
              } else if (dispatcherType == DispatcherType.ERROR) {
                  fcc = (FilterChainContents) errorChainCache.get(reqServletName);
                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter error mode, get cache entry fcc->" + fcc);
                  }
  
              }
  
          }
  
          if (fcc == null) {
              // no current chain...build one
              int i;
  
              // create a filter contents object so we can store it and avoid
              // doing this step again
              fcc = new FilterChainContents();
  
              // check the uri against the uri filter mapping list
              IFilterMapping fmInfo;
              int nbrOfMappings;
  
              if (strippedUri != null) {
                  List<IFilterMapping> uriFilterMappings = webAppConfig.getUriFilterMappings();
                  if (uriFilterMappings != null) {
                      nbrOfMappings = uriFilterMappings.size();
  
                      if (isTraceOn && logger.isLoggable(Level.FINE)) {
                          logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "number of uri filter mapping->" + nbrOfMappings);
                      }
                      for (i = 0; i < nbrOfMappings; i++) {
                          fmInfo = (IFilterMapping) uriFilterMappings.get(i);
                          if (isTraceOn && logger.isLoggable(Level.FINE)) {
                              logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter mapping info->" + fmInfo);
                          }
                          if ((servletIsInternal || servletIsInternal == fmInfo.getFilterConfig().isInternal())
                                          && (uriMatch(strippedUri, fmInfo, dispatcherType))) { // 144464
                              // part
                              // 3
                              fcc.addFilter(fmInfo.getFilterConfig().getFilterName());
                          }
                      }
                  }
              }
  
              // check the requested servlet name against the servlet filter
              // mapping list
              List<IFilterMapping> servletFilterMappings = webAppConfig.getServletFilterMappings();
              if (servletFilterMappings != null) {
                  nbrOfMappings = servletFilterMappings.size();
  
                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "number of servlet filter mapping->" + nbrOfMappings);
                  }
                  for (i = 0; i < nbrOfMappings; i++) {
                      fmInfo = (IFilterMapping) servletFilterMappings.get(i);
                      String filterServlet = fmInfo.getServletConfig().getServletName();
                      if (isTraceOn && logger.isLoggable(Level.FINE)) {
                          logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "filter mapping info->" + fmInfo);
                      }
                      if (filterServlet != null) {
                          if (reqServletName.equals(filterServlet)) {
                              if (isTraceOn && logger.isLoggable(Level.FINE)) {
                                  logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "matches servlet name");
                              }
                              for (int j = 0; j < fmInfo.getDispatchMode().length; j++) {
                                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "current dispatch mode->"
                                                      + fmInfo.getDispatchMode()[j]);
                                  }
                                  if ((servletIsInternal || servletIsInternal == fmInfo.getFilterConfig().isInternal())
                                                  && (dispatcherType == fmInfo.getDispatchMode()[j])) {
                                      fcc.addFilter(fmInfo.getFilterConfig().getFilterName());
                                      break;
                                  }
                              }
                          }
                          // begin, ADDED for Servlet 2.5 SRV.6.2.5
                          else if (filterServlet.equals("*")) {
                              if (isTraceOn && logger.isLoggable(Level.FINE)) {
                                  logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "matches *");
                              }
                              for (int j = 0; j < fmInfo.getDispatchMode().length; j++) {
                                  if (isTraceOn && logger.isLoggable(Level.FINE)) {
                                      logger.logp(Level.FINE, CLASS_NAME, "getFilterChainContents", "current dispatch mode->"
                                                      + fmInfo.getDispatchMode()[j]);
                                  }
                                  if (fmInfo.getDispatchMode()[j] == DispatcherType.FORWARD
                                                  || fmInfo.getDispatchMode()[j] == DispatcherType.INCLUDE) {
                                      if ((servletIsInternal || servletIsInternal == fmInfo.getFilterConfig().isInternal())
                                                      && (dispatcherType == fmInfo.getDispatchMode()[j])) {
                                          fcc.addFilter(fmInfo.getFilterConfig().getFilterName());
                                          break;
                                      }
                                  }
                              }
                          }
                      } else if (logger.isLoggable(Level.WARNING)) { // 306998.15
                          logger.logp(Level.WARNING, CLASS_NAME, "getFilterChainContents", "Null.Filter.Mapping");
                      }
                      // end, ADDED for Servlet 2.5 SRV.6.2.5
                  }
              }
  
              // add the new chain contents to the chain list, indexed by the uri
              // or name
              if (strippedUri != null) {
                  if (dispatcherType == DispatcherType.REQUEST)
                      chainCache.put(strippedUri, fcc);
                  else if (dispatcherType == DispatcherType.FORWARD)
                      forwardChainCache.put(strippedUri, fcc);
                  else if (dispatcherType == DispatcherType.INCLUDE)
                      includeChainCache.put(strippedUri, fcc);
                  else if (dispatcherType == DispatcherType.ERROR)
                      errorChainCache.put(strippedUri, fcc);
              } else {
                  if (dispatcherType == DispatcherType.REQUEST)
                      chainCache.put(reqServletName, fcc);
                  else if (dispatcherType == DispatcherType.FORWARD)
                      forwardChainCache.put(reqServletName, fcc);
                  else if (dispatcherType == DispatcherType.INCLUDE)
                      includeChainCache.put(reqServletName, fcc);
                  else if (dispatcherType == DispatcherType.ERROR)
                      errorChainCache.put(reqServletName, fcc);
              }
  
              // 144464 part 4
          }
          if (isTraceOn && logger.isLoggable(Level.FINE)) {
              logger.exiting(CLASS_NAME, "getFilterChainContents");
          }
  
          return fcc;
      }