I am attempting to run a project with a servlet that was working a few weeks ago (no modifications have been made since). However, when I run it I now get the following error:
java.lang.ClassNotFoundException: javax.el.StaticFieldELResolver
I've seen similar questions out there such as this one, but their solutions did not work for me. I've tried the following unsuccessfully:
- Removing all other library references other than JDK 1.7 and Apache Tomcat 7.0.41.0
- Updating the
web.xml
file from 2.5 to 3.0:<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
- Updating the
sun-web.xml
file from 2.5 to 3.0:<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">
- Verifying that the Tomcat library includes
el-api.jar
andjsp-api.jar
- Setting the
CATALINA_HOME
environment variable to point to the Tomcat directory
The IDE being used is NetBeans 7.4 running Apache Tomcat 7.0.41.0 with Java 7. Any help is greatly appreciated.
UPDATE:
Oddly, if I choose to run it with GlassFish instead of Tomcat it runs without error. So there must be some relationship to the Tomcat server.