当前位置: 首页>>代码示例>>Java>>正文


Java FilterMap.REQUEST属性代码示例

本文整理汇总了Java中org.apache.tomcat.util.descriptor.web.FilterMap.REQUEST属性的典型用法代码示例。如果您正苦于以下问题:Java FilterMap.REQUEST属性的具体用法?Java FilterMap.REQUEST怎么用?Java FilterMap.REQUEST使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.tomcat.util.descriptor.web.FilterMap的用法示例。


在下文中一共展示了FilterMap.REQUEST属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getApplicationFilterMaps

@Override
public List<FilterMapping> getApplicationFilterMaps(Context context) {
  FilterMap[] fms = context.findFilterMaps();
  List<FilterMapping> filterMaps = new ArrayList<>(fms.length);
  for (FilterMap filterMap : fms) {
    if (filterMap != null) {
      String dm;
      switch (filterMap.getDispatcherMapping()) {
        case FilterMap.ASYNC:
          dm = "ASYNC";
          break;
        case FilterMap.ERROR:
          dm = "ERROR";
          break;
        case FilterMap.FORWARD:
          dm = "FORWARD";
          break;
        case FilterMap.INCLUDE:
          dm = "INCLUDE";
          break;
        case FilterMap.REQUEST:
          dm = "REQUEST";
          break;
        default:
          dm = "";
      }

      String filterClass = "";
      FilterDef fd = context.findFilterDef(filterMap.getFilterName());
      if (fd != null) {
        filterClass = fd.getFilterClass();
      }

      List<FilterMapping> filterMappings = getFilterMappings(filterMap, dm, filterClass);
      filterMaps.addAll(filterMappings);
    }
  }
  return filterMaps;
}
 
开发者ID:psi-probe,项目名称:psi-probe,代码行数:39,代码来源:Tomcat80ContainerAdapter.java

示例2: getApplicationFilterMaps

public List getApplicationFilterMaps(Context context) {
	FilterMap[] fms = context.findFilterMaps();
	List filterMaps = new ArrayList(fms.length);
	for (int i = 0; i < fms.length; i++) {
		if (fms[i] != null) {
			String dm;
			switch(fms[i].getDispatcherMapping()) {
			case FilterMap.ERROR: dm = "ERROR"; break;
			case FilterMap.FORWARD: dm = "FORWARD"; break;
			// case FilterMap.FORWARD_ERROR: dm = "FORWARD,ERROR"; break;
			case FilterMap.INCLUDE: dm = "INCLUDE"; break;
			// case FilterMap.INCLUDE_ERROR: dm = "INCLUDE,ERROR"; break;
			// case FilterMap.INCLUDE_ERROR_FORWARD: dm = "INCLUDE,ERROR,FORWARD"; break;
			//case FilterMap.INCLUDE_FORWARD: dm = "INCLUDE,FORWARD"; break;
			case FilterMap.REQUEST: dm = "REQUEST"; break;
			// case FilterMap.REQUEST_ERROR: dm = "REQUEST,ERROR"; break;
			//case FilterMap.REQUEST_ERROR_FORWARD: dm = "REQUEST,ERROR,FORWARD"; break;
			//case FilterMap.REQUEST_ERROR_FORWARD_INCLUDE: dm = "REQUEST,ERROR,FORWARD,INCLUDE"; break;
			//case FilterMap.REQUEST_ERROR_INCLUDE: dm = "REQUEST,ERROR,INCLUDE"; break;
			//case FilterMap.REQUEST_FORWARD: dm = "REQUEST,FORWARD"; break;
			//case FilterMap.REQUEST_INCLUDE: dm = "REQUEST,INCLUDE"; break;
			//case FilterMap.REQUEST_FORWARD_INCLUDE: dm = "REQUEST,FORWARD,INCLUDE"; break;
			default: dm = "";
			}

			String filterClass = "";
			org.apache.tomcat.util.descriptor.web.FilterDef fd = context.findFilterDef(fms[i].getFilterName());
			if (fd != null) {
				filterClass = fd.getFilterClass();
			}

			List filterMappings = getFilterMappings(fms[i], dm, filterClass);
			filterMaps.addAll(filterMappings);
		}
	}
	return filterMaps;
}
 
开发者ID:andresol,项目名称:psi-probe-plus,代码行数:37,代码来源:Tomcat80ContainerAdaptor.java


注:本文中的org.apache.tomcat.util.descriptor.web.FilterMap.REQUEST属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。