org.apache.catalina.Context.isResourceOnlyServlet()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中org.apache.catalina.Context.isResourceOnlyServlet()方法的一些代码示例,展示了Context.isResourceOnlyServlet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.isResourceOnlyServlet()方法的具体详情如下:
包路径:org.apache.catalina.Context
类名称:Context
方法名:isResourceOnlyServlet

Context.isResourceOnlyServlet介绍

[英]Checks the named Servlet to see if it expects a resource to be present.
[中]检查命名的Servlet,查看它是否期望资源存在。

代码示例

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

private void prepareWrapperMappingInfo(Context context, Wrapper wrapper,
    List<WrapperMappingInfo> wrappers) {
  String wrapperName = wrapper.getName();
  boolean resourceOnly = context.isResourceOnlyServlet(wrapperName);
  String[] mappings = wrapper.findMappings();
  for (String mapping : mappings) {
    boolean jspWildCard = (wrapperName.equals("jsp")
                && mapping.endsWith("/*"));
    wrappers.add(new WrapperMappingInfo(mapping, wrapper, jspWildCard,
        resourceOnly));
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

private void prepareWrapperMappingInfo(Context context, Wrapper wrapper,
    List<WrapperMappingInfo> wrappers) {
  String wrapperName = wrapper.getName();
  boolean resourceOnly = context.isResourceOnlyServlet(wrapperName);
  String[] mappings = wrapper.findMappings();
  for (String mapping : mappings) {
    boolean jspWildCard = (wrapperName.equals("jsp")
                && mapping.endsWith("/*"));
    wrappers.add(new WrapperMappingInfo(mapping, wrapper, jspWildCard,
        resourceOnly));
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Register wrapper.
 */
private void registerWrapper(Wrapper wrapper) {
  String wrapperName = wrapper.getName();
  Context context = (Context) wrapper.getParent();
  String contextPath = context.getPath();
  if ("/".equals(contextPath)) {
    contextPath = "";
  }
  String version = ((Context) wrapper.getParent()).getWebappVersion();
  String hostName = context.getParent().getName();
  String[] mappings = wrapper.findMappings();
  for (String mapping : mappings) {
    boolean jspWildCard = (wrapperName.equals("jsp")
                && mapping.endsWith("/*"));
    mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
             jspWildCard,
             context.isResourceOnlyServlet(wrapperName));
  }
  if(log.isDebugEnabled()) {
    log.debug(sm.getString("mapperListener.registerWrapper",
        wrapperName, contextPath, service));
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Register wrapper.
 */
private void registerWrapper(Wrapper wrapper) {
  String wrapperName = wrapper.getName();
  Context context = (Context) wrapper.getParent();
  String contextPath = context.getPath();
  if ("/".equals(contextPath)) {
    contextPath = "";
  }
  String version = ((Context) wrapper.getParent()).getWebappVersion();
  String hostName = context.getParent().getName();
  
  String[] mappings = wrapper.findMappings();
  for (String mapping : mappings) {
    boolean jspWildCard = (wrapperName.equals("jsp")
                && mapping.endsWith("/*"));
    mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
             jspWildCard,
             context.isResourceOnlyServlet(wrapperName));
  }
  if(log.isDebugEnabled()) {
    log.debug(sm.getString("mapperListener.registerWrapper",
        wrapperName, contextPath, connector));
  }
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Register wrapper.
 */
private void registerWrapper(Wrapper wrapper) {
  String wrapperName = wrapper.getName();
  Context context = (Context) wrapper.getParent();
  String contextPath = context.getPath();
  if ("/".equals(contextPath)) {
    contextPath = "";
  }
  String version = ((Context) wrapper.getParent()).getWebappVersion();
  String hostName = context.getParent().getName();
  String[] mappings = wrapper.findMappings();
  for (String mapping : mappings) {
    boolean jspWildCard = (wrapperName.equals("jsp")
                && mapping.endsWith("/*"));
    mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
             jspWildCard,
             context.isResourceOnlyServlet(wrapperName));
  }
  if(log.isDebugEnabled()) {
    log.debug(sm.getString("mapperListener.registerWrapper",
        wrapperName, contextPath, connector));
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Register wrapper.
 */
private void registerWrapper(Wrapper wrapper) {
  String wrapperName = wrapper.getName();
  Context context = (Context) wrapper.getParent();
  String contextPath = context.getPath();
  if ("/".equals(contextPath)) {
    contextPath = "";
  }
  String version = ((Context) wrapper.getParent()).getWebappVersion();
  String hostName = context.getParent().getName();
  
  String[] mappings = wrapper.findMappings();
  for (String mapping : mappings) {
    boolean jspWildCard = (wrapperName.equals("jsp")
                && mapping.endsWith("/*"));
    mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
             jspWildCard,
             context.isResourceOnlyServlet(wrapperName));
  }
  if(log.isDebugEnabled()) {
    log.debug(sm.getString("mapperListener.registerWrapper",
        wrapperName, contextPath, connector));
  }
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Register wrapper.
 */
private void registerWrapper(Wrapper wrapper) {
  String wrapperName = wrapper.getName();
  Context context = (Context) wrapper.getParent();
  String contextPath = context.getPath();
  if ("/".equals(contextPath)) {
    contextPath = "";
  }
  String version = ((Context) wrapper.getParent()).getWebappVersion();
  String hostName = context.getParent().getName();
  String[] mappings = wrapper.findMappings();
  for (String mapping : mappings) {
    boolean jspWildCard = (wrapperName.equals("jsp")
                && mapping.endsWith("/*"));
    mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
             jspWildCard,
             context.isResourceOnlyServlet(wrapperName));
  }
  if(log.isDebugEnabled()) {
    log.debug(sm.getString("mapperListener.registerWrapper",
        wrapperName, contextPath, connector));
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Register wrapper.
 */
private void registerWrapper(Wrapper wrapper) {
  String wrapperName = wrapper.getName();
  Context context = (Context) wrapper.getParent();
  String contextPath = context.getPath();
  if ("/".equals(contextPath)) {
    contextPath = "";
  }
  String version = ((Context) wrapper.getParent()).getWebappVersion();
  String hostName = context.getParent().getName();
  
  String[] mappings = wrapper.findMappings();
  for (String mapping : mappings) {
    boolean jspWildCard = (wrapperName.equals("jsp")
                && mapping.endsWith("/*"));
    mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
             jspWildCard,
             context.isResourceOnlyServlet(wrapperName));
  }
  if(log.isDebugEnabled()) {
    log.debug(sm.getString("mapperListener.registerWrapper",
        wrapperName, contextPath, connector));
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

&& mapping.endsWith("/*"));
  mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
      jspWildCard, context.isResourceOnlyServlet(wrapperName));
} else if (Wrapper.REMOVE_MAPPING_EVENT.equals(event.getType())) {

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

&& mapping.endsWith("/*"));
  mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
      jspWildCard, context.isResourceOnlyServlet(wrapperName));
} else if (Wrapper.REMOVE_MAPPING_EVENT.equals(event.getType())) {

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

&& mapping.endsWith("/*"));
  mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
      jspWildCard, context.isResourceOnlyServlet(wrapperName));
} else if (Wrapper.REMOVE_MAPPING_EVENT.equals(event.getType())) {

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

&& mapping.endsWith("/*"));
  mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
      jspWildCard, context.isResourceOnlyServlet(wrapperName));
} else if (Wrapper.REMOVE_MAPPING_EVENT.equals(event.getType())) {

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

&& mapping.endsWith("/*"));
  mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
      jspWildCard, context.isResourceOnlyServlet(wrapperName));
} else if (Wrapper.REMOVE_MAPPING_EVENT.equals(event.getType())) {

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

&& mapping.endsWith("/*"));
  mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
      jspWildCard, context.isResourceOnlyServlet(wrapperName));
} else if (event.getType() == Wrapper.REMOVE_MAPPING_EVENT) {

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

&& mapping.endsWith("/*"));
  mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
      jspWildCard, context.isResourceOnlyServlet(wrapperName));
} else if (event.getType() == Wrapper.REMOVE_MAPPING_EVENT) {

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

&& mapping.endsWith("/*"));
  mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
      jspWildCard, context.isResourceOnlyServlet(wrapperName));
} else if (event.getType() == Wrapper.REMOVE_MAPPING_EVENT) {

相关文章

微信公众号

最新文章

更多

Context类方法