Class HttpUtil


  • public class HttpUtil
    extends Object
    Utility class for http stuff
    Author:
    vanderw
    • Constructor Detail

      • HttpUtil

        public HttpUtil()
    • Method Detail

      • getFullURL

        public static String getFullURL​(javax.servlet.http.HttpServletRequest request)
        Gets the full url
        Parameters:
        request - the HttpServletRequest
        Returns:
        the string containing the full url
      • isMultipart

        public static boolean isMultipart​(javax.servlet.http.HttpServletRequest request)
        Detects if a request is multipart
        Parameters:
        request - the HttpServletRequest
        Returns:
        a boolean indicating if it is multipart
      • detectServerName

        public static String detectServerName​(javax.servlet.http.HttpServletRequest httpServletRequest)
      • extractServerNameFromForwardedFor

        public static String extractServerNameFromForwardedFor​(String forwardedFor)
      • getClientIpAddress

        public String getClientIpAddress​(javax.servlet.http.HttpServletRequest request)