You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Christian Kaltepoth (JIRA)" <de...@myfaces.apache.org> on 2009/03/25 19:48:00 UTC

[jira] Commented: (MYFACES-1902) Allow to use different ExpressionFactory implementation

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

Christian Kaltepoth commented on MYFACES-1902:
----------------------------------------------

Since I am very interested in this feature I have developed a fix for the issue. Find attached the patch against core12 trunk.

The changes can be summarized as follows. The existing code for loading the custom ExpressionFactory has been moved from Jsp20FacesInitializer to AbstractFacesInitializer. Both AbstractFacesInitializer implementations now check for a custom ExpressionFactory by calling getUserDefinedExpressionFactory() before they proceed with their default behavior for finding the ExpressionFactory.

I attached a small webapp for a proof of concept. The webapp can be started either in a JSP 2.1 or JSP 2.0 container by using different maven profiles. The demo shows basic features of JBossEL. See the webapp's source for details.

Tomcat 6.0 (JSP 2.1) environment:

# mvn -Ptomcat60 clean package cargo:start

Tomcat 5.5 (JSP 2.0) environment:

# mvn -Ptomcat55 clean package cargo:start

The demo webapp can be accessed with this url:

http://localhost:8080/eldemo/


> Allow to use different ExpressionFactory implementation
> -------------------------------------------------------
>
>                 Key: MYFACES-1902
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1902
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: Extension Feature
>    Affects Versions: 1.2.4-SNAPSHOT
>            Reporter: Christian Kaltepoth
>            Assignee: Matthias Weßendorf
>         Attachments: MYFACES-1902-webapp.zip, MYFACES-1902.patch
>
>
> It should be possible to use a different ExpressionFactory implementation. This feature is required
> to use 3rd party EL implementations like JBoss EL. Mojarra already supports this with the
> 'com.sun.faces.expressionFactory' context parameter.
> MyFaces Core 1.2.x already supports a context parameter 'org.apache.myfaces.EXPRESSION_FACTORY'
> but it is only evaluated in a JSP 2.0 environment (see MYFACES-1693 for details).
> It should be possible to use this parameter with JSP 2.1 as well. The corresponding code
> should be refactored from Jsp20FacesInitializer to AbstractFacesInitializer to be usable in both
> JSP 2.0 and 2.1.
> Discussion on myfaces-users:
> http://www.nabble.com/Replacing-expression-factory-td18867420.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.