Class HttpRequestUtils


  • public class HttpRequestUtils
    extends java.lang.Object
    Since:
    11/3/16
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getApplicationBaseUrl​(javax.servlet.http.HttpServletRequest httpServletRequest)  
      static java.lang.String getBaseUrl​(java.lang.String requestUrl)  
      static java.lang.String getBaseUrl​(java.net.URI uri)  
      static java.lang.String getBaseUrl​(javax.servlet.http.HttpServletRequest httpServletRequest)  
      static boolean isAjaxRequest​(javax.servlet.http.HttpServletRequest request)  
      static boolean isRequestedFromIEBrowser​(javax.servlet.http.HttpServletRequest httpServletRequest)  
      static void writeJsonErrorResponse​(MessageResource messageResource, int responseCode, javax.servlet.http.HttpServletResponse response)  
      static void writeJsonErrorResponse​(java.lang.String message, int responseCode, javax.servlet.http.HttpServletResponse response)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • writeJsonErrorResponse

        public static void writeJsonErrorResponse​(MessageResource messageResource,
                                                  int responseCode,
                                                  javax.servlet.http.HttpServletResponse response)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • writeJsonErrorResponse

        public static void writeJsonErrorResponse​(java.lang.String message,
                                                  int responseCode,
                                                  javax.servlet.http.HttpServletResponse response)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getBaseUrl

        public static java.lang.String getBaseUrl​(java.lang.String requestUrl)
      • getBaseUrl

        public static java.lang.String getBaseUrl​(java.net.URI uri)
      • getBaseUrl

        public static java.lang.String getBaseUrl​(javax.servlet.http.HttpServletRequest httpServletRequest)
      • isRequestedFromIEBrowser

        public static boolean isRequestedFromIEBrowser​(javax.servlet.http.HttpServletRequest httpServletRequest)
      • getApplicationBaseUrl

        public static java.lang.String getApplicationBaseUrl​(javax.servlet.http.HttpServletRequest httpServletRequest)
      • isAjaxRequest

        public static boolean isAjaxRequest​(javax.servlet.http.HttpServletRequest request)