private String getPathPrefix ( HttpServletRequest request , JawrConfig config ) { if ( request . isSecure ( ) ) { if ( null != config . getContextPathSslOverride ( ) ) { return config . getContextPathSslOverride ( ) ; } } else { if ( null != config . getContextPathOverride ( ) ) { return config . getContextPathOverride ( ) ; } } String mapping = null == config . getServletMapping ( ) ? "" : config . getServletMapping ( ) ; String path = PathNormalizer . joinPaths ( request . getContextPath ( ) , mapping ) ; path = path . endsWith ( "/" ) ? path : path + ' ' ; return path ; }
Determines which prefix should be used for the links according to the context path override if present or using the context path and possibly the jawr mapping .