Class VitroHttpServlet

    • Constructor Detail

      • VitroHttpServlet

        public VitroHttpServlet()
    • Method Detail

      • service

        public final void service​(javax.servlet.ServletRequest req,
                                  javax.servlet.ServletResponse resp)
                           throws javax.servlet.ServletException,
                                  IOException
        Specified by:
        service in interface javax.servlet.Servlet
        Overrides:
        service in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • stashFileSizeException

        public boolean stashFileSizeException()
        Override this to change the way that exceptions are handled when parsing a multipart request. Be aware that multipart parameters have been lost, and that may include form fields.
        Specified by:
        stashFileSizeException in interface MultipartRequestWrapper.ParsingStrategy
      • doGet

        protected void doGet​(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws javax.servlet.ServletException,
                             IOException
        doGet does nothing.
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • doPost

        protected void doPost​(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                       throws javax.servlet.ServletException,
                              IOException
        doPost does the same thing as the doGet method
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • isAuthorizedToDisplayPage

        protected boolean isAuthorizedToDisplayPage​(javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response,
                                                    AuthorizationRequest actions)
        Don't display a page that the user isn't authorized to see.
        Parameters:
        actions - the combination of RequestedActions that must be authorized.
      • redirectUnauthorizedRequest

        public static void redirectUnauthorizedRequest​(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
      • redirectToInsufficientAuthorizationPage

        public static void redirectToInsufficientAuthorizationPage​(javax.servlet.http.HttpServletRequest request,
                                                                   javax.servlet.http.HttpServletResponse response)
        Logged in, but with insufficient authorization. Send them to the home page with a message. They won't be coming back.
      • redirectToLoginPage

        public static void redirectToLoginPage​(javax.servlet.http.HttpServletRequest request,
                                               javax.servlet.http.HttpServletResponse response)
        Not logged in. Send them to the login page, and then back to the page that invoked this.
      • dumpRequestParameters

        protected void dumpRequestParameters​(javax.servlet.http.HttpServletRequest req)
        A child class may call this if logging is set to debug level.