The exact version information for the JSF implementation is available in the /META-INF/MANIFEST.MF file of the JSF JAR implementation file. It is usually located near the bottom of the manifest file as follows:
Implementation-Title: Mojarra Implementation-Version: 1.2_12-b01-FCS Implementation-Vendor: Sun Microsystems, Inc.
The JAR file can be opened using the ZIP tool. In the case of Sun RI / Mojarra, the file name is jsf-impl.jar , sometimes with the exact version number, for example jsf-impl-1.2_12-b01-FCS.jar . If you are using the JSF implementation provided by JBoss 4.3.x, you can find the file in the $JBOSS_HOME/server/<Profile>/deploy/jboss-web.deployer/jsf-libs . If you provided your own JSF implementation in /WEB-INF/lib and configured web.xml to tell JBoss to use it instead, then you need to check it with what is specified in /WEB-INF/lib .
Or you can just get it programmatically:
Package jsfPackage = FacesContext.class.getPackage(); String implTitle = jsfPackage.getImplementationTitle(); String implVersion = jsfPackage.getImplementationVersion(); String implVendor = jsfPackage.getImplementationVendor();
As for faces-config.xml , with it you can also control the version of JSF that the application is intended for. Therefore, if you stated that it complies with the JSF 1.1 specification, then even the JSF 1.2 / 2.0 implementation will work in JSF 1.1 “modability compatibility”. But you cannot claim to be consistent with a new version, such as JSF 1.2 / 2.0, when you are actually using the JSF 1.1 implementation. This will either be a mistake or will be ignored.
Balusc
source share