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