Hi, I switched to org.apache.tomcat:tomcat-jasper-el:8.0.0-RC1 as javax.el 3.0 implementation and tested with the following code:
ELProcessor processor = new ELProcessor(); processor.getELManager().importClass("java.io.File"); processor.eval("File('./')"); but I get the following error: javax.el.ELException: Function ':File' not found at org.apache.el.parser.AstFunction.getValue(AstFunction.java:136) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188) at javax.el.ELProcessor.getValue(ELProcessor.java:129) at javax.el.ELProcessor.eval(ELProcessor.java:115) at org.apache.naming.factory.ExpressionFactoryTest.elImplementationShouldWork(ExpressionFactoryTest.java:43) Are methods importClass, importStatic and importPackage on ELManager already implemented in apache EL? Regards, Xavier ---------------------------------------- > Subject: Re: Using EL expressions in an ObjectFactory > From: dmik...@gopivotal.com > Date: Fri, 13 Sep 2013 15:38:29 -0400 > To: users@tomcat.apache.org > > On Sep 13, 2013, at 3:27 AM, Xavier Dury <kal...@hotmail.com> wrote: > >> When I try the following: >> >> ELProcessor processor = new ELProcessor(); >> processor.getELManager().importClass("java.io.File"); >> processor.eval("File('./')"); >> >> I get javax.el.ELException: java.lang.IllegalArgumentException: Cannot >> convert ./ of type class java.lang.String to class java.net.URI. >> >> I'm using glassfish javax.el 3.0 implementation for my tests. Maybe the >> problem comes from this specific implementation. > > Yes, that would be the problem. I've noticed the same behavior w/GlassFish's > EL 3.0 implementation. Try building Tomcat trunk and using it's > implementation or using the next Tomcat 8 RC when it's available. Neither > should have that problem. > > Dan > > >> >> ---------------------------------------- >>> Subject: Re: Using EL expressions in an ObjectFactory >>> From: dmik...@gopivotal.com >>> Date: Thu, 12 Sep 2013 17:10:21 -0400 >>> To: users@tomcat.apache.org >>> >>> On Sep 12, 2013, at 7:58 AM, Xavier Dury <kal...@hotmail.com> wrote: >>> >>>> Ok, >>>> >>>> I fixed the styling and the documentation. If anything else must be >>>> changed, don't hesitate. >>> >>> In your docs, you state the following remark... >>> >>> "Try to avoid overloaded methods/constructors as much as possible in EL 3.0 >>> expression as the ELProcessor will use the first one it will find by >>> reflection." >>> >>> Can you clarify what you mean by this? There was a problem in RC-1 that >>> sounds similar, but it's been fixed. >>> >>> https://issues.apache.org/bugzilla/show_bug.cgi?id=55483 >>> >>> Is this a problem in trunk? Point being, if you're seeing an issue with EL >>> 3.0, we should try to fix it. >>> >>> Dan >>> >>> >>>> ---------------------------------------- >>>>> Date: Thu, 12 Sep 2013 12:01:26 +0100 >>>>> From: ma...@apache.org >>>>> To: users@tomcat.apache.org >>>>> Subject: Re: Using EL expressions in an ObjectFactory >>>>> >>>>> On 12/09/2013 11:49, Xavier Dury wrote: >>>>>> Hi, >>>>>> >>>>>> I implemented a simple ExpressionFactory @ >>>>>> https://github.com/kalgon/expression-factory. >>>>>> >>>>>> I would love to see this ExpressionFactory next to >>>>>> org.apache.naming.factory.BeanFactory in tomcat. >>>>> >>>>> No objections in principle. >>>>> >>>>> Haven't looked at the new code in detail. A few initial observations: >>>>> - I'm assuming this is a contribution as per section 5 of the Apache >>>>> License, version 2.0 >>>>> - There is no documentation >>>>> - Tomcat code standards use 4 spaces for indents, not tabs >>>>> - Some @Override markers look to be missing >>>>> >>>>> Mark >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org