You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Roxana <mi...@gmail.com> on 2010/01/13 13:23:05 UTC
ExpressionFactory.newInstance() undefined.
Hi all,
I have to port our web application from Tomcat 5.5 to Tomcat 6.0.20.
Everything went fine up till now.
In the previous implementation we have used the ExpressionEvaluatorImpl
that was part of the api in commons-el.jar from jakarta-tomcat-5.0.25
In the tomcat 6.0.20 i can see that the the API for ExpressionEvaluatorImpl
has not only moved to jasper.jar, but it has also changed. Now, according to
the documentation i have found here:
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/jasper/el/ExpressionEvaluatorImpl.html
the constructor requires an argument:
ExpressionEvaluatorImpl(javax.el.ExpressionFactory
factory)
I have looke din the documentation of the *ExpressionFactory *:
http://java.sun.com/javaee/6/docs/api/javax/el/ExpressionFactory.html
and i decided to use the method
newInstance<http://java.sun.com/javaee/5/docs/api/javax/el/ExpressionFactory.html#newInstance%28%29>
() Surprisingly enough i get the error message:
The method newInstance() is undefined for the type ExpressionFactory
Do you have any idea why this method is not available?
Can you give me some ideas about how to create an argument ExpressionFactory
for the constructor of ExpressionEvaluatorImpl ?
Looking forward for your answer
Cheers
Roxana
Re: ExpressionFactory.newInstance() undefined.
Posted by Roxana <mi...@gmail.com>.
Ah....sorry...I'he been staring to much in my monitor today and i've lost
it:)
ExpressionFactoryImpl is an ExpressionFactory ....
Thanks a lot!!!
Roxana
On Wed, Jan 13, 2010 at 3:34 PM, Roxana <mi...@gmail.com> wrote:
> Hi Mark,
>
> Apparently Java 5 has as well in the documentation of the ExpressionFactory
> the method newInstance
>
> http://java.sun.com/javaee/5/docs/api/javax/el/ExpressionFactory.html#ExpressionFactory()<http://java.sun.com/javaee/5/docs/api/javax/el/ExpressionFactory.html#ExpressionFactory%28%29>
>
> Nevertheless , when i try to use it, the method actually is not there.
>
> How can i use the ExpressionFactoryImpl to get the argument of type
> ExpressionFactory that i need to pass it as argument to the constructor of
> ExpressionEvaluatorImpl ?
> Thanks again
> Regards
>
> Roxana
>
>
> On Wed, Jan 13, 2010 at 3:06 PM, Mark Thomas <ma...@apache.org> wrote:
>
>> On 13/01/2010 14:04, Roxana wrote:
>> > Hi Mark,
>> >
>> > Thank you for your answer. You are of course perfectly right..I have
>> looked
>> > at the documentation of Java EE6.
>> >
>> > The org.apache.el.ExpressionFactoryImpl is not part of any jar files
>> that
>> > comes with Tomcat6...so i suppose that your suggestions is to manually
>> copy
>> > the commons-el.jar into the lib directory of Tomcat???
>>
>> No. The class is in jasper-el.jar.
>>
>> Mark
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
Re: ExpressionFactory.newInstance() undefined.
Posted by Mark Thomas <ma...@apache.org>.
On 13/01/2010 14:34, Roxana wrote:
> Hi Mark,
>
> Apparently Java 5 has as well in the documentation of the ExpressionFactory
> the method newInstance
> http://java.sun.com/javaee/5/docs/api/javax/el/ExpressionFactory.html#ExpressionFactory()
I believe that is an error in the Java EE 5 docs. The newInstance()
method was added in the first JSP 2.1 maintenance review but that review
was never released.
> Nevertheless , when i try to use it, the method actually is not there.
As expected.
> How can i use the ExpressionFactoryImpl to get the argument of type
> ExpressionFactory that i need to pass it as argument to the constructor of
> ExpressionEvaluatorImpl ?
ExpressionFactory factory = new ExpressionFactoryImpl();
Mark
> Thanks again
> Regards
>
> Roxana
>
> On Wed, Jan 13, 2010 at 3:06 PM, Mark Thomas <ma...@apache.org> wrote:
>
>> On 13/01/2010 14:04, Roxana wrote:
>>> Hi Mark,
>>>
>>> Thank you for your answer. You are of course perfectly right..I have
>> looked
>>> at the documentation of Java EE6.
>>>
>>> The org.apache.el.ExpressionFactoryImpl is not part of any jar files
>> that
>>> comes with Tomcat6...so i suppose that your suggestions is to manually
>> copy
>>> the commons-el.jar into the lib directory of Tomcat???
>>
>> No. The class is in jasper-el.jar.
>>
>> Mark
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: ExpressionFactory.newInstance() undefined.
Posted by Roxana <mi...@gmail.com>.
Hi Mark,
Apparently Java 5 has as well in the documentation of the ExpressionFactory
the method newInstance
http://java.sun.com/javaee/5/docs/api/javax/el/ExpressionFactory.html#ExpressionFactory()
Nevertheless , when i try to use it, the method actually is not there.
How can i use the ExpressionFactoryImpl to get the argument of type
ExpressionFactory that i need to pass it as argument to the constructor of
ExpressionEvaluatorImpl ?
Thanks again
Regards
Roxana
On Wed, Jan 13, 2010 at 3:06 PM, Mark Thomas <ma...@apache.org> wrote:
> On 13/01/2010 14:04, Roxana wrote:
> > Hi Mark,
> >
> > Thank you for your answer. You are of course perfectly right..I have
> looked
> > at the documentation of Java EE6.
> >
> > The org.apache.el.ExpressionFactoryImpl is not part of any jar files
> that
> > comes with Tomcat6...so i suppose that your suggestions is to manually
> copy
> > the commons-el.jar into the lib directory of Tomcat???
>
> No. The class is in jasper-el.jar.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: ExpressionFactory.newInstance() undefined.
Posted by Mark Thomas <ma...@apache.org>.
On 13/01/2010 14:04, Roxana wrote:
> Hi Mark,
>
> Thank you for your answer. You are of course perfectly right..I have looked
> at the documentation of Java EE6.
>
> The org.apache.el.ExpressionFactoryImpl is not part of any jar files that
> comes with Tomcat6...so i suppose that your suggestions is to manually copy
> the commons-el.jar into the lib directory of Tomcat???
No. The class is in jasper-el.jar.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: ExpressionFactory.newInstance() undefined.
Posted by Roxana <mi...@gmail.com>.
Hi Mark,
Thank you for your answer. You are of course perfectly right..I have looked
at the documentation of Java EE6.
The org.apache.el.ExpressionFactoryImpl is not part of any jar files that
comes with Tomcat6...so i suppose that your suggestions is to manually copy
the commons-el.jar into the lib directory of Tomcat???
Thanks
Regards
Roxana
On Wed, Jan 13, 2010 at 2:54 PM, Mark Thomas <ma...@apache.org> wrote:
> On 13/01/2010 12:23, Roxana wrote:
> > I have looke din the documentation of the *ExpressionFactory *:
> > http://java.sun.com/javaee/6/docs/api/javax/el/ExpressionFactory.html
> > and i decided to use the method
> > newInstance<
> http://java.sun.com/javaee/5/docs/api/javax/el/ExpressionFactory.html#newInstance%28%29
> >
> > () Surprisingly enough i get the error message:
> >
> > The method newInstance() is undefined for the type ExpressionFactory
> >
> > Do you have any idea why this method is not available?
>
> You are looking at the Java EE 6 docs. Tomcat 6 supports Servlet 2.5 and
> JSP 2.1 which is Java EE 5. That method was added for JSP 2.2. That
> means you'll need Tomcat 7, which is close to a first release.
>
> > Can you give me some ideas about how to create an argument
> ExpressionFactory
> > for the constructor of ExpressionEvaluatorImpl ?
>
> The easiest way to do this in Tomcat 6 is to do create an instance of
> org.apache.el.ExpressionFactoryImpl
>
> HTH,
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: ExpressionFactory.newInstance() undefined.
Posted by Mark Thomas <ma...@apache.org>.
On 13/01/2010 12:23, Roxana wrote:
> I have looke din the documentation of the *ExpressionFactory *:
> http://java.sun.com/javaee/6/docs/api/javax/el/ExpressionFactory.html
> and i decided to use the method
> newInstance<http://java.sun.com/javaee/5/docs/api/javax/el/ExpressionFactory.html#newInstance%28%29>
> () Surprisingly enough i get the error message:
>
> The method newInstance() is undefined for the type ExpressionFactory
>
> Do you have any idea why this method is not available?
You are looking at the Java EE 6 docs. Tomcat 6 supports Servlet 2.5 and
JSP 2.1 which is Java EE 5. That method was added for JSP 2.2. That
means you'll need Tomcat 7, which is close to a first release.
> Can you give me some ideas about how to create an argument ExpressionFactory
> for the constructor of ExpressionEvaluatorImpl ?
The easiest way to do this in Tomcat 6 is to do create an instance of
org.apache.el.ExpressionFactoryImpl
HTH,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org