I get an exception whenever I try getting context parameter from we.XML
into a ServletContextListener
class, I am really having hard times understa
My guess is that you have packaged the servlet-api jar in your webapp (in the WEB-INF/lib) folder and this is causing conflicts since the servlet-api will already be present in the container. Make sure you don't include any servlet-api or jsp-api (or Java EE api) jars in your webapp when you deploy it.
Verify the space in disk. When eclipse copy the folder libs if not space in disk this error may occur
Try to clear the tomcat work directory and clean. After that, publish your project and run again.
I had the same problem running JUnit in a Tomcat 7 environment and I solved it adding a dependency in maven (pom.xml) like this:
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<version>7.0.54</version>
<scope>provided</scope>
</dependency>
If you are working in Eclipse, Then just clean your project.
Follow this simple step, Go to Project > clean...> clean all projects > Ok
I had the same issue when I tried with eclipse LUNA version and tomcat 7. The same code without any extra changes worked in eclipse JUNO with tomcat 7.