Class HttpUtil


  • public class HttpUtil
    extends java.lang.Object
    Class with helper methods for http splitting scripts
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getPathSegments​(java.lang.String requestURI, int fromSegment, int toSegment, boolean replaceNumericIds)
      Returns the specified part of the request URI
      • Methods inherited from class java.lang.Object

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

      • HttpUtil

        public HttpUtil()
    • Method Detail

      • getPathSegments

        public static java.lang.String getPathSegments​(java.lang.String requestURI,
                                                       int fromSegment,
                                                       int toSegment,
                                                       boolean replaceNumericIds)
        Returns the specified part of the request URI
        Parameters:
        requestURI - the request URI from javax.servlet.http.HttpServletRequest.getRequestURI()
        fromSegment - the first segment to be included, the index is one-based
        toSegment - the last segment to be included, the index is one-based
        replaceNumericIds - if true segments that only contain numbers are replaced with <id>
        Returns:
        the specified part of the request URI