users@glassfish.java.net

How do I have different epression factories in an app?

From: <forums_at_java.net>
Date: Thu, 19 May 2011 02:34:08 -0500 (CDT)

I have a web application running on glassfish 3.1. Part of this application
uses JUEL as an expression language implementation. Unfortunately, as soon as
I add the JUEL jar files to my web app, it also gets invoked to handle the
expressions within the Faces pages. There are a number of differences between
JUEL and the Sun EL , and I'd like to have both implementations, with
JUEL handling the expressions for the app and the Sun implementation
handling the expressions in the pages.

I tried setting a context-param "com.sun.faces.expressionFactory" with value
"com.sun.el.ExpressionFactoryImpl". It seems that something is checking this
because if I give an incorrect classname I get an error, but with the
correct classname I still get errors from the JUEL classes for the Faces
pages. My guess is that somewhere it is using the
ExpressionFactory.newInstance method, since JUEL has the
META-INF/services/javax.el.ExpressionFactory file in its JAR file.

Is there a method of ensuring that the JUEL library is NOT used for Faces
pages?


--
[Message sent by forum member 'rcasha']
View Post: http://forums.java.net/node/803834