I'm trying to identify the current version of Mojarra my WebLogic 12c is using. How can I find out that?
Asked
Active
Viewed 4,159 times
1 Answers
13
One way would be to programmatically extract the implementation detail from the Package
information of an arbitrary JSF class, such as FacesContext
.
Package p = FacesContext.class.getPackage();
System.out.println(p.getImplementationTitle() + " " + p.getImplementationVersion());
Another way would be to explore the JSF module in /wlserver/modules
folder of WebLogic installation. In my 12c installation, the filename says glassfish.jsf_1.0.0.0_2-1-20.jar
, which in turn identifies Mojarra 2.1.20.

BalusC
- 1,082,665
- 372
- 3,610
- 3,555
-
Thanks, handy as EL expression too: `#{facesContext.class.package.implementationTitle}: #{facesContext.class.package.implementationVersion}` – Webel IT Australia - upvoter Feb 17 '16 at 06:23
-
1@Webel: this will fail in EL 2.2 implementations as `class` and `package` are Java literals. You'd need `#{facesContext['class']['package'].implementationXxx}`. – BalusC Feb 17 '16 at 08:05
-
Both of these work on Mojarra: 2.2.7; Glassfish4.1; [from NetBeans8.1beta;] JDK1.7. `#{facesContext.class.package.implementationTitle}: #{facesContext.class.package.implementationVersion}` and `#{facesContext['class']['package'].implementationXxx}`. For that test the web.xml has web-app version="3.1", where [Servlet 3.1 comes with JSP 2.3 and EL 3.0.](http://stackoverflow.com/questions/7237000/how-can-i-check-what-version-of-el-is-server-using). Q: Are you indicating that the first El expression `#{facesContext.class.package.implementationXxx}` might not have worked with older EL2.2 ? – Webel IT Australia - upvoter Feb 19 '16 at 00:05
-
@Webel: Apparently Oracle's EL impl is forgiving in this. Apache EL at least fails on this. – BalusC Feb 19 '16 at 08:01
-
doesn't identify the full version for me. (only "2.2" of "2.2.6") – Mark W Oct 10 '16 at 11:31
-
1@MarkW: then check WebLogic's module filename. – BalusC Oct 10 '16 at 11:32
-
@BalusC I did :) that's how I know I'm on 2.2.6 - one with a bean validation bug in I've been trying to solve for days. – Mark W Oct 10 '16 at 12:01
-
for everyone's ref. I found this (on Jboss) in %Jboss home%\modules\system\layers\base\com\sun\jsf-impl\main – Mark W Oct 10 '16 at 12:03
-
@MarkW: uh, JBoss is not WebLogic. Current question is about WebLogic. For JBoss head to this question: http://stackoverflow.com/questions/9329778 and this related one http://stackoverflow.com/q/17085717 – BalusC Oct 10 '16 at 12:27