Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EL not working - no such method getVariableResolver  RSS feed

 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently downloaded JBoss with Tomcat 5.0.26 and created a jsp with something like "<font color="red">Message:${param.msg}</font>" and it was rendered in the browser as "Message:${param.msg}". So I figured I'd just turn on EL... I put
<%@ page isELIgnored="false" %> in my jsp, but then I get this:
java.lang.NoSuchMethodError: javax.servlet.jsp.PageContext.getVariableResolver(), which I googled and got no hits. It doesn't surprise me that it got a no such method, since in the 1.4 API, I don't see a getVariableResolver method. It's almost like it should be using some other PageContect implementation. And in fact, I think it should be javax.servlet.jsp.el.PageContext.getVariableResolver(), but I don't know what to change to get that one to run instead.

I found several instances of what I think is the jar file in question:


But it has no PageContext.class in the jar. It's also not in the version I just downloaded from the apache site, so maybe another jar?

Ideas?

Does this work for anyone (everyone?) else?

--Dale--
 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll answer my own, for the benefit of those who follow...

I -think- what happened in this case was that an Eclipse .classpath
that had a bad reference to javax.servlet.jar was handed-out. The
result was that the project wouldn't build until Eclipse was happy
with the all library entries. Someone decided to make Eclipse happy
by finding an old copy of javax.servlet.jar and placing it where the
.classpath file said it should go... right smack where an old copy of
the jar file didn't belong! The true solution would have been to
simply remove the entry from the .classpath file, and to never have copied the jar file into the container directory structure. Once that earlier work had been reversed, it worked like a charm.

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