Class ResourceServlet

    • Constructor Detail

      • ResourceServlet

        public ResourceServlet​(String resourcePath)
    • Method Detail

      • init

        public void init()
                  throws javax.servlet.ServletException
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
      • isPermittedRequest

        public boolean isPermittedRequest​(String remoteAddress)
      • getFilePath

        protected String getFilePath​(String fileName)
      • returnResourceFile

        protected void returnResourceFile​(String fileName,
                                          String uri,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws javax.servlet.ServletException,
                                          IOException
        Throws:
        javax.servlet.ServletException
        IOException
      • service

        public void service​(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws javax.servlet.ServletException,
                            IOException
        Overrides:
        service in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • ContainsUser

        public boolean ContainsUser​(javax.servlet.http.HttpServletRequest request)
      • checkLoginParam

        public boolean checkLoginParam​(javax.servlet.http.HttpServletRequest request)
      • isRequireAuth

        public boolean isRequireAuth()
      • isPermittedRequest

        public boolean isPermittedRequest​(javax.servlet.http.HttpServletRequest request)
      • getRemoteAddress

        protected String getRemoteAddress​(javax.servlet.http.HttpServletRequest request)
      • process

        protected abstract String process​(String url)