类 WebUtils


  • public abstract class WebUtils
    extends java.lang.Object
    Web Utilities Class
    从以下版本开始:
    1.0.0
    作者:
    Mercy
    另请参阅:
    WebUtils
    • 构造器概要

      构造器 
      构造器 说明
      WebUtils()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static java.util.Map<java.lang.String,​? extends javax.servlet.FilterRegistration> findFilterRegistrations​(javax.servlet.ServletContext servletContext, java.lang.Class<? extends javax.servlet.Filter> filterClass)
      Find the map of FilterRegistration in specified Filter Class
      protected static <R extends javax.servlet.Registration>
      java.util.Map<java.lang.String,​R>
      findRegistrations​(javax.servlet.ServletContext servletContext, java.util.Map<java.lang.String,​R> registrationsMap, java.lang.Class<?> targetClass)
      Find the map of Registration in specified Class
      static java.util.Map<java.lang.String,​? extends javax.servlet.ServletRegistration> findServletRegistrations​(javax.servlet.ServletContext servletContext, java.lang.Class<? extends javax.servlet.Servlet> servletClass)
      Find the map of ServletRegistration in specified Servlet Class
      static javax.servlet.ServletContext getServletContext​(javax.servlet.http.HttpServletRequest request)
      Get ServletContext from HttpServletRequest
      static boolean isRunningBelowServlet3Container()
      Is Running below Servlet 3 Container
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • WebUtils

        public WebUtils()
    • 方法详细资料

      • isRunningBelowServlet3Container

        public static boolean isRunningBelowServlet3Container()
        Is Running below Servlet 3 Container
        返回:
        If below , true
      • getServletContext

        public static javax.servlet.ServletContext getServletContext​(javax.servlet.http.HttpServletRequest request)
        Get ServletContext from HttpServletRequest
        参数:
        request - HttpServletRequest
        返回:
        non-null
      • findFilterRegistrations

        public static java.util.Map<java.lang.String,​? extends javax.servlet.FilterRegistration> findFilterRegistrations​(javax.servlet.ServletContext servletContext,
                                                                                                                               java.lang.Class<? extends javax.servlet.Filter> filterClass)
        Find the map of FilterRegistration in specified Filter Class
        参数:
        servletContext - ServletContext
        filterClass - The of class of Filter
        返回:
        the map of ServletRegistration
      • findServletRegistrations

        public static java.util.Map<java.lang.String,​? extends javax.servlet.ServletRegistration> findServletRegistrations​(javax.servlet.ServletContext servletContext,
                                                                                                                                 java.lang.Class<? extends javax.servlet.Servlet> servletClass)
        Find the map of ServletRegistration in specified Servlet Class
        参数:
        servletContext - ServletContext
        servletClass - The of class of Servlet
        返回:
        the unmodifiable map of ServletRegistration
      • findRegistrations

        protected static <R extends javax.servlet.Registration> java.util.Map<java.lang.String,​R> findRegistrations​(javax.servlet.ServletContext servletContext,
                                                                                                                          java.util.Map<java.lang.String,​R> registrationsMap,
                                                                                                                          java.lang.Class<?> targetClass)
        Find the map of Registration in specified Class
        类型参数:
        R - the subtype of Registration
        参数:
        servletContext - ServletContext
        registrationsMap - the map of Registration
        targetClass - the target Class
        返回:
        the unmodifiable map of Registration i