Ticket #7 (closed defect: invalid)

Opened 6 years ago

Last modified 6 years ago

EL expressions in .jsp pages break Strabon Endpoint when deployed in standalone tomcat

Reported by: charnik Owned by: somebody
Priority: major Milestone:
Component: endpoint Version:
Keywords: endpoint, EL expression, jsp page, exception Cc:


The EL epxressions introduced in the .jsp pages of the endpoint fire up exceptions when the endpoint is deployed in standalone tomcat (either 6 or 7).

For example, in Tomcat 6, just by visiting describe.jsp, we get:

javax.servlet.ServletException?: java.lang.NoSuchMethodError?: javax.el.ExpressionFactory?.newInstance()Ljavax/el/ExpressionFactory;


In Tomcat 7, on the other hand, we get the following exceptioin:
org.apache.jasper.JasperException?: java.lang.ClassCastException?: org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl


Fortunately, this is a runtime error and is fired only when visiting the respective .jsp pages. Clients using the Bean services are not affected.

In Eclipse, there was no error at all.

Change History

comment:1 Changed 6 years ago by charnik

This is a problem of the Tomcat container which does not ship with JSTL support. In Tomcat 7, the solution is to place the JSTL API and implementation from http://repo1.maven.org/maven2/javax/servlet/jstl/1.2/jstl-1.2.jar. This jar is also available in the WEB-INF/lib directory of strabon-endpoint.war that is provided by Strabon.

The problem still persists for Tomcat 6.

Useful pages: http://www.mularien.com/blog/2008/02/19/tutorial-how-to-set-up-tomcat-6-to-work-with-jstl-12/ and http://www.mularien.com/blog/2008/04/24/how-to-reference-and-use-jstl-in-your-web-application/

comment:2 Changed 6 years ago by charnik

Changeset 507:69fb6f4f192a resolves the problem in Tomcat 7 at the pom.xml level requiring the right dependencies for the JSTL API and implementation.

The problem persists for Tomcat 6.

Useful page: http://www.murraywilliams.com/2011/11/running-jstl-1-2-on-tomcat-7-using-maven/

comment:3 Changed 6 years ago by charnik

  • Component changed from component1 to endpoint

comment:4 Changed 6 years ago by charnik

  • Status changed from new to closed
  • Resolution set to invalid

Since we drop all EL expressions, the ticket is resolved.

Note: See TracTickets for help on using tickets.