本文整理汇总了Java中org.apache.tomcat.util.descriptor.web.FilterMap.getDispatcherMapping方法的典型用法代码示例。如果您正苦于以下问题:Java FilterMap.getDispatcherMapping方法的具体用法?Java FilterMap.getDispatcherMapping怎么用?Java FilterMap.getDispatcherMapping使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tomcat.util.descriptor.web.FilterMap
的用法示例。
在下文中一共展示了FilterMap.getDispatcherMapping方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getApplicationFilterMaps
import org.apache.tomcat.util.descriptor.web.FilterMap; //导入方法依赖的package包/类
@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;
}