I use PrimeFaces 3.5.x and Mojarra JSF 2.1.x I would like to access and show the versions of both libraries programmatically.
I use the versions as maven2 properties
In PrimeFaces 4.0, Constants.VERSION is removed in favor of;
RequestContext.getCurrentInstance().getApplicationContext().getConfig().getBuildVersion();
Also watch out for FacesContext.class.getPackage().getImplementationVersion();, it doesn't work on some app servers like websphere.
FacesContext.class.getPackage().getImplementationVersion();