[OmniFaces utilities] The
stripExtension()
method strips the extension from a resource if any. This extension is defined as everything after the last occurrence of a period, including the period itself. E.g. input "index.xhtml" will return "index".Method:
Usage:
import
org.omnifaces.util.ResourcePaths;
...
// returns: /resources/default/images/rafa
String
resource =
ResourcePaths.stripExtension("/resources/default/images/rafa.jpg");
// returns: /WEB-INF/faces-views/
String
resource = ResourcePaths.stripExtension("/WEB-INF/faces-views/");
Niciun comentariu :
Trimiteți un comentariu