Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.el.ELContext.getFunctionMapper().resolveFunction() returns null always using Tomcat/6.0.10  RSS feed

Najeed Khan
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm developing an application to parse EL scripts in a file and evaluate them. I am using Java Unified EL for the same. The value expressions are resolving fine however the functions are not. I'm using Tomcat 6.0.10 which is bundled with JBoss 4.2.3.

The way I am evaluating the expression is:

However, the function is not being invoked and I get a stack trace like

2009-02-12 22:35:13,629 [http-] ERROR STDERR () -
javax.el.ELException: Function 'testtld:escapeJava' not found
2009-02-12 22:35:13,630 [http-] ERROR STDERR () - at
2009-02-12 22:35:13,630 [http-] ERROR STDERR () - at
2009-02-12 22:35:13,630 [http-] ERROR STDERR () - at
2009-02-12 22:35:13,630 [http-] ERROR STDERR () - at
2009-02-12 22:35:13,630 [http-] ERROR STDERR () - at
2009-02-12 22:35:13,630 [http-] ERROR STDERR () - at
2009-02-12 22:35:13,630 [http-] ERROR STDERR () - at

The jsp page that I am using to obtain the ELContext has the taglib directive to include that particular tld. If I invoke that JSP function from a JSP page(using EL), it works fine. However, when I try to resolve the function programmatically as above, I get the error.

When I checked the Tomcat source code, I noticed in org.apache.jasper.el.ELContextImpl :

And a few lines below that,

Although there is a

I am not sure whether that is invoked or how to have it invoked.

This could be the problem for me as the
ELContext.getFunctionMapper().resolveFunction(...) would return null and I receive a message which corresponds to the Method object resolving to null.

I searched over the internet and did not come up with anything related/conclusive that could point me towards a configuration or programmatic step that I could've missed.

I'd appreciate it if you could give me some pointers as to what might be the problem here and how to fix it. Also, I do not understand why the org.apache.jasper.el package is being used instead of the org.apache.el package which is the newer implementation.


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!