Use case :
a Web Application contains master and
transaction modules. Those modules need to be secured using Admin role.
Implementation :
Prepare database table, we can use either table
or view. The following script is the minimum requirement, we can use either table
and view.
CREATE TABLE "USER_MANAGEMENT"
( "ID" NUMBER(5,0) NOT NULL ENABLE,
"USER_ID"...
Saturday, September 26, 2015
Wednesday, September 2, 2015
JSF, How to get current xhtml path in Bean
All you need is available in FacesContext :
FacesContext facesContext = FacesContext.getCurrentInstance();
String viewId = context.getViewRoot().getViewId();
System.out.print(viewId); //will print your current path U...
JSF, Redirecting Page from Managed Bean

Source picture: frugal.ca
Brew your favourite beans into a cup of coffee!
Then ..
Simply just add paramater faces-redirect=true in your return page.
public String doNavigate() {
return "Home?faces-redirect=true";...