I am looking for a way to inject values from the fragment (#) of a URL into bean(JSF), in the same way query-parameter values are injected. I am using Ben Alman\'s Bookmarka
Here's the most reliable way to extract a fragment from a syntactically valid URL / URI.
URI uri = new URI(someString);
String fragment = uri.getFragment();
How you inject this into a bean will depend on what server-side framework you are using, and whether you are doing the injection using XML or annotations, or doing it programmaticaly.