[ 
https://issues.apache.org/jira/browse/MYFACES-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13208158#comment-13208158
 ] 

Leonardo Uribe commented on MYFACES-3464:
-----------------------------------------

The problem is simple. The check just do a Class.forName:

            try
            {
                // Check if the UEL classes are available.
                // If the JSP EL classes are loaded first, UEL will not work
                // properly, hence it will be disabled.
                unifiedELAvailable = (
                        Class.forName("javax.el.ValueReference") != null
                     && Class.forName("javax.el.ValueExpression")
                                .getMethod("getValueReference", 
ELContext.class) != null
                );
            }
            catch (Throwable t)
            {
                log.log(Level.FINE, "Error loading class (could be normal)", t);
                unifiedELAvailable = false;
            }

            log.info("MyFaces Unified EL support " + (unifiedELAvailable ? 
"enabled" : "disabled"));

If the check fails UEL will not work, no matter how it looks (how to enable it 
if javax.el.ValueReference is not on the classpath?) . The only way to fix it 
is remove JSP EL classes from the classpath. Add a param to put MyFaces in a 
state that could be illegal sounds bad. The problem is in Websphere, MyFaces is 
not doing anything wrong in this part.
                
> Using Myfaces 2.1.6 does not allow to using a user provided EL (e.g. 
> jBoss-el) other than what is provided by container when used with Webesphere 
> 7 .
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3464
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3464
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.6
>         Environment: Websphere 7.0.0.17  
> JSF 2
>            Reporter: Shahzeb Khan
>            Assignee: Leonardo Uribe
>
> There seems to be no way to use an EL other than what is provided by 
> Websphere (have not checked with any other server).
> We are using JSF 2 via isolated shared library with Websphere  version 
> 7.0.0.17. Trying to use jBoss-el by adding it to the isolated shared 
> libraries or to lib directory and setting 
>  <context-param>
>         <param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name>
>         <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
>     </context-param>
> in web.xml does not make myfaces pickup the supplied EL.
> In the logs this line is written [13/02/12 15:19:06:113 EST] 00000029 
> ExternalSpeci I   MyFaces Unified EL support disabled.
> tracked it down to this method 
> org.apache.myfaces.util.ExternalSpecifications#isUnifiedELAvailable() . The 
> try block throws a error as can not find class ( and method but exception is 
> thrown at the first check i.e class) and catch block sets the return value to 
> false. This stopping it to use an externally supplied EL . 
> I have also asked this question on SO
> http://stackoverflow.com/questions/9091354/how-can-i-update-websphere-7-to-use-el2-2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to