Class HttpUtilities


  • public abstract class HttpUtilities
    extends Object
    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
    • Constructor Detail

      • HttpUtilities

        public HttpUtilities()
    • Method Detail

      • respond

        public static void respond​(javax.servlet.http.HttpServletResponse response,
                                   String content)
                            throws IOException,
                                   javax.servlet.ServletException
        Throws:
        IOException
        javax.servlet.ServletException
      • respondJSON

        public static void respondJSON​(javax.servlet.http.HttpServletResponse response,
                                       Object o)
                                throws IOException
        Throws:
        IOException
      • respondException

        public static void respondException​(javax.servlet.http.HttpServletResponse response,
                                            Exception e)
                                     throws IOException,
                                            javax.servlet.ServletException
        Throws:
        IOException
        javax.servlet.ServletException
      • redirect

        public static void redirect​(javax.servlet.http.HttpServletResponse response,
                                    String url)
                             throws IOException
        Throws:
        IOException
      • getIntegerParameter

        public static int getIntegerParameter​(javax.servlet.http.HttpServletRequest request,
                                              String name,
                                              int def)
      • respondWithErrorPage

        public static void respondWithErrorPage​(RefineServlet servlet,
                                                javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response,
                                                String message,
                                                Throwable e)
      • respondWithErrorPage

        public static void respondWithErrorPage​(RefineServlet servlet,
                                                javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response,
                                                String message,
                                                int status,
                                                Throwable e)