Class StringContextReplacement


  • public class StringContextReplacement
    extends java.lang.Object
    Utility to replace predefined expressions within a string with values from the HTTP request;

    ${basepath} - UriInfo.getBaseUri().getRawPath() ${absolutepath} - UriInfo.getAbsolutePath().getRawPath() ${absoluteuri} - UriInfo.getAbsolutePath().toString() ${baseuri} - UriInfo.getBaseUri().toString() ${contextpath} - HttpServletRequest.getContextPath()

    Version:
    $Revision: 1 $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.regex.Pattern absolutepath  
      private static java.util.regex.Pattern absoluteUri  
      private static java.util.regex.Pattern basepath  
      private static java.util.regex.Pattern baseUri  
      private static java.util.regex.Pattern contextPath  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String replace​(java.lang.String original)
      Utility to replace predefined expressions within a string with values from the HTTP request;
      • Methods inherited from class java.lang.Object

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

      • basepath

        private static final java.util.regex.Pattern basepath
      • absolutepath

        private static final java.util.regex.Pattern absolutepath
      • absoluteUri

        private static final java.util.regex.Pattern absoluteUri
      • baseUri

        private static final java.util.regex.Pattern baseUri
      • contextPath

        private static final java.util.regex.Pattern contextPath
    • Constructor Detail

      • StringContextReplacement

        public StringContextReplacement()
    • Method Detail

      • replace

        public static java.lang.String replace​(java.lang.String original)
        Utility to replace predefined expressions within a string with values from the HTTP request;

        ${basepath} - UriInfo.getBaseUri().getRawPath() ${absolutepath} - UriInfo.getAbsolutePath().getRawPath() ${absoluteuri} - UriInfo.getAbsolutePath().toString() ${baseuri} - UriInfo.getBaseUri().toString() ${contextpath} - HttpServletRequest.getContextPath()

        Parameters:
        original -
        Returns: