Tuesday

How to learn which vendor / version is using in jsf webapp? (MyFaces or Mojarra)

You can run the following code fragment in your application:
import javax.faces.context.FacesContext;

System.out.println("imp title: " + FacesContext.class.getPackage().getImplementationTitle());
System.out.println("impl vendor " + FacesContext.class.getPackage().getImplementationVendor());
System.out.println("imp version: " + FacesContext.class.getPackage().getImplementationVersion());
Sample output:

imp title: Apache MyFaces JSF-2.2 Core API
impl vendor The Apache Software Foundation
imp version: 2.2.11

No comments:

Post a Comment