0

I am aware that this is a duplicate question but I could not find my solution in any of the previous answers. I have tried all the solutions from the answers:

  1. I have added the below in my pom.xml

    org.springframework spring-context 3.1.0.RELEASE org.springframework spring-webmvc 3.1.0.RELEASE

  2. Also I have added the maven dependencies in Deployment Assembly

enter image description here

I have redeployed the code after these changes, still I am getting the error:

enter image description here

Is there any other solution for this?

Adding the screenshots of pom.xml

enter image description here

enter image description here

Ribs
  • 21
  • 2

1 Answers1

0

Well,this error occurs when the class you mentioned cannot be found in the classpath, add your pom.xml file so we can diagnose it.

try adding this to your pom.xml

<!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api -->
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
    <scope>provided</scope>
</dependency>
Amin Chokan
  • 15
  • 1
  • 6
  • This I already had in my pom.xml. Still it is not working, I have added the screenshots – Ribs Sep 11 '18 at 18:32