Get rid of any servlet specific libraries like jsp-api.jar in your /WEB-INF/lib folder. This exception indicates that you have installed servlet getJspApplicationContext() specific libraries that only support Servlet 2.4 / JSP 2.0 or older (the getJspApplicationContext() method was introduced in Servlet 2.5 / JSP 2.1). This is a serious mistake. These libraries do not belong to the webapp class path.
You may have done this to overcome project compilation errors, which is indeed a fairly common beginner error. This had to be solved in different ways, you should refer to the target runtime in your project, and not copy some libraries of the arbitrary servletcontainer make / version file to your project. This will make your project incompatible with the servletcontainers of another make and / or version.
See also:
- How to import javax.servlet API into an Eclipse project?
BalusC Aug 15 '11 at 12:22 2011-08-15 12:22
source share