/** * Get the path of the current request relative to the application root (base) URI as a string. * * @param decode controls whether sequences of escaped octets are decoded ({@code true}) or not * ({@code false}). * @return relative request path. */ public String getPath(boolean decode) { if (decode) { if (decodedRelativePath != null) { return decodedRelativePath; } return decodedRelativePath = UriComponent.decode(encodedRelativePath(), UriComponent.Type.PATH); } else { return encodedRelativePath(); } }