>From: Hermod Opstvedt <[EMAIL PROTECTED]> 
>
> Hi 
> 
> This is exactly what I was talking about. Finding something in the code that 
> distinguishes the versions. However this is only step one. Next is to figure 
> out which implementation (MyFaces, RI). Here one only needs to try an do a 
> class.forName on a class in each and check for exceptions. 
>

Yeah, that's a real drag but I can't think of a better solution either.  It 
will take some
digging to figure out an API change or class that will distinguish a release. 


 
> Hermod 
> 
> 
> -----Opprinnelig melding----- 
> Fra: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
> Sendt: 6. mars 2007 21:58 
> Til: dev@shale.apache.org 
> Emne: Re: Determining the flavor of the JSF runtime 
> 
> Facelets has code to distinguish between JSF 1.1 and JSF 1.2. 
> 
> com.sun.facelets.util.FacesAPI. 
> 
> https://facelets.dev.java.net/source/browse/facelets/src/java/com/sun/facele 
> ts/util/FacesAPI.java 
> 
> As Kito mentioned, it also came up at one point that this should be 
> part of the JSF API. 
> 
> 
> 
> ---------- Forwarded message ---------- 
> From: Jesse Alexander (KBSA 21) 
> Date: Oct 28, 2005 9:15 AM 
> Subject: RE: How to find out which implementation is running 
> To: MyFaces Discussion , [EMAIL PROTECTED] 
> 
> 
> Well... 
> 
> I see two alternatives: 
> 
> 1) We add one/two method to javax.faces.application.Application 
> eg. getImplName() and getSpecVersion() 
> But that would require a spec change... 
> 
> 2) We ask that at startup one of the implementation classes adds 
> the information as a managedBean or a external-context variable 
> This could be added also without a spec change, just need to 
> agree with the RI-people on an identifier to use... 
> 
> regards 
> Alexander 
> 
> 
> -----Original Message----- 
> From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 28, 2005 4:07 PM 
> To: MyFaces Discussion 
> Subject: Re: How to find out which implementation is running 
> 
> Good question. 
> 
> If you devise something like this, there should also be a way to check 
> for the spec version of the jsf implementation running. 
> 
> regards, 
> 
> Martin 
> 
> On 10/28/05, Jesse Alexander (KBSA 21) 
> wrote: 
> > Hi 
> > 
> > When I want to write a component that must run under more than 
> > JSF-implementation, 
> > I often should know (runtime not development time) which 
> implementation 
> > is running, in 
> > order to use the correct base-classes. 
> > 
> > Has somebody devised a clever method to find out which JSF-runtime is 
> > active? 
> > Or should we add something to enable this? 
> > 
> > regards 
> > Alexander 
> 
> 
> On 3/6/07, Gary VanMatre wrote: 
> > 
> > I've been trying to determine a better strategy for detecting the supplier 
> and version of the JSF runtime. This has to do with a open JIRA ticket [1]. 
> I attempted to create a utility class to determine the implementor of the 
> runtime and the JSF spec version [2]. This was a real hack but I didn't see 
> a better way and I'm still not sure the best way to dynamically extract this 
> version information. Besides knowing the JSF version (1.1, 1.2), we need the 
> implementation version (myfaces 1.1, 1.3...). I was thinking about trying to 
> read the manifest but haven't figured out a good method. This seems like it 
> should be part of the JSF API? 
> > 
> > 
> > Any ideas? 
> > 
> > Gary 
> > 
> > 
> > [1] https://issues.apache.org/struts/browse/SHALE-418 
> > [2] 
> https://svn.apache.org/viewvc/shale/framework/trunk/shale-clay/src/main/java 
> /org/apache/shale/clay/utils/JSFRuntimeTracker.java?view=markup 
> 

Reply via email to