[OmniFaces utilities] The
stripPrefixPath()
method strips the given prefix path from the given resource path if any.Method:
Usage:
import
org.omnifaces.util.ResourcePaths;
...
// returns: /foo.xhtml
String
resource = ResourcePaths.stripPrefixPath("/WEB-INF/faces-views/",
"/WEB-INF/faces-views/foo.xhtml");
// returns: /images/rafa.jpg
String
resource = ResourcePaths.stripPrefixPath("/resources/default/",
"/resources/default/images/rafa.jpg");
Niciun comentariu :
Trimiteți un comentariu